|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.appframe.event.IlvSingleActionHandler
ilog.views.appframe.event.IlvListActionHandler
public abstract class IlvListActionHandler
Action handler that handles list actions.
List actions are typically used for displaying the list of recently used
files or the list of open windows in a menu.
List actions are marked in the settings with the attribute isList="true".
For example, the action that displays the main recent file list of the
application is defined as follows:
<action actionCommand="RecentFiles"
isList="true"
...
For more details on list actions, see the IlvAction
class.
| Constructor Summary | |
|---|---|
IlvListActionHandler(String command)
Constructs a new IlvListActionHandler that handles the
list action with the specified command key. |
|
| Method Summary | |
|---|---|
String |
getEmptyString()
Returns the empty string used when the list action does not contain any items. |
char |
getFirstNumberingCharacter()
Returns the character used for numbering the menu items associated with the items of the list action. |
Object[] |
getListItems()
Returns the items that are stored in the list action handled by this object. |
int |
getMenuItemMaximumLength()
Returns the maximum number of characters allowed for displaying menu items associated with items of the list action that this object handles. |
int |
getSelectedItem()
Returns the index of the currently selected item in the list items of the list action. |
boolean |
isDynamicList()
Determines whether the items stored in the list action are dynamically determined before displaying the pop-up menu associated with the list action. |
boolean |
isNumbering()
Determines whether menu items displaying list items of the list action are prefixed with a numbering string. |
boolean |
isSubMenuItems()
Determines whether the menu items created for the items of the list action should be created in a sub pop-up menu. |
protected void |
selectedItemChanged(int index,
Object object)
Invoked when the selected item of the list of items has changed. |
void |
setAction(Action action)
Sets the action this object handles. |
void |
setDynamicList(boolean dynamic)
Specifies the dynamic list mode of the list action this object handles. |
void |
setEmptyString(String emptyString)
Sets the string used when the list action does not contain any items. |
void |
setFirstNumberingCharacter(char c)
Sets the character used for numbering the menu item associated with the items of the list action. |
void |
setListItems(Object[] items)
Sets the items that are stored in the list action handled by this object. |
void |
setMenuItemMaximumLength(int maxLength)
Sets the maximum number of characters allowed for displaying the menu items associated with items of the list action that this object handles. |
void |
setNumbering(boolean numbering)
Specifies whether menu items displaying list items of the list action should be prefixed with a numbering string. |
void |
setSelectedItem(int index)
Sets the newly selected item in the list of items of the list action. |
void |
setSubMenuItems(boolean subMenu)
Creates the menu items for the items of the list action in a sub pop-up menu or below the menu item associated with the list action, depending on the value of the subMenu parameter. |
| Methods inherited from class ilog.views.appframe.event.IlvSingleActionHandler |
|---|
actionPerformed, getAction, getCommand, isProcessingAction, setCommand, updateAction, updateSingleAction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvListActionHandler(String command)
IlvListActionHandler that handles the
list action with the specified command key.
command - The command key of the action handled by this action handler.| Method Detail |
|---|
public Object[] getListItems()
setListItems(java.lang.Object[]),
IlvAction.GetListItems(javax.swing.Action)public void setListItems(Object[] items)
items - The new items of the list action.getListItems(),
IlvAction.SetListItems(javax.swing.Action, java.lang.Object[])public int getSelectedItem()
-1 if no item is selected.setSelectedItem(int),
selectedItemChanged(int, java.lang.Object),
IlvAction.GetSelectionIndex(javax.swing.Action)public void setSelectedItem(int index)
index - The index of the newly selected list item.getSelectedItem(),
selectedItemChanged(int, java.lang.Object),
IlvAction.SetSelectionIndex(javax.swing.Action, int)
protected void selectedItemChanged(int index,
Object object)
index - The index of the newly selected item.object - The newly selected item.getSelectedItem(),
setSelectedItem(int)public boolean isDynamicList()
IlvSingleActionHandler.updateAction(javax.swing.Action) is
invoked just before the pop-up menu is displayed.
true if list items are dynamically set;
false otherwise.setDynamicList(boolean)public void setDynamicList(boolean dynamic)
dynamic - If true, list items are defined just before
the pop-up menu associated with the list action is displayed; otherwise,
list items are set once using the setListItems(java.lang.Object[]) method.isDynamicList()public boolean isSubMenuItems()
true if menu items are created in a sub pop-up menu;
false otherwise.setSubMenuItems(boolean)public void setSubMenuItems(boolean subMenu)
subMenu parameter.
subMenu - If true, menu items will be created in a
sub pop-up menu; if false, menu items will be created
below the menu item associated with the list action and the menu item
will become invisible.isSubMenuItems()public int getMenuItemMaximumLength()
setMenuItemMaximumLength(int)public void setMenuItemMaximumLength(int maxLength)
maxLength - The new maximum number of characters.getMenuItemMaximumLength()public boolean isNumbering()
IlvAction.ACTION_LIST_MENU_USENUMBERING,
setNumbering(boolean),
getFirstNumberingCharacter()public void setNumbering(boolean numbering)
numbering - If true, menu items will be prefixed with
a numbering string; if false, menu items will not be prefixed.isNumbering(),
getFirstNumberingCharacter()public char getFirstNumberingCharacter()
isNumbering() returns true).
setFirstNumberingCharacter(char),
isNumbering(),
IlvAction.ACTION_LIST_MENU_FIRSTNUMBERpublic void setFirstNumberingCharacter(char c)
isNumbering() returns true).
c - The first numbering character.getFirstNumberingCharacter(),
isNumbering()public String getEmptyString()
setEmptyString(java.lang.String),
IlvAction.ACTION_LIST_MENU_EMPTYSTRINGpublic void setEmptyString(String emptyString)
emptyString - The new empty string. The specified string should be a
key to a string resource.getEmptyString()public void setAction(Action action)
IlvSingleActionHandler.setCommand(java.lang.String) method.
setAction in class IlvSingleActionHandleraction - The new action this instance handles.IlvSingleActionHandler.getAction(),
IlvSingleActionHandler.setCommand(java.lang.String)
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||