Class TLcyHypsometryGUIFactory
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 create layer action, override the createAction(int, com.luciad.lucy.util.properties.ALcyProperties) method
to return a custom action for the CREATE_LAYER_ACTION ID.
Similarly, one can override the createGUIContent method to produce a customized layout for the GUI elements.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe id for creating the action panel.static final intPart ofACTION_PANELthat shows the create layer button.static final intThe id for creating the action that creates a new hypsometric layer.static final intThe id for creating the value provider choice panel.static final intPart ofVALUE_PROVIDER_CHOICE_PANELthat shows the raster type component.static final intThe id for creating the value provider settings panel.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the orientation angle value provider.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the orientation value provider.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the ridges and valley value provider.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the ridge value provider.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the slope angle value provider.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the slope value provider.static final intPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the valley value provider. -
Constructor Summary
ConstructorsConstructorDescriptionTLcyHypsometryGUIFactory(ILcyLucyEnv aLucyEnv) Default constructor that builds all actions, component and panels. -
Method Summary
Modifier and TypeMethodDescriptionprotected ILcdActioncreateAction(int aID, ALcyProperties aProperties) Creates anILcdActionfor the given ID.protected ILcyActiveSettablecreateActiveSettable(int aActiveSettableID, ALcyProperties aProperties) Creates anILcyActiveSettablefor the given ID.protected ComponentcreateComponent(int aID, ALcyProperties aProperties) Creates a widget for the given ID.protected ComponentcreateGUIContent(ALcyProperties aProperties) Retrieves all panels and lays them out in ajava.awt.Component.protected ComponentcreatePanel(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 hypsometric layer.This action interacts with the back-end as follows:
- a hypsometric value provider is created using the
TLcyHypsometryAddon.SELECTED_VALUE_PROVIDER_KEY. The corresponding property value is used to retrieve the arguments for the methodTLcyHypsometryBackEnd.createHypsometricValueProvider(com.luciad.lucy.util.properties.ALcyProperties).For example, the normal provider for the slope value provider with the name
TLcyHypsometryBackEnd.HYPSOMETRIC_VALUE_PROVIDER_SLOPE_IDis retrieved from the property TLcyHypsometryAddon.SHORT_PREFIX + TLcyHypsometryBackEnd#HYPSOMETRIC_VALUE_PROVIDER_SLOPE_ID + "." + TLcyHypsometryBackEnd#HYPSOMETRIC_NORMAL_PROVIDER_KEY. - if the
TLcyHypsometryAddon.SELECTED_ACTION_KEYproperty is set the shape action, a new snapshot layer is created, based on the elevation layers that are visible in the view and constrained to the currently selected objects.
- See Also:
- a hypsometric value provider is created using the
-
VALUE_PROVIDER_CHOICE_PANEL
public static final int VALUE_PROVIDER_CHOICE_PANELThe id for creating the value provider choice panel. It allows to choose the value provider.- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL
public static final int VALUE_PROVIDER_SETTINGS_PANELThe id for creating the value provider settings panel. It allows to choose the value provider specific settings.- See Also:
-
ACTION_PANEL
public static final int ACTION_PANELThe id for creating the action panel. It shows the action components.- See Also:
-
VALUE_PROVIDER_CHOICE_PANEL_VALUE_PROVIDER_COMPONENT
public static final int VALUE_PROVIDER_CHOICE_PANEL_VALUE_PROVIDER_COMPONENTPart ofVALUE_PROVIDER_CHOICE_PANELthat shows the raster type component. It uses theTLcyHypsometryAddon.VALUE_PROVIDER_LIST_KEYproperty.- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_SLOPE_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_SLOPE_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the slope value provider. It uses the following sub-properties of the slope value provider:- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_SLOPE_ANGLE_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_SLOPE_ANGLE_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the slope angle value provider. It uses the following sub-properties of the slope angle value provider:- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_ORIENTATION_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_ORIENTATION_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the orientation value provider. It uses the following sub-properties of the orientation value provider:- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_ORIENTATION_ANGLE_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_ORIENTATION_ANGLE_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the orientation angle value provider. It uses the following sub-properties of the orientation angle value provider:- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_RIDGE_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_RIDGE_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the ridge value provider. It uses the value provider'sTLcyHypsometryBackEnd.HYPSOMETRIC_NORMAL_PROVIDER_KEYsub-property.- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_VALLEY_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_VALLEY_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the valley value provider. It uses the value provider'sTLcyHypsometryBackEnd.HYPSOMETRIC_NORMAL_PROVIDER_KEYsub-property.- See Also:
-
VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_RIDGE_AND_VALLEY_COMPONENT
public static final int VALUE_PROVIDER_SETTINGS_PANEL_VALUE_PROVIDER_RIDGE_AND_VALLEY_COMPONENTPart ofVALUE_PROVIDER_SETTINGS_PANELthat shows the settings specific to the ridges and valley value provider. It uses the value provider'sTLcyHypsometryBackEnd.HYPSOMETRIC_NORMAL_PROVIDER_KEYsub-property.- See Also:
-
ACTION_PANEL_CREATE_LAYER_COMPONENT
public static final int ACTION_PANEL_CREATE_LAYER_COMPONENTPart ofACTION_PANELthat shows the create layer button. It uses theCREATE_LAYER_ACTIONto create that button.- See Also:
-
-
Constructor Details
-
TLcyHypsometryGUIFactory
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:
createGUIContentin 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 inTLcyHypsometryAddon.- Returns:
- the component containing all panels, layed out appropriately.
-
createAction
Description copied from class:ALcyGUIFactoryCreates an
ILcdActionfor 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:
createActionin 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:ALcyGUIFactoryCreates an
ILcyActiveSettablefor 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:
createActiveSettablein 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:ALcyGUIFactoryCreates 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:
createComponentin 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:ALcyGUIFactoryCreates 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:
createPanelin 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.
-