Class TLcyPreviewAddOnCustomizerFactory

java.lang.Object
com.luciad.lucy.addons.previewer.view.ALcyPreviewAddOnCustomizerFactory
com.luciad.lucy.addons.previewer.view.TLcyPreviewAddOnCustomizerFactory

public class TLcyPreviewAddOnCustomizerFactory extends ALcyPreviewAddOnCustomizerFactory
This factory creates the GUI for the preview add-on. The GUI is created and put together in small steps, so that any of these steps can be modified without having to rewrite everything.

For an example of how to use these GUI factories, please look at TLcyMapComponentFactory.

See Also:
  • Field Details

    • MAP_COMBO_BOX_COMPONENT

      @Deprecated public static final int MAP_COMBO_BOX_COMPONENT
      Deprecated.
      createComponent for this ID returns null.
      See Also:
    • MODEL_LIST_COMPONENT

      @Deprecated public static final int MODEL_LIST_COMPONENT
      Deprecated.
      createComponent for this ID returns null.
      See Also:
    • SET_RANGE_BEGIN_TIME_ACTION

      public static final int SET_RANGE_BEGIN_TIME_ACTION

      The previewer can 'zoom' on a certain time range. This constant represents the action that allows to change the begin time.

      To be used in combination with createAction and insertAction.

      See Also:
    • SET_CURRENT_TIME_ACTION

      public static final int SET_CURRENT_TIME_ACTION

      Constant that represents the action that allows to change the current previewer time.

      To be used in combination with createAction and insertAction.

      See Also:
    • SET_CURRENT_TIME_NAMED_ACTION

      public static final int SET_CURRENT_TIME_NAMED_ACTION

      Similar to SET_CURRENT_TIME_ACTION. The difference is that the action name equals the current time, opposed to '...'. This means it can serve a dual purpose: provide feedback about the current time, and change it using a date picker.

      By default, it is not inserted in the user interface. Subclasses can use it by overriding insertAction, for example like this:

      
       protected void insertAction(int aID, ILcdAction aAction, Container aPreviewPanelSFCT) {
         if (aID == SET_CURRENT_TIME_NAMED_ACTION && aAction != null) {
           aPreviewPanelSFCT.add(new JButton(new TLcdSWAction(aAction)));
         }
         else {
           super.insertAction(aID, aAction, aPreviewPanelSFCT);
         }
       }
       

      To be used in combination with createAction and insertAction.

      See Also:
    • SET_RANGE_END_TIME_ACTION

      public static final int SET_RANGE_END_TIME_ACTION

      The previewer can 'zoom' on a certain time range. This constant represents the action that allows to change the end of the time range.

      To be used in combination with createAction and insertAction.

      See Also:
    • PLAYBACK_COMPONENT

      public static final int PLAYBACK_COMPONENT

      Constant that represents the component with the play/pause and stop buttons.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • TIME_SEEK_COMPONENT

      public static final int TIME_SEEK_COMPONENT

      Constant that represents the component with the buttons to seek back and forward, and a combo box to choose the size of those seek steps.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • STATUS_LABEL_COMPONENT

      public static final int STATUS_LABEL_COMPONENT

      Constant that represents the label with the current playing status: running, pausing, stopped ...

      To be used in combination with createComponent and insertComponent.

      See Also:
    • CPU_USAGE_COMPONENT

      public static final int CPU_USAGE_COMPONENT

      Constant that represents the component with the CPU usage combo box.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • TIME_FACTOR_COMPONENT

      public static final int TIME_FACTOR_COMPONENT

      Constant that represents the component with the combo box to choose the playback speed-up factor from.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • TIME_SLIDER_COMPONENT

      public static final int TIME_SLIDER_COMPONENT

      Constant that represents the component with the slider to modify the current previewer time.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • CURRENT_TIME_LABEL_COMPONENT

      public static final int CURRENT_TIME_LABEL_COMPONENT

      Constant that represents the large lcd-like label with the current time.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • TIME_RANGE_SLIDER_COMPONENT

      public static final int TIME_RANGE_SLIDER_COMPONENT

      The previewer can 'zoom' on a certain time range. This constant represents the range slider that allows to set both begin and end of that time range.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • TIME_RANGE_PICKER_COMPONENT

      public static final int TIME_RANGE_PICKER_COMPONENT

      The previewer can 'zoom' on a certain time range. This constant represents the drop-down button to choose from relevant time ranges, derived from the layers that are being previewed.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • BEGIN_TIME_LABEL_COMPONENT

      public static final int BEGIN_TIME_LABEL_COMPONENT

      Constant that represents the label that shows the begin time of the previewer. The begin time is the earliest time from all available ILcdSimulatorModels.

      To be used in combination with createComponent and insertComponent.

      See Also:
    • END_TIME_LABEL_COMPONENT

      public static final int END_TIME_LABEL_COMPONENT

      Constant that represents the label that shows the end time of the previewer. The end time is the latest time from all available ILcdSimulatorModels.

      To be used in combination with createComponent and insertComponent.

      See Also:
  • Constructor Details

    • TLcyPreviewAddOnCustomizerFactory

      public TLcyPreviewAddOnCustomizerFactory()
      Creates a new TLcyPreviewAddOnCustomizerFactory. You will have to set the TLcyPreviewAddOn and the ILcyLucyEnv before using it.
    • TLcyPreviewAddOnCustomizerFactory

      public TLcyPreviewAddOnCustomizerFactory(TLcyPreviewAddOn aPreviewAddOn, ILcyLucyEnv aLucyEnv)
      Creates a new TLcyPreviewAddOnCustomizerFactory for the given TLcyPreviewAddOn and ILcyLucyEnv.
      Parameters:
      aPreviewAddOn - The preview addon to create a gui for.
      aLucyEnv - The lucy env.
  • Method Details

    • createPreviewAddOnCustomizer

      public Customizer createPreviewAddOnCustomizer()
      Creates the Customizer (the gui) to customize the TLcyPreviewAddOn.
      Specified by:
      createPreviewAddOnCustomizer in class ALcyPreviewAddOnCustomizerFactory
      Returns:
      A customizer that can be used to customize the TLcyPreviewAddOn.
    • finalizeCreation

      protected void finalizeCreation(Container aPreviewContainer)
      Method called to finalize the creation process. Can be used for clean up tasks etc.
      Parameters:
      aPreviewContainer - The preview container under construction.
    • createAction

      protected ILcdAction createAction(int aID, Container aPreviewPanel)
      Creates an action for the eventual Customizer. Note that the created action must not be inserted into the given aPreviewPanel. The inserting is done by insertAction.
      Parameters:
      aID - The id that indicates which action to create. One of constants that ends with ACTION.
      aPreviewPanel - The preview panel this component is created for.
      Returns:
      The created component.
      See Also:
    • insertAction

      protected void insertAction(int aID, ILcdAction aAction, Container aPreviewPanelSFCT)
      Inserts the given action into the given aPreviewPanelSFCT.
      Parameters:
      aID - The id that was used to create the given aAction.
      aAction - The action to insert.
      aPreviewPanelSFCT - The panel to insert the action into.
    • createComponent

      protected Component createComponent(int aID, Container aPreviewPanel)
      Creates a component for the eventual Customizer. Note that the created component must not be inserted into the given aPreviewPanel. The inserting is done by insertComponent.
      Parameters:
      aID - The id that indicates which component to create. One of constants that ends with COMPONENT.
      aPreviewPanel - The preview panel this component is created for.
      Returns:
      The created component.
      See Also:
    • insertComponent

      protected void insertComponent(int aID, Component aComponent, Container aPreviewPanelSFCT)
      Inserts the given component into the given aPreviewPanelSFCT.
      Parameters:
      aID - The id that was used to create the given aComponent.
      aComponent - The component to insert.
      aPreviewPanelSFCT - The panel to insert the component into.
      See Also: