Class SurveyListChooser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RequestHandler, TabComponent

public class SurveyListChooser extends JPanel implements TabComponent, RequestHandler

The SurveyListChooser class is a panel that allows the user to manipulate a list of EarthDataSurvey objects. The user may add a new point, line, or box survey, edit the survey color, name and linestyle, and change the survey layer.

The chooser signals a change in the survey list by firing a property change event whose property name is given by SURVEY_LIST_PROPERTY. See the AbstractOverlayListPanel class for details on how the property change events should be interpreted.

Surveys require that extra information be provided from the user object. The chooser signals that it requires input for a survey by firing an action event whose action command specifies the type of input required as POINT_COMMAND, LINE_COMMAND, or BOX_COMMAND. The user object should perform some operation to obtain the survey input information, and then pass it to the addSurvey() method.

Since:
3.1.7
Author:
Peter Hollemans
See Also:
  • Field Details

  • Constructor Details

    • SurveyListChooser

      public SurveyListChooser()
      Creates a new survey list chooser.
  • Method Details

    • getToolBarButtons

      public static List<AbstractButton> getToolBarButtons()
      Since:
      3.8.1
    • handleRequest

      public void handleRequest(Request request)
      Specified by:
      handleRequest in interface RequestHandler
    • canHandleRequest

      public boolean canHandleRequest(Request request)
      Specified by:
      canHandleRequest in interface RequestHandler
    • getSurveyCommand

      public String getSurveyCommand()
      Gets the last survey command executed.
    • addSurveyActionListener

      public void addSurveyActionListener(ActionListener listener)
      Adds the specified listener for receiving survey input action commands.
    • getToolTip

      public String getToolTip()
      Description copied from interface: TabComponent
      Gets the tab tooltip.
      Specified by:
      getToolTip in interface TabComponent
      Returns:
      the tooltip text if the tab is to have an appearing tooltip when the mouse hovers over the tab, or null if no tooltip is required.
    • getTitle

      public String getTitle()
      Description copied from interface: TabComponent
      Gets the tab title.
      Specified by:
      getTitle in interface TabComponent
      Returns:
      the title to be used if the tab is to have a text label as a title, or null if no title is required.
    • getIcon

      public Icon getIcon()
      Description copied from interface: TabComponent
      Gets the tab icon.
      Specified by:
      getIcon in interface TabComponent
      Returns:
      the icon to be used if the tab is to have an icon beside the title label, or null if no icon is required.
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Redirects overlay property listeners to the list panel.
      Overrides:
      addPropertyChangeListener in class Container
    • addSurvey

      public void addSurvey(EarthDataSurvey survey)
      Adds a new survey. A survey overlay is created for the survey and the overlay added to the list.
      Parameters:
      survey - the new data survey to add.
    • deactivate

      public void deactivate()
      Deactivates the survey so that no survey is selected.