Package org.sm.smtools.swing.dialogs
Class JCustomColorMapChooser
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.sm.smtools.swing.dialogs.JDefaultDialog
org.sm.smtools.swing.dialogs.JCustomColorMapChooser
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public final class JCustomColorMapChooser extends JDefaultDialog implements java.awt.event.ActionListener, javax.swing.event.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:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class org.sm.smtools.swing.dialogs.JDefaultDialog
JDefaultDialog.EModality, JDefaultDialog.ESize, JDefaultDialog.EType
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
Constructors Constructor Description JCustomColorMapChooser(javax.swing.JFrame owner, int nrOfColors, java.util.TreeMap<java.lang.Integer,JGradientColorMap.CustomColorMapComponent> customColorMapComponents)
Constructs anIterationRangeChooser
object. -
Method Summary
Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
The dialog box's action listener.void
clearControls()
java.util.TreeMap<java.lang.Integer,JGradientColorMap.CustomColorMapComponent>
getSelectedCustomColorMapComponents()
Returns the selected custom colour map components.protected void
initialiseClass(java.lang.Object[] parameters)
Performs custom initialisation of the about box's member fields.protected void
setupMainPanel(javax.swing.JPanel mainPanel)
Creates the dialog box content area.protected java.lang.String
setupWindowTitle()
Returns the dialog box's title.void
stateChanged(javax.swing.event.ChangeEvent e)
Methods inherited from class org.sm.smtools.swing.dialogs.JDefaultDialog
activate, cancelSelected, disableAutoPositioning, initialiseDuringActivation, isCancelled, isShown, okSelected, setupInitialDialogSize, updateGUI, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, toBack
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, list, list, paintComponents, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, hasFocus, imageUpdate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, list, list, list, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
JCustomColorMapChooser
public JCustomColorMapChooser(javax.swing.JFrame owner, int nrOfColors, java.util.TreeMap<java.lang.Integer,JGradientColorMap.CustomColorMapComponent> customColorMapComponents)Constructs anIterationRangeChooser
object.- Parameters:
owner
- the owning framenrOfColors
- the number of colourscustomColorMapComponents
- the color map components
-
-
Method Details
-
actionPerformed
public void actionPerformed(java.awt.event.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 interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDefaultDialog
- Parameters:
e
- theActionEvent
that is received
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
getSelectedCustomColorMapComponents
public java.util.TreeMap<java.lang.Integer,JGradientColorMap.CustomColorMapComponent> getSelectedCustomColorMapComponents()Returns the selected custom colour map components.- Returns:
- the selected custom colour map components
-
initialiseClass
protected void initialiseClass(java.lang.Object[] parameters)Performs custom initialisation of the about box's member fields.- Overrides:
initialiseClass
in classJDefaultDialog
- Parameters:
parameters
- an array ofObjects
-
setupWindowTitle
protected java.lang.String setupWindowTitle()Returns the dialog box's title.- Overrides:
setupWindowTitle
in classJDefaultDialog
- Returns:
- the window title of the dialog box
-
setupMainPanel
protected void setupMainPanel(javax.swing.JPanel mainPanel)Creates the dialog box content area.Note that this method cannot be overridden!
- Overrides:
setupMainPanel
in classJDefaultDialog
- Parameters:
mainPanel
- the area of the dialog box that is reserved for custom content
-
clearControls
public void clearControls()
-