Package com.luciad.lucy.gui
Class TLcyActionBarItem
java.lang.Object
com.luciad.lucy.gui.TLcyActionBarItem
Represents an action, active settable, component or sub-menu in an ILcyActionBar
(e.g. a menu bar), depending on which of the four constructors is used. Every
property that isn't specified for a specific constructor returns null.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTLcyActionBarItem(ILcdAction aAction, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItemthat represents an action.TLcyActionBarItem(ILcyActiveSettable aActiveSettable, boolean aDeactivatePossible, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItemthat represents an active settable.TLcyActionBarItem(Component aComponent, TLcyGroupDescriptor aGroupDescriptor, long aInsertTime) Creates aTLcyActionBarItemthat represents a component that was inserted directly.TLcyActionBarItem(String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItemthat represents a sub-menu. -
Method Summary
Modifier and TypeMethodDescriptionReturns theILcdAction.Returns theILcyActiveSettable.Returns theComponent.Returns theTLcyGroupDescriptor.longReturns the insertion time.Returns the menu group descriptors.String[]getMenus()Returns the menus.getText()Utility method that returns theNAMEproperty from the action (if not null), or from the active settable (if not null) or the last menu name (if not null).booleanReturns thedeactivatePossibleproperty.booleanisMenu()Utility method to find out if this descriptor represents a (sub)menu (so not an action, not an active settable and not a component).
-
Constructor Details
-
TLcyActionBarItem
public TLcyActionBarItem(ILcdAction aAction, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItemthat represents an action.- Parameters:
aAction- The action, as defined ininsertAction.aGroupDescriptor- The group descriptor, as defined ininsertAction.aMenus- The menus, as defined ininsertAction.aMenuGroupDescriptors- The menu group descriptors, as defined ininsertAction.aInsertTime- The insert time, seegetInsertTime().- See Also:
-
TLcyActionBarItem
public TLcyActionBarItem(ILcyActiveSettable aActiveSettable, boolean aDeactivatePossible, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItemthat represents an active settable.- Parameters:
aActiveSettable- The active settable, as defined ininsertActiveSettable.aDeactivatePossible- The deactivate possible property, as defined ininsertActiveSettable.aGroupDescriptor- The group descriptor, as defined ininsertActiveSettable.aMenus- The menus, as defined ininsertActiveSettable.aMenuGroupDescriptors- The menu group descriptors, as defined ininsertActiveSettable.aInsertTime- The insert time, seegetInsertTime().- See Also:
-
TLcyActionBarItem
public TLcyActionBarItem(Component aComponent, TLcyGroupDescriptor aGroupDescriptor, long aInsertTime) Creates aTLcyActionBarItemthat represents a component that was inserted directly.- Parameters:
aComponent- The component, as defined ininsertComponent.aGroupDescriptor- The group descriptor, as defined ininsertComponent.aInsertTime- The insert time, seegetInsertTime().- See Also:
-
TLcyActionBarItem
public TLcyActionBarItem(String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItemthat represents a sub-menu.- Parameters:
aMenus- The menus, as defined ininsertActionorinsertActiveSettable.aMenuGroupDescriptors- The menu group descriptors, as defined ininsertActionorinsertActiveSettable.aInsertTime- The insert time, seegetInsertTime().- See Also:
-
-
Method Details
-
getText
Utility method that returns theNAMEproperty from the action (if not null), or from the active settable (if not null) or the last menu name (if not null). If these are all unavailable,nullis returned.- Returns:
- The textual representation of this
TLcyActionBarItem, if any.Nullotherwise.
-
isMenu
public boolean isMenu()Utility method to find out if this descriptor represents a (sub)menu (so not an action, not an active settable and not a component).- Returns:
trueif this descriptor represents a (sub)menu,falseotherwise.
-
getAction
Returns theILcdAction. See constructors and class comment for more information.- Returns:
- the
ILcdAction.
-
getActiveSettable
Returns theILcyActiveSettable. See constructors and class comment for more information.- Returns:
- the
ILcyActiveSettable.
-
isDeactivatePossible
public boolean isDeactivatePossible()Returns thedeactivatePossibleproperty. See constructors and class comment for more information.- Returns:
- the
deactivatePossibleproperty.
-
getGroupDescriptor
Returns theTLcyGroupDescriptor. See constructors and class comment for more information.- Returns:
- the
TLcyGroupDescriptor.
-
getComponent
Returns theComponent. See constructors and class comment for more information.- Returns:
- the
Component.
-
getMenus
Returns the menus. See constructors and class comment for more information.- Returns:
- the menus.
-
getMenuGroupDescriptors
Returns the menu group descriptors. See constructors and class comment for more information.- Returns:
- the menu group descriptors.
-
getInsertTime
public long getInsertTime()Returns the insertion time. The insertion time is not related to wall-clock time, but represents the order in which actions, active settables, components or sub-menus were added. The later they were added, the bigger this value. It can be used to automatically order items based on their insertion time, to for example keep the most recently added item in a recent items list at the top.- Returns:
- the insertion time.
-