com.jbbres.lib.actions.tools.swing
Class VComboBoxPersonalizedItem<C>

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.jbbres.lib.actions.tools.swing.VComboBoxPersonalizedItem<C>
Type Parameters:
C - - type of object associated to the item
All Implemented Interfaces:
com.jbbres.lib.PropertiesOwner, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public abstract class VComboBoxPersonalizedItem<C>
extends javax.swing.AbstractAction
implements com.jbbres.lib.PropertiesOwner

A personalized item to be used in AbstractVariableComboBox instances.

When a VComboBoxPersonalizedItem is selected, a specific action can be triggered.

VComboBoxPersonalizedItem items appear at the end of the combo box list.

Since:
1.0.0
Version:
1.0.0
Author:
Jean-Baptiste Bres
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
VComboBoxPersonalizedItem(java.lang.String title)
          Instantiates a new variable combo box personalized item.
VComboBoxPersonalizedItem(java.lang.String title, javax.swing.Icon icon)
          Instantiates a new variable combo box personalized item.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.lang.Class<C> getContentClass()
          For internal use only - returns the content class.
abstract  C getValue()
          Returns the value associated to the personalized item.
abstract  void itemSelected()
          This method is triggered when the user select the item within the combo box list.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jbbres.lib.PropertiesOwner
getProperties, setProperties
 

Constructor Detail

VComboBoxPersonalizedItem

public VComboBoxPersonalizedItem(java.lang.String title,
                                 javax.swing.Icon icon)
Instantiates a new variable combo box personalized item.

Parameters:
title - - name of the item
icon - - icon of the item

VComboBoxPersonalizedItem

public VComboBoxPersonalizedItem(java.lang.String title)
Instantiates a new variable combo box personalized item.

Parameters:
title - - name of the item
Method Detail

itemSelected

public abstract void itemSelected()
This method is triggered when the user select the item within the combo box list.


getValue

public abstract C getValue()
Returns the value associated to the personalized item.

Returns:
the value associated to the personalized item

getContentClass

public final java.lang.Class<C> getContentClass()
For internal use only - returns the content class.

Returns:
the content class

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener


To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.