public class TLcyMapOverviewComponentFactory extends TLcyMapComponentFactory
Modifier and Type | Field and Description |
---|---|
static int |
ADD_SLAVEVIEW_ACTION
An action that allows to add slave views.
|
static int |
COMBINED_CONTROLLER
A controller that combines zoom, pan, overview and recentre.
|
static int |
COMBINED_CONTROLLER_ACTIVE_SETTABLE
A controller that combines zoom, pan, overview and recentre.
|
static int |
LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE
Active settable that toggles the visibility state of the layer control.
|
static String |
MAP_OVERVIEW_HELP_ID
The help ID for map overviews.
|
static int |
OVERVIEW_CONTROLLER
The standard overview controller.
|
static int |
OVERVIEW_CONTROLLER_ACTIVE_SETTABLE
The standard overview controller.
|
static int |
OVERVIEW_LAYER |
static int |
REMOVE_SLAVEVIEW_ACTION
An action that allows to remove slave views.
|
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 and Description |
---|
TLcyMapOverviewComponentFactory()
Creates a new
TLcyMapOverviewComponentFactory . |
TLcyMapOverviewComponentFactory(ILcyLucyEnv aLucyEnv)
Creates a new
TLcyMapOverviewComponentFactory . |
Modifier and Type | Method and Description |
---|---|
protected 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)
Overwrites
createActiveSettable 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 main
ILcdGXYView for the given map component. |
protected ILcdBounds |
createInitialMapBounds(TLcyMapComponent aMapComponent)
Create the initial bounds for the map in the WGS 84 reference system.
|
ILcyMapComponent |
createMapComponent()
Creates and initializes a new
TLcyMapComponent . |
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.
|
TLcyMapOverviewAddOn |
getMapOverviewAddOn()
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 |
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).
|
boolean |
isAutoRecentreOverview()
If true, the overview automatically recentres when the slave view changes.
|
static boolean |
isClassTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
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. It is recommended to use the
standard Java logging framework directly.
|
void |
setMapOverviewAddOn(TLcyMapOverviewAddOn aAddon)
Sets the TLcyMapOverviewAddOn associated with this factory.
|
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
public static final String MAP_OVERVIEW_HELP_ID
public static final int OVERVIEW_CONTROLLER
public static final int OVERVIEW_CONTROLLER_ACTIVE_SETTABLE
public static final int LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE
public static final int ADD_SLAVEVIEW_ACTION
public static final int REMOVE_SLAVEVIEW_ACTION
public static final int OVERVIEW_LAYER
public static final int COMBINED_CONTROLLER
public static final int COMBINED_CONTROLLER_ACTIVE_SETTABLE
public TLcyMapOverviewComponentFactory()
TLcyMapOverviewComponentFactory
. Note that you will have to set
a ILcyLucyEnv
before this instance can be used.public TLcyMapOverviewComponentFactory(ILcyLucyEnv aLucyEnv)
TLcyMapOverviewComponentFactory
.aLucyEnv
- The Lucy environment.public ILcyMapComponent createMapComponent()
TLcyMapComponentFactory
TLcyMapComponent
.
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.createMapComponent
in class TLcyMapComponentFactory
TLcyMapComponent
.protected void insertActionInMenu(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT)
TLcyMapComponentFactory
insertActionInMenu
in class TLcyMapComponentFactory
aID
- The ID of the action to add. This is a
constant that ends in ACTION
.aAction
- The action to add.aMapComponentSFCT
- The map component under construction.protected void finalizeCreation(TLcyMapComponent aMapComponent)
TLcyMapComponentFactory
finalizeCreation
in class TLcyMapComponentFactory
aMapComponent
- The map component under construction.public boolean isAutoAddMaps()
setAutoAddMaps(boolean)
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 to
lucy/map/mapoverview_addon.cfg
for more documentation about the properties
that can be specified.
aAutoAddMaps
- If true, maps are added and removed automatically to/from the overview.isAutoAddMaps()
public boolean isAutoRecentreOverview()
setAutoRecentreOverview(boolean)
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 to
lucy/map/mapoverview_addon.cfg
for more documentation about the properties
that can be specified.
aAutoRecentreOverview
- True if the overview recentres automatically.protected ILcyMenuBar createMenuBar(TLcyMapComponent aMapComponent)
createMenuBar
in class TLcyMapComponentFactory
aMapComponent
- The map component to create a menu bar for.protected ILcdGXYView createGXYView(TLcyMapComponent aMapComponent)
TLcyMapComponentFactory
Creates the main ILcdGXYView
for the given map component. The view is based on
the ILcdTreeLayeredSupport
created in TLcyMapComponentFactory.createTreeLayeredSupport(TLcyMapComponent)
.
Note that if for example a TLcdMapJPanel
is created, one should call
TLcdMapJPanel#setGXYLayerFactory(getLucyEnv().getCompositeGXYLayerFactory())
.
Optionally, the setMinScale
and setMaxScale
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.
createGXYView
in class TLcyMapComponentFactory
aMapComponent
- The map component under construction.TLcyMapComponentFactory.createTreeLayeredSupport(TLcyMapComponent)
protected ILcdAction createAction(int aID, TLcyMapComponent aMapComponent)
createAction
in class TLcyMapComponentFactory
aID
- The id describing which action to create. This is a
constant that ends in ACTION
.aMapComponent
- The map component under construction.protected ILcdGXYLayer createGXYLayer(int aID, TLcyMapComponent aMapComponent)
createGXYLayer
in class TLcyMapComponentFactory
aID
- The ID of the layer to create. This is a
constant that ends in LAYER
.aMapComponent
- The map component under construction.protected Component createComponent(int aID, TLcyMapComponent aMapComponent)
create_toolbar
).createComponent
in class TLcyMapComponentFactory
aID
- The ID of the component to create. This is a
constant that ends in COMPONENT
.aMapComponent
- The map component under construction.protected void insertComponent(int aID, Component aComponent, TLcyMapComponent aMapComponentSFCT)
TLcyMapComponentFactory
insertComponent
in class TLcyMapComponentFactory
aID
- The ID of the component to insert. This is a
constant that ends in COMPONENT
.aComponent
- The component to insert.aMapComponentSFCT
- The map component to insert the component into.public void setMapOverviewAddOn(TLcyMapOverviewAddOn aAddon)
aAddon
- The addon that should be associated with this factorygetMapOverviewAddOn()
public TLcyMapOverviewAddOn getMapOverviewAddOn()
setMapOverviewAddOn(TLcyMapOverviewAddOn)
protected String createMapName(TLcyMapComponent aMapComponent)
TLcyMapComponentFactory
createMapName
in class TLcyMapComponentFactory
aMapComponent
- The map component under construction.protected ILcyToolBar createToolBar(TLcyMapComponent aMapComponent)
createToolBar
in class TLcyMapComponentFactory
aMapComponent
- The map component under construction.TLcyMapComponentFactory.createRightToolBar(TLcyMapComponent)
protected ILcyToolBar createRightToolBar(TLcyMapComponent aMapComponent)
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.
createRightToolBar
in class TLcyMapComponentFactory
aMapComponent
- The map component under constructionnull
TLcyMapComponentFactory.createToolBar(TLcyMapComponent)
protected ILcdGXYController createGXYController(int aID, TLcyMapComponent aMapComponent)
createGXYController
in class TLcyMapComponentFactory
aID
- The ID of the controller to create. This is a
constant that ends in CONTROLLER
.aMapComponent
- The map component under construction.protected void insertActiveSettableInToolBar(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT)
insertActiveSettableInToolBar
in class TLcyMapComponentFactory
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.protected void insertActiveSettableInMenu(int aID, ILcyActiveSettable aActiveSettable, TLcyMapComponent aMapComponentSFCT)
TLcyMapComponentFactory
insertActiveSettableInMenu
in class TLcyMapComponentFactory
aID
- The ID of the active settable to insert. This is a
constant that ends in ACTIVE_SETTABLE
.aActiveSettable
- The active settable to insert into the menu.aMapComponentSFCT
- The map component into whose menu bar the active settable will be inserted.protected void insertActionInToolBar(int aID, ILcdAction aAction, TLcyMapComponent aMapComponentSFCT)
aID
- The ID of the action to add.aAction
- The action to add.aMapComponentSFCT
- The map component under construction.protected ILcyActiveSettable createGXYControllerActiveSettable(int aID, ILcdGXYController aController, TLcyMapComponent aMapComponent)
TLcyMapComponentFactory
createGXYControllerActiveSettable
in class TLcyMapComponentFactory
aID
- The ID of the controller to create an active settable for, this is a
constant that ends in CONTROLLER_ACTIVE_SETTABLE
.aController
- The controller to create an active settable for.aMapComponent
- The map component under construction.protected ILcyActiveSettable createActiveSettable(int aID, TLcyMapComponent aMapComponent)
createActiveSettable
to create an active settable
for LAYER_CONTROL_VISIBLE_ACTIVE_SETTABLE as well.createActiveSettable
in class TLcyMapComponentFactory
aID
- see super.aMapComponent
- see super.protected Container createContainer(int aID, TLcyMapComponent aMapComponent)
TLcyMapComponentFactory
createContainer
in class TLcyMapComponentFactory
aID
- The ID of the container to create. This is a
constant that ends in CONTAINER
.aMapComponent
- The map component under construction.protected ILcdBounds createInitialMapBounds(TLcyMapComponent aMapComponent)
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 file
config/lucy/map/map_addon.cfg
createInitialMapBounds
in class TLcyMapComponentFactory
aMapComponent
- The map component under construction.@Deprecated public static boolean isClassTraceOn()
true
if tracing is enabled for this class.@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.