Class TLcyMapOverviewComponentFactory
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
An action that allows to add slave views.static final int
A controller that combines zoom, pan, overview and recentre.static final int
A controller that combines zoom, pan, overview and recentre.static final int
Active settable that toggles the visibility state of the layer control.static final String
The help ID for map overviews.static final int
The standard overview controller.static final int
The standard overview controller.static final int
static final int
An action that allows to remove slave views.Fields inherited from class com.luciad.lucy.map.TLcyMapComponentFactory
ALBERS_EQUAL_AREA_CONIC_PROJECTION_ACTIVE_SETTABLE, AREA_OF_INTEREST_LAYER, CASSINI_PROJECTION_ACTIVE_SETTABLE, CENTER_CONTAINER, CENTER_SELECTION_ACTION, CHANGE_BACKGROUND_COLOR_ACTION, CLOSE_MAP_ACTION, CONTINUOUS_ZOOM_CONTROLLER, CONTINUOUS_ZOOM_CONTROLLER_ACTIVE_SETTABLE, CONTROLLER_HELP_ID_PREFIX, CONTROLLER_MENU, CONTROLLERS_GROUP_DESCRIPTOR, COPY_LAST_CLICKED_COORDINATE_ACTION, COPY_LAYERS_ACTION, COPY_POINT_COORDINATE_ACTION, DELETE_SELECTION_ACTION, EAST_CONTAINER, EDIT_CURRENT_PROJECTION_ACTION, EDIT_MAP_COMPONENT_ACTION, ELLIPSOIDAL_EQUIDISTANT_CYLINDRICAL_PROJECTION_ACTIVE_SETTABLE, EQUIDISTANT_CYLINDRICAL_PROJECTION_ACTIVE_SETTABLE, FILE_MENU, FIT_SELECTION_ACTION, FULL_SCREEN_ACTIVE_SETTABLE, FULL_SCREEN_GROUP_DESCRIPTOR, GLOBAL_LABEL_DECONFLICTION_ACTIVE_SETTABLE, GNOMONIC_PROJECTION_ACTIVE_SETTABLE, GRID_LAYER, LAMBERT_AZIMUTHAL_EQUAL_AREA_PROJECTION_ACTIVE_SETTABLE, LAMBERT_CONFORMAL_PROJECTION_ACTIVE_SETTABLE, LAYER_CONTROL_COMPONENT, LOGO_ICON_COMPONENT, MAGNIFIER_CONTROLLER, MAGNIFIER_CONTROLLER_ACTIVE_SETTABLE, MAP_HELP_ID, MAP_MENU, MAP_SCALE_LABEL_COMPONENT, MERCATOR_PROJECTION_ACTIVE_SETTABLE, MOUSE_LOCATION_ACTIVE_SETTABLE, MOUSE_LOCATION_COMPONENT, NAVIGATE_CONTROLLER, NAVIGATION_CONTROL_ACTIVE_SETTABLE, NAVIGATION_CONTROL_COMPONENT, NORTH_CONTAINER, OBLIQUE_MERCATOR_PROJECTION_ACTIVE_SETTABLE, OPEN_FILE_ACTION, OPEN_SAVE_GROUP_DESCRIPTOR, ORTOGRAPHIC_PROJECTION_ACTIVE_SETTABLE, PAN_CONTROLLER, PAN_CONTROLLER_ACTIVE_SETTABLE, POLAR_STEREOGRAPHIC_NORTH_PROJECTION_ACTIVE_SETTABLE, POLAR_STEREOGRAPHIC_SOUTH_PROJECTION_ACTIVE_SETTABLE, PROJECTION_CHOICE_COMPONENT, PROJECTION_GROUP_DESCRIPTOR, PROJECTION_MENU, PSEUDO_MERCATOR_PROJECTION_ACTIVE_SETTABLE, RECENTER_CONTROLLER, RECENTER_CONTROLLER_ACTIVE_SETTABLE, RULER_CONTROLLER, RULER_CONTROLLER_ACTIVE_SETTABLE, SAVE_AS_FILE_ACTION, SAVE_LAYER_ACTION, SAVE_LAYER_AS_ACTION, SAVE_TO_FILE_ACTION, SAVE_VIEW_AS_IMAGE_ACTION, SCALE_ICON, SELECT_CONTROLLER, SELECT_CONTROLLER_ACTIVE_SETTABLE, SHOW_SCALE_ICON_ACTIVE_SETTABLE, SIMPLE_RECTANGULAR_PROJECTION_ACTIVE_SETTABLE, SOUTH_CONTAINER, STATUS_BAR_COMPONENT, STEREOGRAPHIC_PROJECTION_ACTIVE_SETTABLE, TOUCH_NAVIGATE_CONTROLLER, TOUCH_NAVIGATE_CONTROLLER_ACTIVE_SETTABLE, TOUCH_RULER_CONTROLLER, TOUCH_RULER_CONTROLLER_ACTIVE_SETTABLE, TOUCH_SELECT_CONTROLLER, TOUCH_SELECT_CONTROLLER_ACTIVE_SETTABLE, TRANSVERSE_MERCATOR_PROJECTION_ACTIVE_SETTABLE, WEST_CONTAINER, ZOOM_CONTROLLER, ZOOM_CONTROLLER_ACTIVE_SETTABLE
-
Constructor Summary
ConstructorDescriptionCreates a newTLcyMapOverviewComponentFactory
.TLcyMapOverviewComponentFactory
(ILcyLucyEnv aLucyEnv) Creates a newTLcyMapOverviewComponentFactory
. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdAction
createAction
(int aID, TLcyMapComponent aMapComponent) Override: don't create the delete selection and edit current projection actions.protected ILcyActiveSettable
createActiveSettable
(int aID, TLcyMapComponent aMapComponent) OverwritescreateActiveSettable
to create an active settable for LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE as well.protected Component
createComponent
(int aID, TLcyMapComponent aMapComponent) Override: Don't create status bar.protected Container
createContainer
(int aID, TLcyMapComponent aMapComponent) Creates a container for the given ID.protected ILcdGXYController
createGXYController
(int aID, TLcyMapComponent aMapComponent) Override:Create combined controller and overview controller.protected ILcyActiveSettable
createGXYControllerActiveSettable
(int aID, ILcdGXYController aController, TLcyMapComponent aMapComponent) Creates an active settable to toggle the given controller.protected ILcdGXYLayer
createGXYLayer
(int aID, TLcyMapComponent aMapComponent) Override: create grid layer without labels and create overview layer.protected ILcdGXYView
createGXYView
(TLcyMapComponent aMapComponent) Creates the mainILcdGXYView
for the given map component.protected ILcdBounds
createInitialMapBounds
(TLcyMapComponent aMapComponent) Create the initial bounds for the map in the WGS 84 reference system.Creates and initializes a newTLcyMapComponent
.protected String
createMapName
(TLcyMapComponent aMapComponent) Creates a map name for the given map.protected ILcyMenuBar
createMenuBar
(TLcyMapComponent aMapComponent) Override: returns null if 'map_overview.create_toolbar' is false.protected ILcyToolBar
createRightToolBar
(TLcyMapComponent aMapComponent) Creates a tool bar for the given map component, which will be placed on the north-east side by default.protected ILcyToolBar
createToolBar
(TLcyMapComponent aMapComponent) Override: returns null if 'map_overview.create_toolbar' is false.protected void
finalizeCreation
(TLcyMapComponent aMapComponent) Method called to finalize the creation process.Returns the TLcyMapOverviewAddOn associated with this factory.protected void
insertActionInMenu
(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT) Inserts the given action with the given ID in the menu bar of the given map.protected void
insertActionInToolBar
(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT) Inserts the given action with the given ID in the toolbar of the given map.protected void
insertActiveSettableInMenu
(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT) Inserts the given active settable into the menu bar of the given map component.protected void
insertActiveSettableInToolBar
(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT) Inserts the given active settable into the toolbar of the given map component.protected void
insertComponent
(int aID, Component aComponent, TLcyMapComponent aMapComponentSFCT) Inserts the given component into the given map component.boolean
If true, all maps that are added to the application's MapManager will be added to the overview as well (except for the overview itself).boolean
If true, the overview automatically recentres when the slave view changes.static boolean
Deprecated.This method has been deprecated.void
setAutoAddMaps
(boolean aAutoAddMaps) If true, maps are added and removed automatically to/from the overview.void
setAutoRecentreOverview
(boolean aAutoRecentreOverview) True if the overview automatically recentres when the slave view changes.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
Sets the TLcyMapOverviewAddOn associated with this factory.Methods inherited from class com.luciad.lucy.map.TLcyMapComponentFactory
addNumberToMapNameIfNeeded, createBalloonManager, createEmptyMapComponent, createGXYLayerOrderManager, createIcon, createOnMapActionBar, createPopupMenu, createRootNode, createStatusBar, createTreeLayeredSupport, getConfigPrefix, getConfigSourceName, getLucyEnv, getMapLayerControlFactory, insertActionInPopupMenu, insertContainer, insertGXYController, insertGXYLayer, insertIcon, setConfigPrefix, setConfigSourceName, setGXYLayerOrderManager, setGXYView, setInitialMapBounds, setLucyEnv, setMapLayerControlFactory, setMapName, setMenuBar, setPopupMenu, setRightToolBar, setToolBar
-
Field Details
-
MAP_OVERVIEW_HELP_ID
The help ID for map overviews. Note that this variable overrides the variable of the super class.- See Also:
-
OVERVIEW_CONTROLLER
public static final int OVERVIEW_CONTROLLERThe standard overview controller.- See Also:
-
OVERVIEW_CONTROLLER_ACTIVE_SETTABLE
public static final int OVERVIEW_CONTROLLER_ACTIVE_SETTABLEThe standard overview controller.- See Also:
-
LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE
public static final int LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLEActive settable that toggles the visibility state of the layer control.- See Also:
-
ADD_SLAVEVIEW_ACTION
public static final int ADD_SLAVEVIEW_ACTIONAn action that allows to add slave views. Every slave view is represented by its bounds. This action is disabled by default (in the config file).- See Also:
-
REMOVE_SLAVEVIEW_ACTION
public static final int REMOVE_SLAVEVIEW_ACTIONAn action that allows to remove slave views. This action is disabled by default (in the config file).- See Also:
-
OVERVIEW_LAYER
public static final int OVERVIEW_LAYER- See Also:
-
COMBINED_CONTROLLER
public static final int COMBINED_CONTROLLERA controller that combines zoom, pan, overview and recentre.- See Also:
-
COMBINED_CONTROLLER_ACTIVE_SETTABLE
public static final int COMBINED_CONTROLLER_ACTIVE_SETTABLEA controller that combines zoom, pan, overview and recentre.- See Also:
-
-
Constructor Details
-
TLcyMapOverviewComponentFactory
public TLcyMapOverviewComponentFactory()Creates a newTLcyMapOverviewComponentFactory
. Note that you will have to set aILcyLucyEnv
before this instance can be used. -
TLcyMapOverviewComponentFactory
Creates a newTLcyMapOverviewComponentFactory
.- Parameters:
aLucyEnv
- The Lucy environment.
-
-
Method Details
-
createMapComponent
Description copied from class:TLcyMapComponentFactory
Creates and initializes a newTLcyMapComponent
. It will invoke all create, set and insert methods with the correct arguments to build a map component together. See top comment for more detailed information.- Overrides:
createMapComponent
in classTLcyMapComponentFactory
- Returns:
- a newly created and initialized
TLcyMapComponent
.
-
insertActionInMenu
Description copied from class:TLcyMapComponentFactory
Inserts the given action with the given ID in the menu bar of the given map.- Overrides:
insertActionInMenu
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the action to add. This is a constant that ends inACTION
.aAction
- The action to add.aMapComponentSFCT
- The map component under construction.
-
finalizeCreation
Description copied from class:TLcyMapComponentFactory
Method called to finalize the creation process. Can be used for clean up tasks etc.- Overrides:
finalizeCreation
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component under construction.
-
isAutoAddMaps
public boolean isAutoAddMaps()If true, all maps that are added to the application's MapManager will be added to the overview as well (except for the overview itself). If a map is removed from the application, it is also removed from the overview.- Returns:
- True to add and remove maps automatically.
- See Also:
-
setAutoAddMaps
public void setAutoAddMaps(boolean aAutoAddMaps) If true, maps are added and removed automatically to/from the overview.
Note that this factory allows much more customization by specifying a configuration file using
TLcyMapComponentFactory.setConfigSourceName(String)
. Please refer tolucy/map/mapoverview_addon.cfg
for more documentation about the properties that can be specified.- Parameters:
aAutoAddMaps
- If true, maps are added and removed automatically to/from the overview.- See Also:
-
isAutoRecentreOverview
public boolean isAutoRecentreOverview()If true, the overview automatically recentres when the slave view changes.- Returns:
- True if the overview automatically recentres when the slave view changes.
- See Also:
-
setAutoRecentreOverview
public void setAutoRecentreOverview(boolean aAutoRecentreOverview) True if the overview automatically recentres when the slave view changes.
Note that this factory allows much more customization by specifying a configuration file using
TLcyMapComponentFactory.setConfigSourceName(String)
. Please refer tolucy/map/mapoverview_addon.cfg
for more documentation about the properties that can be specified.- Parameters:
aAutoRecentreOverview
- True if the overview recentres automatically.
-
createMenuBar
Override: returns null if 'map_overview.create_toolbar' is false.- Overrides:
createMenuBar
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component to create a menu bar for.- Returns:
- The menu bar, or null.
-
createGXYView
Description copied from class:TLcyMapComponentFactory
Creates the main
ILcdGXYView
for the given map component. The view is based on theILcdTreeLayeredSupport
created inTLcyMapComponentFactory.createTreeLayeredSupport(TLcyMapComponent)
.Note that if for example a
TLcdMapJPanel
is created, one should callTLcdMapJPanel#setGXYLayerFactory(getLucyEnv().getCompositeGXYLayerFactory())
. Optionally, thesetMinScale
andsetMaxScale
can be set.If desired, the background color should be set on the view. Note that when a workspace is loaded, that workspace value takes precedence.
- Overrides:
createGXYView
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component under construction.- Returns:
- The newly create gxy view. This must not be null!
- See Also:
-
createAction
Override: don't create the delete selection and edit current projection actions. Creates Add/remove slave view actions.- Overrides:
createAction
in classTLcyMapComponentFactory
- Parameters:
aID
- The id describing which action to create. This is a constant that ends inACTION
.aMapComponent
- The map component under construction.- Returns:
- The newly created action, or null.
-
createGXYLayer
Override: create grid layer without labels and create overview layer. Do not create area of interest layer.- Overrides:
createGXYLayer
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the layer to create. This is a constant that ends inLAYER
.aMapComponent
- The map component under construction.- Returns:
- The newly created layer, or null.
-
createComponent
Override: Don't create status bar. Projection choice component and scale label are not created if there is no toolbar (see config file propertycreate_toolbar
).- Overrides:
createComponent
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the component to create. This is a constant that ends inCOMPONENT
.aMapComponent
- The map component under construction.- Returns:
- The newly created component, or null.
-
insertComponent
Description copied from class:TLcyMapComponentFactory
Inserts the given component into the given map component.- Overrides:
insertComponent
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the component to insert. This is a constant that ends inCOMPONENT
.aComponent
- The component to insert.aMapComponentSFCT
- The map component to insert the component into.
-
setMapOverviewAddOn
Sets the TLcyMapOverviewAddOn associated with this factory.- Parameters:
aAddon
- The addon that should be associated with this factory- See Also:
-
getMapOverviewAddOn
Returns the TLcyMapOverviewAddOn associated with this factory.- Returns:
- The TLcyMapOverviewAddOn associated with this factory.
- See Also:
-
createMapName
Description copied from class:TLcyMapComponentFactory
Creates a map name for the given map.- Overrides:
createMapName
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component under construction.- Returns:
- a map name.
-
createToolBar
Override: returns null if 'map_overview.create_toolbar' is false.- Overrides:
createToolBar
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component under construction.- Returns:
- The toolbar, or null.
- See Also:
-
createRightToolBar
Description copied from class:TLcyMapComponentFactory
Creates a tool bar for the given map component, which will be placed on the north-east side by default. This tool bar can be used for inserting actions/active settables which should be aligned at the north-east side instead of the north-west side.
- Overrides:
createRightToolBar
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component under construction- Returns:
- The tool bar, or
null
- See Also:
-
createGXYController
Override:Create combined controller and overview controller.- Overrides:
createGXYController
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the controller to create. This is a constant that ends inCONTROLLER
.aMapComponent
- The map component under construction.- Returns:
- The newly created controller, or null.
-
insertActiveSettableInToolBar
protected void insertActiveSettableInToolBar(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT) Inserts the given active settable into the toolbar of the given map component.- Overrides:
insertActiveSettableInToolBar
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the active settable to insert.aActiveSettable
- The active settable to insert into the toolbar.aMapComponentSFCT
- The map component into whose toolbar the active settable will be inserted.
-
insertActiveSettableInMenu
protected void insertActiveSettableInMenu(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT) Description copied from class:TLcyMapComponentFactory
Inserts the given active settable into the menu bar of the given map component.- Overrides:
insertActiveSettableInMenu
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the active settable to insert. This is a constant that ends inACTIVE_SETTABLE
.aActiveSettable
- The active settable to insert into the menu.aMapComponentSFCT
- The map component into whose menu bar the active settable will be inserted.
-
insertActionInToolBar
protected void insertActionInToolBar(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT) Inserts the given action with the given ID in the toolbar of the given map.- Parameters:
aID
- The ID of the action to add.aAction
- The action to add.aMapComponentSFCT
- The map component under construction.
-
createGXYControllerActiveSettable
protected ILcyActiveSettable createGXYControllerActiveSettable(int aID, ILcdGXYController aController, TLcyMapComponent aMapComponent) Description copied from class:TLcyMapComponentFactory
Creates an active settable to toggle the given controller.- Overrides:
createGXYControllerActiveSettable
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the controller to create an active settable for, this is a constant that ends inCONTROLLER_ACTIVE_SETTABLE
.aController
- The controller to create an active settable for.aMapComponent
- The map component under construction.- Returns:
- The newly created active settable, or null.
-
createActiveSettable
OverwritescreateActiveSettable
to create an active settable for LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE as well.- Overrides:
createActiveSettable
in classTLcyMapComponentFactory
- Parameters:
aID
- see super.aMapComponent
- see super.- Returns:
- see super.
-
createContainer
Description copied from class:TLcyMapComponentFactory
Creates a container for the given ID.- Overrides:
createContainer
in classTLcyMapComponentFactory
- Parameters:
aID
- The ID of the container to create. This is a constant that ends inCONTAINER
.aMapComponent
- The map component under construction.- Returns:
- The newly created container, or null.
-
createInitialMapBounds
Description copied from class:TLcyMapComponentFactory
Create the initial bounds for the map in the WGS 84 reference system. The map is fit so that at least the given area is visible. Return
null
to avoid any fit operation.Please note that this information is also stored in a workspace, so if a workspace is loaded, the value given here will be ignored. This behavior can be changed, see property
.TLcyMapAddOn.workspaceCodec.restoreMapBounds
in config fileconfig/lucy/map/map_addon.cfg
- Overrides:
createInitialMapBounds
in classTLcyMapComponentFactory
- Parameters:
aMapComponent
- The map component under construction.- Returns:
- the bounds
-
isClassTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setClassTraceOn
Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-