Class TLcyLOSCoverageGUIFactory
Each GUI element can be replaced by overriding the respective create* method to return a custom
element for the respective GUI ID.
For example, to change the functionality of the layer update action, override the createAction(int, com.luciad.lucy.util.properties.ALcyProperties)
method
to return a custom action for the UPDATE_LAYER_ACTION
ID.
Similarly, one can override the createGUIContent method to produce a customized layout for the GUI elements.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The id for creating the action panel.static final int
Part ofACTION_PANEL
that shows the auto-update component.static final int
Part ofACTION_PANEL
that shows the create layer button.static final int
Part ofACTION_PANEL
that shows the update layer button.static final int
The id for creating the coverage panel.static final int
Part ofCOVERAGE_PANEL
that shows the settings for the selected coverage.static final int
Part ofCOVERAGE_PANEL
that shows a list of coverages that need to be computed.static final int
The id for creating the action that creates a new layer.static final int
The id for creating the output panel.static final int
Part ofOUTPUT_PANEL
that shows the output format of the line-of-sight results.static final int
The id for creating the propagation choice panel.static final int
Part ofPROPAGATION_CHOICE_PANEL
that shows a description for theTLcyLOSCoverageAddOn.QUALITY_KEY
property.static final int
Part ofPROPAGATION_CHOICE_PANEL
that shows the computation mode component.static final int
Part ofPROPAGATION_CHOICE_PANEL
that shows the quality component.static final int
The id for creating the propagation settings panel.static final int
Part ofPROPAGATION_CHOICE_PANEL
that shows the settings specific to the fixed height propagation function.static final int
Part ofPROPAGATION_CHOICE_PANEL
that shows the settings specific to the normal propagation function.static final int
Part ofPROPAGATION_CHOICE_PANEL
that shows the settings specific to the sky-in-background propagation function.static final int
The id for creating the style panel.static final int
Part ofSTYLE_PANEL
that shows the settings for line-of-sight results corresponding to the cone of silence.static final int
Part ofSTYLE_PANEL
that shows the settings for invisible line-of-sight results.static final int
Part ofSTYLE_PANEL
that shows the color map for the line-of-sight results.static final int
Part ofSTYLE_PANEL
that shows the settings for unknown line-of-sight results.static final int
Part ofSTYLE_PANEL
that shows the settings for visible line-of-sight results.static final int
The ID for creating the action that computes the line-of-sight coverages. -
Constructor Summary
ConstructorDescriptionTLcyLOSCoverageGUIFactory
(ILcyLucyEnv aLucyEnv) Default constructor that builds all actions, component and panels. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdAction
createAction
(int aID, ALcyProperties aProperties) Creates anILcdAction
for the given ID.protected ILcyActiveSettable
createActiveSettable
(int aActiveSettableID, ALcyProperties aProperties) Creates anILcyActiveSettable
for the given ID.protected Component
createComponent
(int aID, ALcyProperties aProperties) Creates a widget for the given ID.protected Component
createGUIContent
(ALcyProperties aProperties) Retrieves all panels and lays them out in ajava.awt.Component
.protected Component
createPanel
(int aID, ALcyProperties aProperties) Creates a panel for the given ID.Methods inherited from class com.luciad.lucy.gui.ALcyGUIFactory
cleanup, createGUI, getAction, getActionContext, getActionIDs, getActiveSettable, getActiveSettableContext, getActiveSettableIDs, getComponent, getComponentIDs, getLucyEnv, getPanel, getPanelIDs, isActiveSettableDeactivatePossible, setup
-
Field Details
-
CREATE_LAYER_ACTION
public static final int CREATE_LAYER_ACTIONThe id for creating the action that creates a new layer.- See Also:
-
UPDATE_LAYER_ACTION
public static final int UPDATE_LAYER_ACTIONThe ID for creating the action that computes the line-of-sight coverages. When the Update button is pressed, the GUI properties starting with "TLcyLOSCoverageAddOn.layer.tea." are stored for the selected TEA layer (seeTLcyLOSCoverageAddOn.LINKED_LAYER_KEY
), and a new line-of-sight coverage calculation starts.This calculation interacts with the back-end as follows:
- a line-of-sight coverage factory is obtained
- a line-of-sight coverage is created using the
TLcyLOSCoverageAddOn.SELECTED_COVERAGE_KEY
property's sub-properties - an altitude provider is retrieved using the
TLcyLOSCoverageAddOn.QUALITY_KEY
property -
- either a propagation function is created using the following properties:
- the selected coverage's
TLcyLOSCoverageBackEnd.MIN_VERTICAL_ANGLE_KEY
,TLcyLOSCoverageBackEnd.MAX_VERTICAL_ANGLE_KEY
- the
TLcyLOSCoverageAddOn.SELECTED_PROPAGATION_KEY
property and its sub-properties
- the selected coverage's
- or either a
TLspLOSProperties
is created, containingILcdLOSCoverage
properties, meant to be used by aTLspLOSCalculator
- either a propagation function is created using the following properties:
- a LOS coverage matrix is created
- depending on the property
TLcyLOSCoverageAddOn.OUTPUT_FORMAT_KEY
, the factory'sTLcdLOSCoverageFactory.createLOSCoverageRaster(com.luciad.tea.ILcdLOSCoverageMatrix, com.luciad.tea.ILcdMatrixRasterValueMapper, com.luciad.reference.ILcdGeoReference, double, com.luciad.tea.TLcdCoverageFillMode)
orTLcdLOSCoverageFactory.createLOSCoverageContours(com.luciad.tea.ILcdLOSCoverageMatrix, com.luciad.reference.ILcdGeoReference, double[])
method is called
- See Also:
-
COVERAGE_PANEL
public static final int COVERAGE_PANELThe id for creating the coverage panel. It allows to choose the line-of-sight coverage settings.- See Also:
-
PROPAGATION_CHOICE_PANEL
public static final int PROPAGATION_CHOICE_PANELThe id for creating the propagation choice panel. It allows to choose the quality and the propagation function.- See Also:
-
PROPAGATION_SETTINGS_PANEL
public static final int PROPAGATION_SETTINGS_PANELThe id for creating the propagation settings panel. It allows to choose the propagation function specific settings.- See Also:
-
STYLE_PANEL
public static final int STYLE_PANELThe id for creating the style panel. It allows to choose the style settings.- See Also:
-
OUTPUT_PANEL
public static final int OUTPUT_PANELThe id for creating the output panel. It allows to choose the output type.- See Also:
-
ACTION_PANEL
public static final int ACTION_PANELThe id for creating the action panel. It shows the action components.- See Also:
-
COVERAGE_PANEL_COVERAGE_LIST_COMPONENT
public static final int COVERAGE_PANEL_COVERAGE_LIST_COMPONENTPart ofCOVERAGE_PANEL
that shows a list of coverages that need to be computed. It uses the propertiesTLcyLOSCoverageAddOn.COVERAGE_LIST_KEY
andTLcyLOSCoverageAddOn.SELECTED_COVERAGE_KEY
, and the coverage's sub-propertyTLcyLOSCoverageBackEnd.DOMAIN_OBJECT_CONTEXT_KEY
.- See Also:
-
COVERAGE_PANEL_COVERAGE_COMPONENT
public static final int COVERAGE_PANEL_COVERAGE_COMPONENTPart ofCOVERAGE_PANEL
that shows the settings for the selected coverage. It uses the following coverage sub-properties:TLcyLOSCoverageBackEnd.LOCATION_KEY
TLcyLOSCoverageBackEnd.ALTITUDE_KEY
TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
TLcyLOSCoverageBackEnd.START_ANGLE_KEY
TLcyLOSCoverageBackEnd.ARC_ANGLE_KEY
TLcyLOSCoverageBackEnd.MAX_RADIUS_KEY
TLcyLOSCoverageBackEnd.MIN_VERTICAL_ANGLE_KEY
TLcyLOSCoverageBackEnd.MAX_VERTICAL_ANGLE_KEY
- See Also:
-
PROPAGATION_CHOICE_PANEL_QUALITY_COMPONENT
public static final int PROPAGATION_CHOICE_PANEL_QUALITY_COMPONENTPart ofPROPAGATION_CHOICE_PANEL
that shows the quality component. It allows to choose the quality, storing it in theTLcyLOSCoverageAddOn.QUALITY_KEY
property. The list to choose from is based on the propertyTLcyLOSCoverageAddOn.QUALITY_ITEMS_KEY
.- See Also:
-
PROPAGATION_CHOICE_PANEL_CURRENT_QUALITY_COMPONENT
public static final int PROPAGATION_CHOICE_PANEL_CURRENT_QUALITY_COMPONENTPart ofPROPAGATION_CHOICE_PANEL
that shows a description for theTLcyLOSCoverageAddOn.QUALITY_KEY
property. The description is based on the propertyTLcyLOSCoverageAddOn.QUALITY_DESCRIPTIONS_KEY
.- See Also:
-
PROPAGATION_CHOICE_PANEL_PROPAGATION_FUNCTION_COMPONENT
public static final int PROPAGATION_CHOICE_PANEL_PROPAGATION_FUNCTION_COMPONENTPart ofPROPAGATION_CHOICE_PANEL
that shows the computation mode component. It uses theTLcyLOSCoverageAddOn.PROPAGATION_LIST_KEY
andTLcyLOSCoverageAddOn.SELECTED_PROPAGATION_KEY
properties, as well asTLcyLOSCoverageBackEnd.retrievePropagationFunctionLabel(java.lang.String)
.- See Also:
-
PROPAGATION_SETTINGS_PANEL_PROPAGATION_FUNCTION_NORMAL_COMPONENT
public static final int PROPAGATION_SETTINGS_PANEL_PROPAGATION_FUNCTION_NORMAL_COMPONENTPart ofPROPAGATION_CHOICE_PANEL
that shows the settings specific to the normal propagation function. It uses the selected propagation'sTLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
PROPAGATION_SETTINGS_PANEL_PROPAGATION_FUNCTION_SKY_BACKGROUND_COMPONENT
public static final int PROPAGATION_SETTINGS_PANEL_PROPAGATION_FUNCTION_SKY_BACKGROUND_COMPONENTPart ofPROPAGATION_CHOICE_PANEL
that shows the settings specific to the sky-in-background propagation function. It uses the selected propagation'sTLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
PROPAGATION_SETTINGS_PANEL_PROPAGATION_FUNCTION_FIXED_HEIGHT_COMPONENT
public static final int PROPAGATION_SETTINGS_PANEL_PROPAGATION_FUNCTION_FIXED_HEIGHT_COMPONENTPart ofPROPAGATION_CHOICE_PANEL
that shows the settings specific to the fixed height propagation function. It uses the selected propagation'sTLcyLOSCoverageBackEnd.FIXED_HEIGHT_KEY
andTLcyLOSCoverageBackEnd.FIXED_HEIGHT_MODE_KEY
sub-properties.- See Also:
-
STYLE_PANEL_COLOR_MAP_COMPONENT
public static final int STYLE_PANEL_COLOR_MAP_COMPONENTPart ofSTYLE_PANEL
that shows the color map for the line-of-sight results.It is propagation function specific. For the fixed height function, it uses the selected propagation function's "colorMap" sub-property. For other propagation functions, it uses the "colorMap" sub-property of the selected propagation's
TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
STYLE_PANEL_COLOR_UNKNOWN_COMPONENT
public static final int STYLE_PANEL_COLOR_UNKNOWN_COMPONENTPart ofSTYLE_PANEL
that shows the settings for unknown line-of-sight results.It is propagation function specific. For the fixed height function, it uses the selected propagation function's "colorUnknown" sub-property. For other propagation functions, it uses the "colorUnknown" sub-property of the selected propagation's
TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
STYLE_PANEL_COLOR_CONE_OF_SILENCE_COMPONENT
public static final int STYLE_PANEL_COLOR_CONE_OF_SILENCE_COMPONENTPart ofSTYLE_PANEL
that shows the settings for line-of-sight results corresponding to the cone of silence.It is propagation function specific. For the fixed height function, it uses the selected propagation function's "colorConeOfSilence" sub-property. For other propagation functions, it uses the "colorConeOfSilence" sub-property of the selected propagation's
TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
STYLE_PANEL_COLOR_INVISIBLE_COMPONENT
public static final int STYLE_PANEL_COLOR_INVISIBLE_COMPONENTPart ofSTYLE_PANEL
that shows the settings for invisible line-of-sight results.It is propagation function specific. For the fixed height function, it uses the selected propagation function's "colorInvisible" sub-property. For other propagation functions, it uses the "colorInvisible" sub-property of the selected propagation's
TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
STYLE_PANEL_COLOR_VISIBLE_COMPONENT
public static final int STYLE_PANEL_COLOR_VISIBLE_COMPONENTPart ofSTYLE_PANEL
that shows the settings for visible line-of-sight results.It is propagation function specific. For the fixed height function, it uses the selected propagation function's "colorVisible" sub-property. For other propagation functions, it uses the "colorVisible" sub-property of the selected propagation's
TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
sub-property.- See Also:
-
OUTPUT_PANEL_OUTPUT_FORMAT_COMPONENT
public static final int OUTPUT_PANEL_OUTPUT_FORMAT_COMPONENTPart ofOUTPUT_PANEL
that shows the output format of the line-of-sight results. It uses theTLcyLOSCoverageAddOn.OUTPUT_FORMAT_KEY
property.- See Also:
-
ACTION_PANEL_CREATE_LAYER_COMPONENT
public static final int ACTION_PANEL_CREATE_LAYER_COMPONENTPart ofACTION_PANEL
that shows the create layer button. It uses theCREATE_LAYER_ACTION
to create that button.- See Also:
-
ACTION_PANEL_UPDATE_LAYER_COMPONENT
public static final int ACTION_PANEL_UPDATE_LAYER_COMPONENTPart ofACTION_PANEL
that shows the update layer button. It uses theUPDATE_LAYER_ACTION
to create that button.- See Also:
-
ACTION_PANEL_AUTO_UPDATE_COMPONENT
public static final int ACTION_PANEL_AUTO_UPDATE_COMPONENTPart ofACTION_PANEL
that shows the auto-update component. It uses theUPDATE_LAYER_ACTION
to create that component.- See Also:
-
-
Constructor Details
-
TLcyLOSCoverageGUIFactory
Default constructor that builds all actions, component and panels.- Parameters:
aLucyEnv
- the Lucy environment in which the GUI will be built
-
-
Method Details
-
createGUIContent
Retrieves all panels and lays them out in a
java.awt.Component
. Therefore, this method usesALcyGUIFactory.getPanel(int)
with all ID's that end inPANEL
, and lays out those components in for example ajavax.swing.JPanel
.This function should be overridden when the global layout of the panel needs to be changed, for example when the main panels need to be rearranged, or when a new panel needs to be added.
An example implementation could be:
public Component createGUIContent( ALcyProperties aProperties ) { JPanel content = new JPanel( new BorderLayout() ); Component somePanel = getPanel( SOME_PANEL ); if ( somePanel != null ) content.add( somePanel, BorderLayout.NORTH ); Component otherPanel = getPanel( OTHER_PANEL ); if ( otherPanel != null ) content.add( otherPanel, BorderLayout.CENTER ); return content; }
- Specified by:
createGUIContent
in classALcyGUIFactory<Component>
- Parameters:
aProperties
- properties that define the default preferences and values of the GUI elements. The properties are also changed by the GUI elements, according to the property names defined inTLcyLOSCoverageAddOn
.- Returns:
- the component containing all panels, layed out appropriately.
-
createAction
Description copied from class:ALcyGUIFactory
Creates an
ILcdAction
for the given ID.Note: if the action should be inserted in the configured action bars, the ID_KEY of the returned action must be set (see
TLcyActionBarUtil.ID_KEY
).- Specified by:
createAction
in classALcyGUIFactory<Component>
- Parameters:
aID
- the ID describing which action to create. This is normally a constant that ends withACTION
.aProperties
- a properties object that can be used to tune the behavior of this factory.- Returns:
- the newly created
ILcdAction
, ornull
. - See Also:
-
createActiveSettable
protected ILcyActiveSettable createActiveSettable(int aActiveSettableID, ALcyProperties aProperties) Description copied from class:ALcyGUIFactory
Creates an
ILcyActiveSettable
for the given ID.Note: if the active settable should be inserted in the configured action bars, the ID_KEY of the returned active settable must be set (see
TLcyActionBarUtil.ID_KEY
).- Specified by:
createActiveSettable
in classALcyGUIFactory<Component>
- Parameters:
aActiveSettableID
- the ID describing which active settable to create. This is normally a constant that ends withACTIVE_SETTABLE
.aProperties
- a properties object that can be used to tune the behavior of this factory.- Returns:
- the newly created
ILcyActiveSettable
, ornull
.
-
createComponent
Description copied from class:ALcyGUIFactory
Creates a widget for the given ID. It is safe to use the
ALcyGUIFactory.getAction(int)
andALcyGUIFactory.getActiveSettable(int)
methods in this method, to build widgets that use an action or active settable.These widgets might interact with the given properties object, to retrieve or store some state. Such a widget could for example be a check box whose 'selected' state is synchronized with some property.
- Specified by:
createComponent
in classALcyGUIFactory<Component>
- Parameters:
aID
- the ID describing which component to create. This is normally a constant that ends withCOMPONENT
.aProperties
- a properties object that can be used to tune the behavior of this factory. state.- Returns:
- the newly created
java.awt.Component
, or null.
-
createPanel
Description copied from class:ALcyGUIFactory
Creates a panel for the given ID. It is safe to use
ALcyGUIFactory.getComponent(int)
in this method, to build panels that are composed of components.An example implementation could be:
protected Component createPanel( int aPanelID, ALcyProperties aProperties ) { if ( aPanelID == SOME_PANEL ) { JPanel content = new JPanel( new BorderLayout() ); Component someComponent = getComponent( SOME_COMPONENT ); if ( someComponent != null ) content.add( someComponent, BorderLayout.NORTH ); Component otherComponent = getComponent( OTHER_COMPONENT ); if ( otherComponent != null ) content.add( otherComponent, BorderLayout.CENTER ); return content; } else if ( aPanelID == ... ) { ... } }
- Specified by:
createPanel
in classALcyGUIFactory<Component>
- Parameters:
aID
- the ID describing which panel to create. This is normally a constant that ends withPANEL
.aProperties
- a properties object that can be used to tune the behavior of this factory.- Returns:
- the newly created
java.awt.Component
, or null.
-