Package com.luciad.lucy.gui
Interface ILcyCustomizableRepresentationActiveSettable
- All Superinterfaces:
ILcdPropertyChangeSource
,ILcyActiveSettable
,Serializable
- All Known Implementing Classes:
ALcyGXYNewControllerActiveSettable
,TLcyGXYNewControllerActiveSettable
,TLcyGXYTouchNewControllerActiveSettable
,TLcyLspCreateControllerActiveSettable
Extension of ILcyActiveSettable
that allows to customize the component that
represents it (typically a JToggleButton
). Implementations of
ILcyActionBar
(e.g. TLcyToolBar
) will call the
customizeRepresentation
method to provide a hook for the active settable to modify
its component. One could for example want to add a DropTargetListener
or a
MouseListener
that listens for a double click on the component. It is also possible
to completely replace the component with a custom one.
General components don't always play nice when added to a Swing JToolBar, see also
TLcyAlwaysFitJToolBar.createToolBarPanel(java.awt.Component)
.
-
Field Summary
Fields inherited from interface com.luciad.lucy.gui.ILcyActiveSettable
DEFAULT, LONG_DESCRIPTION, NAME, SHORT_DESCRIPTION, SHOW_ACTION_NAME, SMALL_ICON, SMALL_SELECTED_ICON, VISIBLE
-
Method Summary
Modifier and TypeMethodDescriptioncustomizeRepresentation
(Component aDefaultComponent, ILcyActiveSettable aWrapperActiveSettable, ILcyActionBar aActionBar) Allows to customize or replace the default component that is used to represent thisILcyActiveSettable
(typically aJToggleButton
).Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.luciad.lucy.gui.ILcyActiveSettable
getValue, isActive, isEnabled, putValue, setActive, setEnabled
-
Method Details
-
customizeRepresentation
Component customizeRepresentation(Component aDefaultComponent, ILcyActiveSettable aWrapperActiveSettable, ILcyActionBar aActionBar) Allows to customize or replace the default component that is used to represent thisILcyActiveSettable
(typically aJToggleButton
).- Parameters:
aDefaultComponent
- The component that normally represents this active settable.aWrapperActiveSettable
- In case this active settable is wrapped (for example when using (TLcyActionBarUtil
), this parameter is the wrapper active settable, if not, it is this active settable. This is useful to retrieve properties such as the name or the icon of the active settable which can be different for different wrapper instances. E.g., a tool bar might use a different icon as a menu bar. And if the active settable is customized for the tool bar, it might be required to retrieve the tool bar icon.aActionBar
- The action bar in which this active settable is going to be inserted, provided as contextual information..- Returns:
- A customized or new component to represent this active settable. The simplest (but not
useful) implementation of this method would be
return aDefaultComponent;
. - See Also:
-