Class TLcyMapLayerControlFactory
- All Implemented Interfaces:
ILcyMapLayerControlFactory
- Direct Known Subclasses:
TLcyMapOverviewLayerControlFactory
Factory to create a TLcyMapLayerControl
for a given TLcyMapComponent
.
It cannot create a layer control for other ILcyMapComponent
implementations.
The layer control is composed of a list of layers, and several ILcyActionBar
instances that contain actions to move and delete the selected layer(s), and to change their properties.
This list of layers can be displayed as a linear list, where every layer in the user interface maps one on one with ILcdGXYView.layers()
.
This linear list is created by createComponent(int, TLcyMapLayerControl)
with ID LAYER_LIST_COMPONENT
.
The list of layers can also be displayed as a layer tree.
In this case, every ILcdGXYLayerList
that was added using ILcyMapComponent.insertGXYLayer(com.luciad.view.gxy.ILcdGXYLayer)
is displayed as a tree node,
which can recursively be expanded, modeling the structure of the added ILcdGXYLayerList
s.
The layers that were never added using the insertGXYLayer
method, but that are part of ILcdGXYView.layers()
are put at the top level of the tree.
This factory is typically used during the creation of a ILcyMapComponent
.
E.g. this factory can be set to a TLcyMapComponentFactory
using TLcyMapComponentFactory.setMapLayerControlFactory(ILcyMapLayerControlFactory)
.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The ID for thecreateActionBar
method that represents the regularILcyActionBar
, by default the tool bar located at the top of the layer control panel.static final int
The ID for thecreateAction
method that represents the action to adapt the world reference of the view so that the projection and geodetic datum match with that of the model of the selected layer.static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the copy layer reference action.static final int
The ID for thecreateComponent
method that represents theComponent
to delete the selected layers.static final int
The ID for thecreateAction
method that represents the action to delete the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the delete layer action.static final int
The ID for thecreateAction
method that represents the action to fit the map extents so that the selected layers are shown.static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the fit to layer action.static final String
The help id for the component representing a layer control.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the editable property of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer editable active settable.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the label deconfliction property of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer label decluttering active settable.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the labeled property of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer labeled active settable.static final int
The ID for thecreateComponent
method that represents theComponent
to show a flat view on the layers of the view, as they are retrieved using theILcdLayered
interface.static final int
The ID for thecreateTree
method that represents the SwingJTree
for the flat layer view.static final int
The ID for thecreateTreeCellRenderer
method that represents the Swing tree cell renderer for the flat layer view.static final int
The ID for thecreateTreeModel
method that represents the Swing tree model for the flat layer view.static final int
The ID for thecreateAction
method that represents the action to show the layer properties of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer properties action.static final TLcyGroupDescriptor
Not used.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the selectable property of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer selectable active settable.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the snappable property of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer snappable active settable.static final int
The ID for thecreateComponent
method that represents theComponent
to show a hierarchical view on the layers of the view.static final int
The ID for thecreateTree
method that represents the SwingJTree
for the hierarchical layer view.static final int
The ID for thecreateTreeCellRenderer
method that represents the Swing tree cell renderer for the hierarchical layer view.static final int
The ID for thecreateTreeModel
method that represents the Swing tree model for the hierarchical layer view.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the visible property of the selected layer(s).static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer visible active settable.static final TLcyGroupDescriptor
Not used.static final int
The ID for thecreateAction
method that represents the action to move the selected layers to the bottom.static final int
The ID for thecreateAction
method that represents the action to move the selected layers down.static final TLcyGroupDescriptor
Not used.static final int
The ID for thecreateAction
method that represents the action to move the selected layers to the top.static final int
The ID for thecreateAction
method that represents the action to move the selected layers up.static final int
The ID for thecreateActionBar
method that represents the orderILcyActionBar
, by default the tool bar located at the right side of the layer control panel.static final int
The ID for thecreateActionBar
method that represents the popupILcyActionBar
, by default the right click menu of the layer control panel.static final int
The ID for thecreateAction
method that represents the action to adjust the map scale so that it matches with the raster data of the selected layer.static final int
The ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the scale to raster action.static final int
The ID for thecreateActiveSettable
method that represents the active settable to toggle the layer view between the hierarchical structure (seeLAYER_TREE_COMPONENT
) and the flat list (seeLAYER_LIST_COMPONENT
). -
Constructor Summary
ConstructorDescriptionCreates a new layer control factory.TLcyMapLayerControlFactory
(ILcyLucyEnv aLucyEnv) Creates a new layer control factory with the givenILcyLucyEnv
.TLcyMapLayerControlFactory
(ILcyLucyEnv aLucyEnv, String aConfigSourceName) Creates a new layer control factory with the givenILcyLucyEnv
and the properties of the config fileaConfigSourceName
. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdAction
createAction
(int aID, TLcyMapLayerControl aLayerControl) Creates an action.protected ILcyActionBar
createActionBar
(int aID, TLcyMapLayerControl aLayerControl) Creates an empty action bar.protected ILcyActionBar
createActionBar
(TLcyMapLayerControl aLayerControl) Creates an empty action bar.protected ILcyActiveSettable
createActiveSettable
(int aID, TLcyMapLayerControl aLayerControl) Creates an active settable.protected void
createAndSetLayout
(TLcyMapLayerControl aLayerControlSFCT) Creates and sets the layout to the given layer control.protected Component
createComponent
(int aID, TLcyMapLayerControl aLayerControl) Creates a component.protected TLcyMapLayerControl
createEmptyMapLayerControl
(TLcyMapComponent aMapComponent) Creates an empty layer control, without any content, buttons or panels.protected ILcdFilter
<ILcdGXYLayer> createEnabledFilter
(int aID, ILcyMapLayerControl aLayerControl) Creates anILcdFilter
for the corresponding actions and active settables.createMapLayerControl
(ILcyMapComponent aMapComponent) Creates a newTLcyMapLayerControl
for the given map component.protected ILcyPopupMenu
createPopupMenu
(int aID, TLcyMapLayerControl aLayerControl) Creates an empty popup menu.protected JTree
createTree
(int aID, TLcyMapLayerControl aMapLayerControl) Creates aJTree
which will be used in the map layer control.protected TreeCellRenderer
createTreeCellRenderer
(int aID, TLcyMapLayerControl aMapLayerControl) Creates theTreeCellRenderer
used by theJTree
of the map layer controlprotected TreeModel
createTreeModel
(int aID, TLcyMapLayerControl aMapLayerControl) Creates theTreeModel
used by theJTree
of the map layer controlprotected void
finalizeCreation
(TLcyMapLayerControl aLayerControl) Method called to finalize the creation process.Returns the configuration source name.Returns the associated lucy environment.protected void
insertAction
(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the action bar, order bar and popup menu of the given layer control.protected void
insertActionBar
(int aID, ILcyActionBar aActionBar, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action bar into the given layer control.protected void
insertActionBar
(ILcyActionBar aActionBar, TLcyMapLayerControl aLayerControlSFCT) Insert the given action bar into the given layer control.protected void
insertActionInActionBar
(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the regular action bar of the given layer control.protected void
insertActionInOrderBar
(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the order action bar of the given layer control.protected void
insertActionInPopupMenu
(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the popup menu of the given layer control.protected void
insertActiveSettable
(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the action bar, order bar and popup menu of the given layer control.protected void
insertActiveSettableInActionBar
(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the regular action bar of the given layer control.protected void
insertActiveSettableInOrderBar
(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the order action bar of the given layer control.protected void
insertActiveSettableInPopupMenu
(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the popup menu of the given layer control.protected void
insertComponent
(int aID, Component aComponent, TLcyMapLayerControl aLayerControlSFCT) Inserts the given component into the given layer control.protected void
insertComponentInActionBar
(int aID, Component aComponent, TLcyMapLayerControl aMapLayerControl) Inserts the given component in the regular action bar (seeTLcyMapLayerControl.getActionBar()
) of the given map layer control.protected void
insertComponentInOrderBar
(int aID, Component aComponent, TLcyMapLayerControl aMapLayerControl) Inserts the given component in the order action bar (seeTLcyMapLayerControl.getOrderActionBar()
) of the given map layer control.void
setConfigSourceName
(String aConfigSourceName) Sets the configuration source name.void
setLucyEnv
(ILcyLucyEnv aLucyEnv) Sets the lucy environment.
-
Field Details
-
HELP_ID
The help id for the component representing a layer control. This help id can be used to display context sensitive help.- See Also:
-
MOVE_LAYER_GROUP_DESCRIPTOR
Not used. -
LAYER_PROPERTIES_GROUP_DESCRIPTOR
Not used. -
MODIFY_VIEW_GROUP_DESCRIPTOR
Not used. -
MOVE_LAYER_UP_ACTION
public static final int MOVE_LAYER_UP_ACTIONThe ID for thecreateAction
method that represents the action to move the selected layers up.- See Also:
-
MOVE_LAYER_DOWN_ACTION
public static final int MOVE_LAYER_DOWN_ACTIONThe ID for thecreateAction
method that represents the action to move the selected layers down.- See Also:
-
MOVE_LAYER_TOP_ACTION
public static final int MOVE_LAYER_TOP_ACTIONThe ID for thecreateAction
method that represents the action to move the selected layers to the top.- See Also:
-
MOVE_LAYER_BOTTOM_ACTION
public static final int MOVE_LAYER_BOTTOM_ACTIONThe ID for thecreateAction
method that represents the action to move the selected layers to the bottom.- See Also:
-
FIT_TO_LAYER_ACTION
public static final int FIT_TO_LAYER_ACTIONThe ID for thecreateAction
method that represents the action to fit the map extents so that the selected layers are shown.- See Also:
-
COPY_LAYER_REFERENCE_ACTION
public static final int COPY_LAYER_REFERENCE_ACTIONThe ID for thecreateAction
method that represents the action to adapt the world reference of the view so that the projection and geodetic datum match with that of the model of the selected layer. As a result, no projection or geodetic datum transformations are required when painting that specific layer, resulting in faster paint times (for that layer). This is especially true for raster data (imagery), where those transformations are computationally expensive (called warping).- See Also:
-
SCALE_TO_RASTER_ACTION
public static final int SCALE_TO_RASTER_ACTIONThe ID for thecreateAction
method that represents the action to adjust the map scale so that it matches with the raster data of the selected layer. As a result, one pixel on screen approximately matches with one pixel of the raster data. If invoked afterCOPY_LAYER_REFERENCE_ACTION
, one pixel on screen matches exactly with one pixel of the raster data.- See Also:
-
LAYER_PROPERTIES_ACTION
public static final int LAYER_PROPERTIES_ACTIONThe ID for thecreateAction
method that represents the action to show the layer properties of the selected layer(s). It does so using theILcyCustomizerPanelFactory
s available in theTLcyUserInterfaceManager
for an object of typeTLcyLayerContext
.- See Also:
-
DELETE_LAYER_ACTION
public static final int DELETE_LAYER_ACTIONThe ID for thecreateAction
method that represents the action to delete the selected layer(s).- See Also:
-
LAYER_VISIBLE_ACTIVE_SETTABLE
public static final int LAYER_VISIBLE_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the visible property of the selected layer(s).- See Also:
-
LAYER_SELECTABLE_ACTIVE_SETTABLE
public static final int LAYER_SELECTABLE_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the selectable property of the selected layer(s).- See Also:
-
LAYER_EDITABLE_ACTIVE_SETTABLE
public static final int LAYER_EDITABLE_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the editable property of the selected layer(s).- See Also:
-
LAYER_LABELED_ACTIVE_SETTABLE
public static final int LAYER_LABELED_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the labeled property of the selected layer(s).- See Also:
-
LAYER_LABEL_DECONFLICTION_ACTIVE_SETTABLE
public static final int LAYER_LABEL_DECONFLICTION_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the label deconfliction property of the selected layer(s).- See Also:
-
LAYER_SNAPPABLE_ACTIVE_SETTABLE
public static final int LAYER_SNAPPABLE_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the snappable property of the selected layer(s).- See Also:
-
TOGGLE_TREE_ACTIVE_SETTABLE
public static final int TOGGLE_TREE_ACTIVE_SETTABLEThe ID for thecreateActiveSettable
method that represents the active settable to toggle the layer view between the hierarchical structure (seeLAYER_TREE_COMPONENT
) and the flat list (seeLAYER_LIST_COMPONENT
).- See Also:
-
DELETE_LAYER_ACTION_ENABLED_FILTER
public static final int DELETE_LAYER_ACTION_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the delete layer action.- See Also:
-
LAYER_VISIBLE_ACTIVE_SETTABLE_ENABLED_FILTER
public static final int LAYER_VISIBLE_ACTIVE_SETTABLE_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer visible active settable.- See Also:
-
LAYER_SELECTABLE_ACTIVE_SETTABLE_ENABLED_FILTER
public static final int LAYER_SELECTABLE_ACTIVE_SETTABLE_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer selectable active settable.- See Also:
-
LAYER_EDITABLE_ACTIVE_SETTABLE_ENABLED_FILTER
public static final int LAYER_EDITABLE_ACTIVE_SETTABLE_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer editable active settable.- See Also:
-
LAYER_LABELED_ACTIVE_SETTABLE_ENABLED_FILTER
public static final int LAYER_LABELED_ACTIVE_SETTABLE_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer labeled active settable.- See Also:
-
LAYER_LABEL_DECONFLICTION_ACTIVE_SETTABLE_ENABLED_FILTER
public static final int LAYER_LABEL_DECONFLICTION_ACTIVE_SETTABLE_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer label decluttering active settable.- See Also:
-
LAYER_SNAPPABLE_ACTIVE_SETTABLE_ENABLED_FILTER
public static final int LAYER_SNAPPABLE_ACTIVE_SETTABLE_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer snappable active settable.- See Also:
-
LAYER_PROPERTIES_ACTION_ENABLED_FILTER
public static final int LAYER_PROPERTIES_ACTION_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the layer properties action.- See Also:
-
FIT_TO_LAYER_ACTION_ENABLED_FILTER
public static final int FIT_TO_LAYER_ACTION_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the fit to layer action.- See Also:
-
COPY_LAYER_REFERENCE_ACTION_ENABLED_FILTER
public static final int COPY_LAYER_REFERENCE_ACTION_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the copy layer reference action.- See Also:
-
SCALE_TO_RASTER_ACTION_ENABLED_FILTER
public static final int SCALE_TO_RASTER_ACTION_ENABLED_FILTERThe ID for thecreateEnabledFilter
method that represents theILcdFilter
to enable or disable the scale to raster action.- See Also:
-
DELETE_COMPONENT
public static final int DELETE_COMPONENTThe ID for thecreateComponent
method that represents theComponent
to delete the selected layers. It is different from theDELETE_LAYER_ACTION
in that it is a button itself. By default, this component is configured not to be inserted in the UI.- See Also:
-
LAYER_LIST_COMPONENT
public static final int LAYER_LIST_COMPONENTThe ID for the
createComponent
method that represents theComponent
to show a flat view on the layers of the view, as they are retrieved using theILcdLayered
interface.The creation of this component is performed in parts, please refer to the constants that are prefixed with
LAYER_LIST_COMPONENT
for more information.- See Also:
-
LAYER_TREE_COMPONENT
public static final int LAYER_TREE_COMPONENTThe ID for the
createComponent
method that represents theComponent
to show a hierarchical view on the layers of the view.The creation of this component is performed in parts, please refer to the constants that are prefixed with
LAYER_TREE_COMPONENT
for more information.- See Also:
-
ACTION_BAR
public static final int ACTION_BARThe ID for thecreateActionBar
method that represents the regularILcyActionBar
, by default the tool bar located at the top of the layer control panel.- See Also:
-
ORDER_ACTION_BAR
public static final int ORDER_ACTION_BARThe ID for thecreateActionBar
method that represents the orderILcyActionBar
, by default the tool bar located at the right side of the layer control panel.- See Also:
-
POPUP_ACTION_BAR
public static final int POPUP_ACTION_BARThe ID for thecreateActionBar
method that represents the popupILcyActionBar
, by default the right click menu of the layer control panel.- See Also:
-
LAYER_TREE_COMPONENT__TREE_MODEL
public static final int LAYER_TREE_COMPONENT__TREE_MODELThe ID for thecreateTreeModel
method that represents the Swing tree model for the hierarchical layer view. This ID represents a part of theLAYER_TREE_COMPONENT
.- See Also:
-
LAYER_LIST_COMPONENT__TREE_MODEL
public static final int LAYER_LIST_COMPONENT__TREE_MODELThe ID for thecreateTreeModel
method that represents the Swing tree model for the flat layer view. This ID represents a part of theLAYER_LIST_COMPONENT
.- See Also:
-
LAYER_TREE_COMPONENT__TREE_CELL_RENDERER
public static final int LAYER_TREE_COMPONENT__TREE_CELL_RENDERERThe ID for thecreateTreeCellRenderer
method that represents the Swing tree cell renderer for the hierarchical layer view. This ID represents a part of theLAYER_TREE_COMPONENT
.- See Also:
-
LAYER_LIST_COMPONENT__TREE_CELL_RENDERER
public static final int LAYER_LIST_COMPONENT__TREE_CELL_RENDERERThe ID for thecreateTreeCellRenderer
method that represents the Swing tree cell renderer for the flat layer view. This ID represents a part of theLAYER_LIST_COMPONENT
.- See Also:
-
LAYER_TREE_COMPONENT__TREE
public static final int LAYER_TREE_COMPONENT__TREEThe ID for thecreateTree
method that represents the SwingJTree
for the hierarchical layer view. This ID represents a part of theLAYER_TREE_COMPONENT
.- See Also:
-
LAYER_LIST_COMPONENT__TREE
public static final int LAYER_LIST_COMPONENT__TREEThe ID for thecreateTree
method that represents the SwingJTree
for the flat layer view. This ID represents a part of theLAYER_LIST_COMPONENT
.- See Also:
-
-
Constructor Details
-
TLcyMapLayerControlFactory
public TLcyMapLayerControlFactory()Creates a new layer control factory. One will have to set theILcyLucyEnv
before using this object. -
TLcyMapLayerControlFactory
Creates a new layer control factory with the givenILcyLucyEnv
.- Parameters:
aLucyEnv
- The lucy environment.
-
TLcyMapLayerControlFactory
Creates a new layer control factory with the givenILcyLucyEnv
and the properties of the config fileaConfigSourceName
.- Parameters:
aLucyEnv
- The lucy environment.aConfigSourceName
- The source name (e.g., file name) of the configuration file. SeesetConfigSourceName(String)
.
-
-
Method Details
-
getLucyEnv
Description copied from interface:ILcyMapLayerControlFactory
Returns the associated lucy environment.- Specified by:
getLucyEnv
in interfaceILcyMapLayerControlFactory
- Returns:
- The associated lucy environment.
-
setLucyEnv
Description copied from interface:ILcyMapLayerControlFactory
Sets the lucy environment.- Specified by:
setLucyEnv
in interfaceILcyMapLayerControlFactory
- Parameters:
aLucyEnv
- The lucy environment.- See Also:
-
getConfigSourceName
Description copied from interface:ILcyMapLayerControlFactory
Returns the configuration source name. Default is null.- Specified by:
getConfigSourceName
in interfaceILcyMapLayerControlFactory
- Returns:
- the configuration source name.
- See Also:
-
setConfigSourceName
Description copied from interface:ILcyMapLayerControlFactory
Sets the configuration source name. This configuration file can be used to allow to configure the behavior of this factory. Note that this is an optional property that can be left null.- Specified by:
setConfigSourceName
in interfaceILcyMapLayerControlFactory
- Parameters:
aConfigSourceName
- The source name (e.g. file name) of the configuration file.- See Also:
-
createMapLayerControl
Creates a newTLcyMapLayerControl
for the given map component. The given map component must be an instance ofTLcyMapComponent
.- Specified by:
createMapLayerControl
in interfaceILcyMapLayerControlFactory
- Parameters:
aMapComponent
- TheTLcyMapComponent
to create a layer control for.- Returns:
- The newly created layer control.
-
createEmptyMapLayerControl
Creates an empty layer control, without any content, buttons or panels.- Parameters:
aMapComponent
- The map component to create the layer control for.- Returns:
- The new layer control.
-
createAndSetLayout
Creates and sets the layout to the given layer control.- Parameters:
aLayerControlSFCT
- The layer control to set the layer to.
-
finalizeCreation
Method called to finalize the creation process. Can be used for clean up tasks etc.- Parameters:
aLayerControl
- The map component under construction.
-
createAction
Creates an action.- Parameters:
aID
- An id defined in this class ending in ACTION.aLayerControl
- The layer control to create the action for.- Returns:
- The newly created action.
-
createActiveSettable
Creates an active settable.- Parameters:
aID
- An id defined in this class ending in ACTIVE_SETTABLE.aLayerControl
- The layer control to create the active settable for.- Returns:
- The newly created active settable.
-
createComponent
Creates a component.- Parameters:
aID
- An id defined in this class ending in COMPONENT.aLayerControl
- The layer control to create the active settable for.- Returns:
- The newly created component.
-
createTree
Creates aJTree
which will be used in the map layer control.- Parameters:
aID
- must beLAYER_TREE_COMPONENT__TREE
orLAYER_LIST_COMPONENT__TREE
aMapLayerControl
- the map layer control to create the tree for- Returns:
- the
JTree
which will be used in the map layer control
-
createTreeModel
Creates theTreeModel
used by theJTree
of the map layer control- Parameters:
aID
- must beLAYER_TREE_COMPONENT__TREE_MODEL
orLAYER_LIST_COMPONENT__TREE_MODEL
aMapLayerControl
- the map layer control- Returns:
- the
TreeModel
used by theJTree
of the map layer control
-
createTreeCellRenderer
Creates theTreeCellRenderer
used by theJTree
of the map layer control- Parameters:
aID
- must beLAYER_TREE_COMPONENT__TREE_CELL_RENDERER
orLAYER_LIST_COMPONENT__TREE_CELL_RENDERER
aMapLayerControl
- the map layer control- Returns:
- the
TreeCellRenderer
used by theJTree
of the map layer control
-
createEnabledFilter
Creates an
ILcdFilter
for the corresponding actions and active settables. If the filter does not accept a layer passed as argument to theILcdFilter.accept(Object)
method (ie. returns false), the corresponding user interface element will be disabled when that layer is selected.This default implementation will always return an
ILcdFilter
that is not null. It is good practice to combine this filter with your filter by using anALcyCompositeFilter
to which you add your filter and the filter returned by this defaut implementation.Following example demonstrates how you could override this method:
protected ILcdFilter<ILcdGXYLayer> createEnabledFilter( int aID, ILcyMapLayerControl aLayerControl ) { switch ( aID ){ // create a filter that will disable the visibility checkbox for specific layers. case LAYER_VISIBLE_ACTIVE_SETTABLE_ENABLED_FILTER: TLcyCompositeAndFilter<ILcdGXYLayer> my_filter = new TLcyCompositeAndFilter<ILcdGXYLayer>(); // Make sure we use the filter created by the super implementation. // This filter will never be
null
. my_filter.addFilter( super.createEnabledFilter( aID, aLayerControl ) ); // do not accept layers that have a model with a MyModelDescriptor as modeldescriptor. my_filter.addFilter( new ILcdFilter<ILcdGXYLayer>(){ public boolean accept( ILcdGXYLayer aLayer ){ return !( aLayer.getModel().getModelDescriptor() instanceof MyModelDescriptor ); } } ); return my_filter; default: return super.createEnabledFilter( aID, aLayerControl ); } }- Parameters:
aID
- The ID indicating for which action or active settable the filter applies. It is an ID defined in this class ending in *_ENABLED_FILTER.aLayerControl
- The layer control for which to create the filter.- Returns:
- An ILcdFilter that determines for which layers the corresponding action will be enabled in the user interface. The default implementation never returns null, but subclasses can and may return null.
-
insertComponentInActionBar
protected void insertComponentInActionBar(int aID, Component aComponent, TLcyMapLayerControl aMapLayerControl) Inserts the given component in the regular action bar (see
TLcyMapLayerControl.getActionBar()
) of the given map layer control. Note that this action bar must be anILcyToolBar
for this method to be able to insert the component.- Parameters:
aID
- The ID that was used to create the component. Must beDELETE_COMPONENT
. Subclasses may choose to accept extra ID's.aComponent
- The component that should be inserted. May benull
.aMapLayerControl
- The map layer control in whose action bar the component should be inserted. This is nevernull
.
-
insertComponentInOrderBar
protected void insertComponentInOrderBar(int aID, Component aComponent, TLcyMapLayerControl aMapLayerControl) Inserts the given component in the order action bar (see
TLcyMapLayerControl.getOrderActionBar()
) of the given map layer control. Note that this action bar must be anILcyToolBar
for this method to be able to insert the component.- Parameters:
aID
- The ID that was used to create the component. Must beDELETE_COMPONENT
. Subclasses may choose to accept extra ID's.aComponent
- The component that should be inserted. May benull
.aMapLayerControl
- The map layer control in whose order action bar the component should be inserted. This is nevernull
.
-
insertComponent
protected void insertComponent(int aID, Component aComponent, TLcyMapLayerControl aLayerControlSFCT) Inserts the given component into the given layer control.- Parameters:
aID
- The id that was used to create aComponent (must end with COMPONENT).aComponent
- The component to insert.aLayerControlSFCT
- The layer control to insert the component into.
-
createActionBar
Creates an empty action bar.- Parameters:
aLayerControl
- The layer control to create the action bar for.- Returns:
- The newly created action bar.
-
createActionBar
Creates an empty action bar.- Parameters:
aID
- The ID of the action bar. Should be one ofACTION_BAR
orORDER_ACTION_BAR
. Subclasses may choose to accept extra ID's.aLayerControl
- The layer control for which to create the action bar. This is nevernull
.- Returns:
- The empty action bar. By default this is not
null
, but subclasses may choose to returnnull
if they want to remove the specified action bar from the layer control.
-
createPopupMenu
Creates an empty popup menu.- Parameters:
aID
- The ID of the requested popup menu. Should bePOPUP_ACTION_BAR
. Subclasses can choose to accept extra ID's.aLayerControl
- The layer control for which to create the popup menu.- Returns:
- The empty popup menu. By default this is not
null
, but subclasses may choose to returnnull
if they want to remove the popup menu from the layer control.
-
insertActionBar
Insert the given action bar into the given layer control.
Note that this method is here primarily for backwards compatibility reasons. Instead of overriding this method, you should override
insertActionBar(int, com.luciad.lucy.gui.ILcyActionBar, com.luciad.lucy.map.TLcyMapLayerControl)
which was added in a later release.- Parameters:
aActionBar
- The action bar to insert.aLayerControlSFCT
- The layer control to insert the action bar into.
-
insertActionBar
protected void insertActionBar(int aID, ILcyActionBar aActionBar, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action bar into the given layer control.
In case the ID is
ACTION_BAR
, this method delegates the insertion to theinsertActionBar(com.luciad.lucy.gui.ILcyActionBar, TLcyMapLayerControl)
method for backwards compatibility reasons. Note that subclasses may choose not to do this.- Parameters:
aID
- The ID of the given action bar. Should be one ofACTION_BAR
orORDER_ACTION_BAR
. Subclasses may choose to accept extra ID's.aActionBar
- The action bar to insert. This may benull
.aLayerControlSFCT
- The layer control to insert the action bar into. This is nevernull
.
-
insertAction
Inserts the given action into the action bar, order bar and popup menu of the given layer control. It does this by delegating to theinsertActionIn...
methods.- Parameters:
aID
- The id that was used to create the action. Must be one of the constants defined in this class that ends with_ACTION
. Subclasses may choose to accept extra ID's.aAction
- The action to insert. This may benull
.aLayerControlSFCT
- The layer control to insert the action into. This is nevernull
- See Also:
-
insertActionInActionBar
protected void insertActionInActionBar(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the regular action bar of the given layer control.- Parameters:
aID
- The ID that was used to create the action. Must be one of the constants defined in this class that ends with_ACTION
. Subclasses may choose to accept extra ID's.aAction
- The action to insert. This may benull
.aLayerControlSFCT
- The layer control in whose action bar the action should be inserted. This is nevernull
.
-
insertActionInOrderBar
protected void insertActionInOrderBar(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the order action bar of the given layer control.- Parameters:
aID
- The ID that was used to create the action. Must be one of the constants defined in this class that ends with_ACTION
. Subclasses may choose to accept extra ID's.aAction
- The action to insert. This may benull
.aLayerControlSFCT
- The layer control in whose order bar the action should be inserted. This is nevernull
.
-
insertActionInPopupMenu
protected void insertActionInPopupMenu(int aID, ILcdAction aAction, TLcyMapLayerControl aLayerControlSFCT) Inserts the given action into the popup menu of the given layer control.- Parameters:
aID
- The ID that was used to create the action. Must be one of the constants defined in this class that ends with_ACTION
. Subclasses may choose to accept extra ID's.aAction
- The action to insert. This may benull
.aLayerControlSFCT
- The layer control in whose popup menu the action should be inserted. This is nevernull
.
-
insertActiveSettable
protected void insertActiveSettable(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the action bar, order bar and popup menu of the given layer control. It does this by delegating to theinsertActiveSettableIn...
methods- Parameters:
aID
- The id that was used to create the active settable (must end with ACTIVE_SETTABLE).aActiveSettable
- The active settable to insert.aLayerControlSFCT
- The layer control to insert the active settable into.- See Also:
-
insertActiveSettableInActionBar
protected void insertActiveSettableInActionBar(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the regular action bar of the given layer control.- Parameters:
aID
- The ID that was used to create the active settable. Must be one of the constants defined in this class that ends with_ACTIVE_SETTABLE
. Subclasses may choose to accept extra ID's.aActiveSettable
- The active settable to insert. This may benull
.aLayerControlSFCT
- The layer control in whose action bar the active settable should be inserted. This is nevernull
.
-
insertActiveSettableInOrderBar
protected void insertActiveSettableInOrderBar(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the order action bar of the given layer control.- Parameters:
aID
- The ID that was used to create the active settable. Must be one of the constants defined in this class that ends with_ACTIVE_SETTABLE
. Subclasses may choose to accept extra ID's.aActiveSettable
- The active settable to insert. This may benull
.aLayerControlSFCT
- The layer control in whose order bar the active settable should be inserted. This is nevernull
.
-
insertActiveSettableInPopupMenu
protected void insertActiveSettableInPopupMenu(int aID, ILcyActiveSettable aActiveSettable, TLcyMapLayerControl aLayerControlSFCT) Inserts the given active settable into the popup menu of the given layer control.- Parameters:
aID
- The ID that was used to create the active settable. Must be one of the constants defined in this class that ends with_ACTIVE_SETTABLE
. Subclasses may choose to accept extra ID's.aActiveSettable
- The active settable to insert. This may benull
.aLayerControlSFCT
- The layer control in whose popup menu the active settable should be inserted. This is nevernull
.
-