Class TLcyMapOverviewComponentFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAn action that allows to add slave views.static final intA controller that combines zoom, pan, overview and recentre.static final intA controller that combines zoom, pan, overview and recentre.static final intActive settable that toggles the visibility state of the layer control.static final StringThe help ID for map overviews.static final intThe standard overview controller.static final intThe standard overview controller.static final intstatic final intAn 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
ConstructorsConstructorDescriptionCreates a newTLcyMapOverviewComponentFactory.TLcyMapOverviewComponentFactory(ILcyLucyEnv aLucyEnv) Creates a newTLcyMapOverviewComponentFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdActioncreateAction(int aID, TLcyMapComponent aMapComponent) Override: don't create the delete selection and edit current projection actions.protected ILcyActiveSettablecreateActiveSettable(int aID, TLcyMapComponent aMapComponent) OverwritescreateActiveSettableto create an active settable for LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE as well.protected ComponentcreateComponent(int aID, TLcyMapComponent aMapComponent) Override: Don't create status bar.protected ContainercreateContainer(int aID, TLcyMapComponent aMapComponent) Creates a container for the given ID.protected ILcdGXYControllercreateGXYController(int aID, TLcyMapComponent aMapComponent) Override:Create combined controller and overview controller.protected ILcyActiveSettablecreateGXYControllerActiveSettable(int aID, ILcdGXYController aController, TLcyMapComponent aMapComponent) Creates an active settable to toggle the given controller.protected ILcdGXYLayercreateGXYLayer(int aID, TLcyMapComponent aMapComponent) Override: create grid layer without labels and create overview layer.protected ILcdGXYViewcreateGXYView(TLcyMapComponent aMapComponent) Creates the mainILcdGXYViewfor the given map component.protected ILcdBoundscreateInitialMapBounds(TLcyMapComponent aMapComponent) Create the initial bounds for the map in the WGS 84 reference system.Creates and initializes a newTLcyMapComponent.protected StringcreateMapName(TLcyMapComponent aMapComponent) Creates a map name for the given map.protected ILcyMenuBarcreateMenuBar(TLcyMapComponent aMapComponent) Override: returns null if 'map_overview.create_toolbar' is false.protected ILcyToolBarcreateRightToolBar(TLcyMapComponent aMapComponent) Creates a tool bar for the given map component, which will be placed on the north-east side by default.protected ILcyToolBarcreateToolBar(TLcyMapComponent aMapComponent) Override: returns null if 'map_overview.create_toolbar' is false.protected voidfinalizeCreation(TLcyMapComponent aMapComponent) Method called to finalize the creation process.Returns the TLcyMapOverviewAddOn associated with this factory.protected voidinsertActionInMenu(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT) Inserts the given action with the given ID in the menu bar of the given map.protected voidinsertActionInToolBar(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT) Inserts the given action with the given ID in the toolbar of the given map.protected voidinsertActiveSettableInMenu(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT) Inserts the given active settable into the menu bar of the given map component.protected voidinsertActiveSettableInToolBar(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT) Inserts the given active settable into the toolbar of the given map component.protected voidinsertComponent(int aID, Component aComponent, TLcyMapComponent aMapComponentSFCT) Inserts the given component into the given map component.booleanIf true, all maps that are added to the application's MapManager will be added to the overview as well (except for the overview itself).booleanIf true, the overview automatically recentres when the slave view changes.static booleanDeprecated.This method has been deprecated.voidsetAutoAddMaps(boolean aAutoAddMaps) If true, maps are added and removed automatically to/from the overview.voidsetAutoRecentreOverview(boolean aAutoRecentreOverview) True if the overview automatically recentres when the slave view changes.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidSets 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 aILcyLucyEnvbefore this instance can be used. -
TLcyMapOverviewComponentFactory
Creates a newTLcyMapOverviewComponentFactory.- Parameters:
aLucyEnv- The Lucy environment.
-
-
Method Details
-
createMapComponent
Description copied from class:TLcyMapComponentFactoryCreates 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:
createMapComponentin classTLcyMapComponentFactory- Returns:
- a newly created and initialized
TLcyMapComponent.
-
insertActionInMenu
Description copied from class:TLcyMapComponentFactoryInserts the given action with the given ID in the menu bar of the given map.- Overrides:
insertActionInMenuin 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:TLcyMapComponentFactoryMethod called to finalize the creation process. Can be used for clean up tasks etc.- Overrides:
finalizeCreationin 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.cfgfor 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.cfgfor 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:
createMenuBarin classTLcyMapComponentFactory- Parameters:
aMapComponent- The map component to create a menu bar for.- Returns:
- The menu bar, or null.
-
createGXYView
Description copied from class:TLcyMapComponentFactoryCreates the main
ILcdGXYViewfor the given map component. The view is based on theILcdTreeLayeredSupportcreated inTLcyMapComponentFactory.createTreeLayeredSupport(TLcyMapComponent).Note that if for example a
TLcdMapJPanelis created, one should callTLcdMapJPanel#setGXYLayerFactory(getLucyEnv().getCompositeGXYLayerFactory()). Optionally, thesetMinScaleandsetMaxScalecan 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:
createGXYViewin 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:
createActionin 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:
createGXYLayerin 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:
createComponentin 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:TLcyMapComponentFactoryInserts the given component into the given map component.- Overrides:
insertComponentin 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:TLcyMapComponentFactoryCreates a map name for the given map.- Overrides:
createMapNamein classTLcyMapComponentFactory- Parameters:
aMapComponent- The map component under construction.- Returns:
- a map name.
-
createToolBar
Override: returns null if 'map_overview.create_toolbar' is false.- Overrides:
createToolBarin classTLcyMapComponentFactory- Parameters:
aMapComponent- The map component under construction.- Returns:
- The toolbar, or null.
- See Also:
-
createRightToolBar
Description copied from class:TLcyMapComponentFactoryCreates 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:
createRightToolBarin 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:
createGXYControllerin 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:
insertActiveSettableInToolBarin 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:TLcyMapComponentFactoryInserts the given active settable into the menu bar of the given map component.- Overrides:
insertActiveSettableInMenuin 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:TLcyMapComponentFactoryCreates an active settable to toggle the given controller.- Overrides:
createGXYControllerActiveSettablein 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
OverwritescreateActiveSettableto create an active settable for LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE as well.- Overrides:
createActiveSettablein classTLcyMapComponentFactory- Parameters:
aID- see super.aMapComponent- see super.- Returns:
- see super.
-
createContainer
Description copied from class:TLcyMapComponentFactoryCreates a container for the given ID.- Overrides:
createContainerin 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:TLcyMapComponentFactoryCreate 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
nullto 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.restoreMapBoundsin config fileconfig/lucy/map/map_addon.cfg- Overrides:
createInitialMapBoundsin 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.Returnstrueif 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 istruethen 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.
-