Class TLcyGXYSetControllerActiveSettable
- All Implemented Interfaces:
ILcyActiveSettable
,ILcdPropertyChangeSource
,Serializable
- Direct Known Subclasses:
ALcyGXYNewControllerActiveSettable
An active settable implementation which allows to activate a controller on a GXY view.
When calling setActive(true)
, the active settable will install the controller on the GXY view.
The active settable will de-activate itself when another controller is placed on the view.
Note: this active settable does nothing when calling setActive(false)
.
To de-activate it, you need to install another controller on the view.
This means that typically you use multiple instances of this class, allowing the user of your application to
switch between different controllers.
To ensure that this is reflected in the UI, you need to indicate that de-activation of this active settable is not
possible when inserting it into the UI.
For example by passing false
as last argument in TLcyActionBarUtil#insertInConfiguredActionBars
,
or ILcyActionBar#insertActiveSettable
.
- See Also:
-
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
-
Constructor Summary
ConstructorDescriptionTLcyGXYSetControllerActiveSettable
(ILcdGXYController aGXYController, ILcdGXYView aGXYView, ILcyLucyEnv aLucyEnv) Creates a newTLcyGXYSetControllerActiveSettable
for the given controller and the given view. -
Method Summary
Modifier and TypeMethodDescriptionstatic TLcdGXYCompositeController
combineWithNavigateController
(ILcyMapComponent aMap, ILcdGXYController aOriginal) Combines the given controller with the navigate controller.Returns the controller of this active settable.Returns the view the associated controller will be set on.protected ILcyLucyEnv
Returns the current Lucy environment.boolean
isActive()
Returns true if the state of this object is active, false if the state is inactive.void
setActive
(boolean aActive) Sets the active state of this object.void
setGXYController
(ILcdGXYController aGXYController) Sets the controller of this active settable.void
setGXYView
(ILcdGXYView aGXYView) Sets the view the associated controller will be set on.Methods inherited from class com.luciad.lucy.gui.ALcyActiveSettable
addPropertyChangeListener, firePropertyChange, getDisplayName, getIcon, getLongDescription, getName, getShortDescription, getValue, isEnabled, putValue, removePropertyChangeListener, setDisplayName, setEnabled, setIcon, setLongDescription, setName, setShortDescription
-
Constructor Details
-
TLcyGXYSetControllerActiveSettable
public TLcyGXYSetControllerActiveSettable(ILcdGXYController aGXYController, ILcdGXYView aGXYView, ILcyLucyEnv aLucyEnv) Creates a newTLcyGXYSetControllerActiveSettable
for the given controller and the given view.- Parameters:
aGXYController
- The controller to activate. Ifnull
is provided, a controller must be set before using this active settable.aGXYView
- The view to set the controller on. Ifnull
is provided, a viewaLucyEnv
- The current Lucy environment
-
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:ILcyActiveSettable
Returns true if the state of this object is active, false if the state is inactive. As for every property: whenever the return value of this method changes, a property change event must be fired (seeILcyActiveSettable.setActive(boolean)
).- Returns:
- true if the state of this object is active, false if the state is inactive.
- See Also:
-
setActive
public void setActive(boolean aActive) Description copied from interface:ILcyActiveSettable
Sets the active state of this object. When the new state is different from the previous state, a certain action will need to be performed. Also a property change event will be fired in such a case. If no property change event is fired, synchronization between this ILcyActiveSettable and the GUI widget representing it will probably fail (e.g. the checkbox will not change state). Note: refer to Implementing Bound Property Support Within a Bean for an example about firing a property change.- Parameters:
aActive
- True if the new state is active, false if the new state is inactive.- See Also:
-
getGXYController
Returns the controller of this active settable.- Returns:
- the controller of this active settable.
-
setGXYController
Sets the controller of this active settable.- Parameters:
aGXYController
- The controller to work on.
-
getLucyEnv
Returns the current Lucy environment.- Returns:
- the current Lucy environment
-
getGXYView
Returns the view the associated controller will be set on.- Returns:
- the view the associated controller will be set on.
-
setGXYView
Sets the view the associated controller will be set on.- Parameters:
aGXYView
- The new view to set the controller to.
-