Class ListProjectionChoice

    • Constructor Detail

      • ListProjectionChoice

        protected ListProjectionChoice​(String name,
                                       String id,
                                       String[] entries,
                                       String label,
                                       int defaultIndex)
        Constructs a new ListProjectionChoice.
        Parameters:
        name - the display name
        id - the unique id for this ProjectionChoice
        entries - the list of display entries for the combo-box
        label - a label shown left to the combo-box
        defaultIndex - the default index for the combo-box
      • ListProjectionChoice

        protected ListProjectionChoice​(String name,
                                       String id,
                                       String[] entries,
                                       String label)
        Constructs a new ListProjectionChoice.
        Parameters:
        name - the display name
        id - the unique id for this ProjectionChoice
        entries - the list of display entries for the combo-box
        label - a label shown left to the combo-box
    • Method Detail

      • zoneToIndex

        protected abstract int zoneToIndex​(String zone)
        Convert preference value to 0-based index.
        Parameters:
        zone - preference value
        Returns:
        0-based index
        See Also:
        indexToZone(int)
      • setPreferences

        public void setPreferences​(Collection<String> args)
        Description copied from interface: ProjectionChoice
        Set the internal state to match the preferences. Will be called before getPreferencePanel and when the listener from getPreferencePanel is invoked.
        Parameters:
        args - preferences as a list of strings; may be null to reset everything.
      • getPreferencePanel

        public JPanel getPreferencePanel​(ActionListener listener)
        Description copied from interface: ProjectionChoice
        Generate and provide the GUI. It will be displayed to the user. Call the listener, when the user makes changes in the GUI, so the projection info in the top panel gets updated.
        Parameters:
        listener - listener for any change of preferences
        Returns:
        the GUI panel