Class JCustomColorMapChooser

All Implemented Interfaces:
ActionListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants

public final class JCustomColorMapChooser extends JDefaultDialog implements ActionListener, ChangeListener
The JCustomColorMapChooser class provides a dialog for creating a custom colour map:

Note that this class cannot be subclassed!

Version:
30/06/2018
Author:
Sven Maerivoet
See Also:
  • Constructor Details

    • JCustomColorMapChooser

      public JCustomColorMapChooser(JFrame owner, int nrOfColors, TreeMap<Integer,JGradientColorMap.CustomColorMapComponent> customColorMapComponents)
      Constructs an IterationRangeChooser object.
      Parameters:
      owner - the owning frame
      nrOfColors - the number of colours
      customColorMapComponents - the color map components
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Description copied from class: JDefaultDialog
      The dialog box's action listener.

      Note that when overriding this method in a subclass, its parent should explicitly be called in order to guarantee the correct processing of the user's input ("Ok" and "Ok/Cancel" type of dialog boxes):

      super.actionPerformed(e);
      // rest of method's code

      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDefaultDialog
      Parameters:
      e - the ActionEvent that is received
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Specified by:
      stateChanged in interface ChangeListener
    • getSelectedCustomColorMapComponents

      public TreeMap<Integer,JGradientColorMap.CustomColorMapComponent> getSelectedCustomColorMapComponents()
      Returns the selected custom colour map components.
      Returns:
      the selected custom colour map components
    • initialiseClass

      protected void initialiseClass(Object[] parameters)
      Performs custom initialisation of the about box's member fields.
      Overrides:
      initialiseClass in class JDefaultDialog
      Parameters:
      parameters - an array of Objects
    • setupWindowTitle

      protected String setupWindowTitle()
      Returns the dialog box's title.
      Overrides:
      setupWindowTitle in class JDefaultDialog
      Returns:
      the window title of the dialog box
    • setupMainPanel

      protected void setupMainPanel(JPanel mainPanel)
      Creates the dialog box content area.

      Note that this method cannot be overridden!

      Overrides:
      setupMainPanel in class JDefaultDialog
      Parameters:
      mainPanel - the area of the dialog box that is reserved for custom content
    • clearControls

      public void clearControls()