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
ConstructorDescriptionTLcyActionBarItem
(ILcdAction aAction, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItem
that represents an action.TLcyActionBarItem
(ILcyActiveSettable aActiveSettable, boolean aDeactivatePossible, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItem
that represents an active settable.TLcyActionBarItem
(Component aComponent, TLcyGroupDescriptor aGroupDescriptor, long aInsertTime) Creates aTLcyActionBarItem
that represents a component that was inserted directly.TLcyActionBarItem
(String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItem
that represents a sub-menu. -
Method Summary
Modifier and TypeMethodDescriptionReturns theILcdAction
.Returns theILcyActiveSettable
.Returns theComponent
.Returns theTLcyGroupDescriptor
.long
Returns the insertion time.Returns the menu group descriptors.String[]
getMenus()
Returns the menus.getText()
Utility method that returns theNAME
property from the action (if not null), or from the active settable (if not null) or the last menu name (if not null).boolean
Returns thedeactivatePossible
property.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).
-
Constructor Details
-
TLcyActionBarItem
public TLcyActionBarItem(ILcdAction aAction, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime) Creates aTLcyActionBarItem
that 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 aTLcyActionBarItem
that 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 aTLcyActionBarItem
that 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 aTLcyActionBarItem
that represents a sub-menu.- Parameters:
aMenus
- The menus, as defined ininsertAction
orinsertActiveSettable
.aMenuGroupDescriptors
- The menu group descriptors, as defined ininsertAction
orinsertActiveSettable
.aInsertTime
- The insert time, seegetInsertTime()
.- See Also:
-
-
Method Details
-
getText
Utility method that returns theNAME
property 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,null
is returned.- Returns:
- The textual representation of this
TLcyActionBarItem
, if any.Null
otherwise.
-
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:
true
if this descriptor represents a (sub)menu,false
otherwise.
-
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 thedeactivatePossible
property. See constructors and class comment for more information.- Returns:
- the
deactivatePossible
property.
-
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.
-