public class TLcyActionBarItem extends Object
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
.
TLcyActionBarItemComparator
Constructor and Description |
---|
TLcyActionBarItem(Component aComponent,
TLcyGroupDescriptor aGroupDescriptor,
long aInsertTime)
Creates a
TLcyActionBarItem that represents a component that was
inserted directly. |
TLcyActionBarItem(ILcdAction aAction,
TLcyGroupDescriptor aGroupDescriptor,
String[] aMenus,
TLcyGroupDescriptor[] aMenuGroupDescriptors,
long aInsertTime)
Creates a
TLcyActionBarItem that represents an action. |
TLcyActionBarItem(ILcyActiveSettable aActiveSettable,
boolean aDeactivatePossible,
TLcyGroupDescriptor aGroupDescriptor,
String[] aMenus,
TLcyGroupDescriptor[] aMenuGroupDescriptors,
long aInsertTime)
Creates a
TLcyActionBarItem that represents an active settable. |
TLcyActionBarItem(String[] aMenus,
TLcyGroupDescriptor[] aMenuGroupDescriptors,
long aInsertTime)
Creates a
TLcyActionBarItem that represents a sub-menu. |
Modifier and Type | Method and Description |
---|---|
ILcdAction |
getAction()
Returns the
ILcdAction . |
ILcyActiveSettable |
getActiveSettable()
Returns the
ILcyActiveSettable . |
Component |
getComponent()
Returns the
Component . |
TLcyGroupDescriptor |
getGroupDescriptor()
Returns the
TLcyGroupDescriptor . |
long |
getInsertTime()
Returns the insertion time.
|
TLcyGroupDescriptor[] |
getMenuGroupDescriptors()
Returns the menu group descriptors.
|
String[] |
getMenus()
Returns the menus.
|
String |
getText()
Utility method that returns the
NAME property from the action (if not null), or
from the active settable (if not null) or the last menu name (if not null). |
boolean |
isDeactivatePossible()
Returns the
deactivatePossible 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).
|
public TLcyActionBarItem(ILcdAction aAction, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime)
TLcyActionBarItem
that represents an action.aAction
- The action, as defined in insertAction
.aGroupDescriptor
- The group descriptor, as defined in insertAction
.aMenus
- The menus, as defined in insertAction
.aMenuGroupDescriptors
- The menu group descriptors, as defined in insertAction
.aInsertTime
- The insert time, see getInsertTime()
.ILcyActionBar.insertAction(com.luciad.gui.ILcdAction, TLcyGroupDescriptor, String[], TLcyGroupDescriptor[])
public TLcyActionBarItem(ILcyActiveSettable aActiveSettable, boolean aDeactivatePossible, TLcyGroupDescriptor aGroupDescriptor, String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime)
TLcyActionBarItem
that represents an active settable.aActiveSettable
- The active settable, as defined in insertActiveSettable
.aDeactivatePossible
- The deactivate possible property, as defined in insertActiveSettable
.aGroupDescriptor
- The group descriptor, as defined in insertActiveSettable
.aMenus
- The menus, as defined in insertActiveSettable
.aMenuGroupDescriptors
- The menu group descriptors, as defined in insertActiveSettable
.aInsertTime
- The insert time, see getInsertTime()
.ILcyActionBar.insertActiveSettable(ILcyActiveSettable, TLcyGroupDescriptor, String[], TLcyGroupDescriptor[], boolean)
public TLcyActionBarItem(Component aComponent, TLcyGroupDescriptor aGroupDescriptor, long aInsertTime)
TLcyActionBarItem
that represents a component that was
inserted directly.aComponent
- The component, as defined in insertComponent
.aGroupDescriptor
- The group descriptor, as defined in insertComponent
.aInsertTime
- The insert time, see getInsertTime()
.ALcyActionBar.insertComponent(java.awt.Component, TLcyGroupDescriptor)
public TLcyActionBarItem(String[] aMenus, TLcyGroupDescriptor[] aMenuGroupDescriptors, long aInsertTime)
TLcyActionBarItem
that represents a sub-menu.aMenus
- The menus, as defined in insertAction
or insertActiveSettable
.aMenuGroupDescriptors
- The menu group descriptors, as defined in insertAction
or insertActiveSettable
.aInsertTime
- The insert time, see getInsertTime()
.ILcyActionBar.insertAction(com.luciad.gui.ILcdAction, TLcyGroupDescriptor, String[], TLcyGroupDescriptor[])
,
ILcyActionBar.insertActiveSettable(ILcyActiveSettable, TLcyGroupDescriptor, String[], TLcyGroupDescriptor[], boolean)
public String getText()
NAME
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.TLcyActionBarItem
, if any.
Null
otherwise.public boolean isMenu()
true
if this descriptor represents a (sub)menu, false
otherwise.public ILcdAction getAction()
ILcdAction
. See constructors and class comment for more information.ILcdAction
.public ILcyActiveSettable getActiveSettable()
ILcyActiveSettable
. See constructors and class comment for more information.ILcyActiveSettable
.public boolean isDeactivatePossible()
deactivatePossible
property. See constructors and class comment for more information.deactivatePossible
property.public TLcyGroupDescriptor getGroupDescriptor()
TLcyGroupDescriptor
. See constructors and class comment for more information.TLcyGroupDescriptor
.public Component getComponent()
Component
. See constructors and class comment for more information.Component
.public String[] getMenus()
public TLcyGroupDescriptor[] getMenuGroupDescriptors()
public long getInsertTime()