Class OverlayPropertyChooser<T extends EarthDataOverlay>

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
GenericOverlayPropertyChooser, MultilayerBitmaskOverlayPropertyChooser, MultiPointFeatureOverlayPropertyChooser, PointFeatureOverlayPropertyChooser

public abstract class OverlayPropertyChooser<T extends EarthDataOverlay> extends JPanel
The OverlayPropertyChooser class is a panel that holds an overlay value and allows the user to retrieve the value. The panel contents must be setup by the child class. When a change to the overlay is made, the child must fire a property change event whose property is given by the OVERLAY_PROPERTY constant. Child classes must implement the getTitle() method to return the overlay property chooser title shown in the titled border.
Since:
3.1.7
Author:
Peter Hollemans
See Also:
  • Field Details

    • OVERLAY_PROPERTY

      public static String OVERLAY_PROPERTY
      The overlay property.
    • overlay

      protected T extends EarthDataOverlay overlay
      The overlay to use for choosing properties.
  • Constructor Details

    • OverlayPropertyChooser

      protected OverlayPropertyChooser(T newOverlay)
      Creates a new overlay property chooser panel.
  • Method Details

    • getTitle

      protected abstract String getTitle()
      Gets the title that will be used to annotate the properties panel. The properties panel will be titled "XXX Overlay Properties" where "XXX" is the string returned by this method.
    • getOverlay

      public T getOverlay()
      Gets the overlay stored by this chooser panel.
      Returns:
      the overlay shown by this chooser.
      Throws:
      IllegalStateException - if the chooser controls are not in a valid state.
    • validateInput

      protected void validateInput()

      Checks the chooser settings for validity. Some overlay choosers may have a complex set of controls that will not always be in a valid state. This method is called by the getOverlay() method to ensure that the chooser controls are set properly.

      The default implementation of this method does nothing. It is up to the child class to override this method and perform actual validation.

      Throws:
      IllegalStateException - if the chooser controls are not in a valid state.