Class FWCustomizableLayoutProvider
java.lang.Object
net.simplace.ui.customize.FWCustomizableLayoutProvider
- Direct Known Subclasses:
XMLLayoutProvider
Provides the customizing of the client layout: settings, problem report, systems, functions, menus,
toolbar, state bar, forms, layout properties, chart styles and map styles. Subclasses read the customizing from
a concrete source (see
XMLLayoutProvider).
Settings, problem report, forms and layout properties are initialized in the constructor, systems, functions,
menus etc. in initializeStructure().
- Author:
- aenders
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String, ChartStyle> the global chart styles by idprotected Objectnot usedHolds the predefined display styles for GeoToolsFeatureandFeatureCollectionobjects.the form definitions by form idprotected Map<String, FWFunctionalityModel> the global function models by function idHolds the predefined display styles for GeoToolsGridCoverage2Dobjects.the layout propertiesprotected Stringprefix for the locale keys of captionsprotected Map<String, FWMenuItem> the menu items by id (in menu order);nullvalues are separatorsprotected FWProblemReportModelthe problem report model,nullif none is definedprotected FWSettingModelthe setting model,nullif none is definedthe state bar definitions by id (in order)protected Map<String, FWSystemModel> the system models by system idprotected Map<String, FWToolbarButton> the toolbar buttons by id (in toolbar order);nullvalues are separatorsprotected booleanif the atlas tree panel is shownprotected booleanif the keyword (project) tree panel is shownprotected booleanif the scenario tree panel is shownprotected booleanif the sim component tree panel is shown -
Constructor Summary
ConstructorsConstructorDescriptionFWCustomizableLayoutProvider(Object aObjectFillingStructure) Reads the customizing and initializes forms, problem report, settings and layout properties. -
Method Summary
Modifier and TypeMethodDescriptiongetChartStyle(String aKey, net.simplace.core.FWObservable aObservable) Looks up a chart style first in the system of the observable, then in the global chart styles, and sets the observable on the found style.abstract ObjectgetChildObject(String aName) org.jdom2.ElementgetFunctionModel(String aSystemID, String aFunctionID) Looks up a function model in this order: the function of the system (or its start function if both ids are the same), the start function of the systemaFunctionID, the global function map.getLayoutProperty(String aKey) getSystemModel(String aID) protected abstract voidFills theiChartStyleMapwith the global chart styles.protected abstract voidFills theiFeatureStyleMapwith the predefined display styles for GeoToolsFeatureorFeatureCollectionobjects.protected abstract voidFills theiFormMapwith the form definitions.protected abstract voidFills theiFunctionMapwith the global function models.protected abstract voidFills theiGridStyleMapwith the predefined display styles for GeoToolsGridCoverage2Dobjects.voidInitializes systems, functions, chart, feature and grid styles, menus, state bar and toolbar.protected abstract voidFills theiLayoutPropertiesMap, sets theiLocalePrefixand the flags for the tree panels.protected abstract voidFills theiMenuMapwith the menu items of existing functions and the separators.protected abstract voidSets theiProblemReportModel.protected abstract voidSets theiSettingModel.protected abstract voidFills theiStateBarMapwith the state bar definitions.protected abstract voidFills theiSystemMapwith the system models.protected abstract voidFills theiToolMapwith the toolbar buttons of existing functions and the separators.booleanisAccessable(String aID) Checks if a system or function exists: ids starting withsystemalways do, otherwise a system or a global function with the id must be defined.booleanbooleanbooleanbooleanbooleanvoidClears and reinitializes forms, menus, state bar, toolbar, chart, feature and grid styles (e.g.voidClears and reinitializes the system models.voidsetShouldAddAtlasPanel(boolean aShouldAddAtlasPanel) voidsetShouldAddKeyworkPanel(boolean aShouldAddKeyworkPanel) voidsetShouldAddScenarioPanel(boolean aShouldAddScenarioPanel) voidsetShouldAddSimComponentPanel(boolean aShouldAddSimComponentPanel)
-
Field Details
-
iLocalePrefix
prefix for the locale keys of captions -
iContentObject
not used -
iSettingModel
the setting model,nullif none is defined -
iProblemReportModel
the problem report model,nullif none is defined -
iSystemMap
the system models by system id -
iFunctionMap
the global function models by function id -
iMenuMap
the menu items by id (in menu order);nullvalues are separators -
iToolMap
the toolbar buttons by id (in toolbar order);nullvalues are separators -
iStateBarMap
-
iFormMap
-
iLayoutPropertiesMap
-
iChartStyleMap
the global chart styles by id -
shouldAddKeyworkPanel
protected boolean shouldAddKeyworkPanelif the keyword (project) tree panel is shown -
shouldAddSimComponentPanel
protected boolean shouldAddSimComponentPanelif the sim component tree panel is shown -
shouldAddAtlasPanel
protected boolean shouldAddAtlasPanelif the atlas tree panel is shown -
shouldAddScenarioPanel
protected boolean shouldAddScenarioPanelif the scenario tree panel is shown -
iFeatureStyleMap
-
iGridStyleMap
-
-
Constructor Details
-
FWCustomizableLayoutProvider
Reads the customizing and initializes forms, problem report, settings and layout properties.- Parameters:
aObjectFillingStructure- the source of the customizing, depends on the subclass
-
-
Method Details
-
initializeStructure
public void initializeStructure()Initializes systems, functions, chart, feature and grid styles, menus, state bar and toolbar. -
reInitializeStructure
public void reInitializeStructure()Clears and reinitializes forms, menus, state bar, toolbar, chart, feature and grid styles (e.g. after the customizing changed). -
reInitializeSystems
public void reInitializeSystems()Clears and reinitializes the system models. -
initSystemMap
protected abstract void initSystemMap()Fills theiSystemMapwith the system models. -
initProblemReportModel
protected abstract void initProblemReportModel()Sets theiProblemReportModel. -
initSettingModel
protected abstract void initSettingModel()Sets theiSettingModel. -
initToolMap
protected abstract void initToolMap()Fills theiToolMapwith the toolbar buttons of existing functions and the separators. -
initStateBarFunctions
protected abstract void initStateBarFunctions()Fills theiStateBarMapwith the state bar definitions. -
initFunctionMap
protected abstract void initFunctionMap()Fills theiFunctionMapwith the global function models. -
initFormMap
protected abstract void initFormMap()Fills theiFormMapwith the form definitions. -
initChartStyleMap
protected abstract void initChartStyleMap()Fills theiChartStyleMapwith the global chart styles. -
initFeatureStyleMap
protected abstract void initFeatureStyleMap()Fills theiFeatureStyleMapwith the predefined display styles for GeoToolsFeatureorFeatureCollectionobjects. -
initGridStyleMap
protected abstract void initGridStyleMap()Fills theiGridStyleMapwith the predefined display styles for GeoToolsGridCoverage2Dobjects. -
initMenuMap
protected abstract void initMenuMap()Fills theiMenuMapwith the menu items of existing functions and the separators. -
initLayoutPropertiesMap
protected abstract void initLayoutPropertiesMap()Fills theiLayoutPropertiesMap, sets theiLocalePrefixand the flags for the tree panels. -
getSystemModel
- Parameters:
aID- the system id- Returns:
- a clone of the system model, or
nullif the system is unknown
-
getOriginalSystemModel
- Parameters:
aID- the system id- Returns:
- the original (not cloned) system model;
nullif unknown
-
getSystemModels
- Returns:
- the system models by system id (the internal map, not cloned)
-
getSettingModel
- Returns:
- the setting model, or
nullif none is defined
-
getProblemReportModel
- Returns:
- the problem report model, or
nullif none is defined
-
getDefaultSystemSettings
-
getFunctionModel
Looks up a function model in this order: the function of the system (or its start function if both ids are the same), the start function of the systemaFunctionID, the global function map.- Parameters:
aSystemID- the system id, may be emptyaFunctionID- the function id- Returns:
- the function model (the global one cloned), or
nullif not found
-
getMenuMap
- Returns:
- the menu items by id (in menu order);
nullvalues are separators
-
getToolMap
- Returns:
- the toolbar buttons by id (in toolbar order);
nullvalues are separators
-
getLayoutPropertiesMap
-
getLocalePrefix
- Returns:
- the prefix for the locale keys of captions
-
getLayoutProperty
-
getChartStyle
Looks up a chart style first in the system of the observable, then in the global chart styles, and sets the observable on the found style.- Parameters:
aKey- id of the chart styleaObservable- the observable providing the system id and the parameters, may benull- Returns:
- the chart style, or
nullif the key is empty or not found
-
getStateBarFunctions
-
isShouldAddKeyworkPanel
public boolean isShouldAddKeyworkPanel()- Returns:
trueif the keyword (project) tree panel is shown
-
setShouldAddKeyworkPanel
public void setShouldAddKeyworkPanel(boolean aShouldAddKeyworkPanel) - Parameters:
aShouldAddKeyworkPanel-trueto show the keyword (project) tree panel
-
isShouldAddSimComponentPanel
public boolean isShouldAddSimComponentPanel()- Returns:
trueif the sim component tree panel is shown
-
setShouldAddSimComponentPanel
public void setShouldAddSimComponentPanel(boolean aShouldAddSimComponentPanel) - Parameters:
aShouldAddSimComponentPanel-trueto show the sim component tree panel
-
isShouldAddAtlasPanel
public boolean isShouldAddAtlasPanel()- Returns:
trueif the atlas tree panel is shown
-
setShouldAddAtlasPanel
public void setShouldAddAtlasPanel(boolean aShouldAddAtlasPanel) - Parameters:
aShouldAddAtlasPanel-trueto show the atlas tree panel
-
isShouldAddScenarioPanel
public boolean isShouldAddScenarioPanel()- Returns:
trueif the scenario tree panel is shown
-
setShouldAddScenarioPanel
public void setShouldAddScenarioPanel(boolean aShouldAddScenarioPanel) - Parameters:
aShouldAddScenarioPanel-trueto show the scenario tree panel
-
isAccessable
Checks if a system or function exists: ids starting withsystemalways do, otherwise a system or a global function with the id must be defined.- Parameters:
aID- the system or function id- Returns:
trueif it exists,falsefor unknown ids (a warning is logged)
-
isDeveloppmentMode
public boolean isDeveloppmentMode()- Returns:
trueif the layout propertydeveloppmentmodeistrue
-
getForm
- Parameters:
aFormID- the form id- Returns:
- the form definition, or
nullif not defined
-
getChildObject
-