public class PaletteEditor
extends javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private javax.swing.JToggleButton |
btnAddColor |
private javax.swing.JButton |
btnApply |
private javax.swing.JButton |
btnClose |
private javax.swing.JToggleButton |
btnDelColor |
private javax.swing.JButton |
btnNew |
private javax.swing.JButton |
btnSaveJava |
private javax.swing.JButton |
btnSaveMatLab |
private javax.swing.JButton |
btnSaveXML |
private javax.swing.JPanel |
centerPanel |
private javax.swing.JCheckBox |
chkInterpol |
private javax.swing.JCheckBox |
chkUseGradientPoints |
private javax.swing.JCheckBox |
chkVisible |
private javax.swing.JComboBox<Palette> |
cmbPalettes |
private javax.swing.JPanel |
colorPanel |
private Palette |
displayedPalette |
private javax.swing.JLabel |
jLabel |
private javax.swing.JLabel |
jLabel1 |
private javax.swing.JLabel |
jLabel2 |
private javax.swing.JLabel |
jLabel3 |
private javax.swing.JLabel |
jLabel4 |
private javax.swing.JLabel |
jLabel5 |
private javax.swing.JLabel |
lblColors |
private javax.swing.JLabel |
lblWhatToDo |
private javax.swing.JPanel |
mainPanel |
private int |
mode |
private javax.swing.JPanel |
northPanel |
private PaletteDisplayer |
paletteDrawingPanel |
private javax.swing.JPanel |
pnlAddRemoveColors |
private javax.swing.JPanel |
pnlColors |
private javax.swing.JPanel |
pnlSeperator |
private javax.swing.JPanel |
pnlSettings |
private javax.swing.JScrollPane |
scpColors |
private javax.swing.JScrollPane |
scpDescription |
private javax.swing.JPanel |
selectPanel |
private static long |
serialVersionUID |
private SOMViewer |
somViewer |
private static int |
SOMVIEWER |
private javax.swing.JPanel |
southPanel |
private javax.swing.JSpinner |
spnTargetColorCount |
private static int |
STANDALONE |
private CommonSOMViewerStateData |
state |
private javax.swing.JTextArea |
txtDescription |
private javax.swing.JTextField |
txtGroup |
private javax.swing.JTextField |
txtLongname |
private javax.swing.JTextField |
txtShortname |
private javax.swing.JTextField |
xmlFile |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
PaletteEditor()
Creates a new
PaletteEditor in the Standalone-mode. |
PaletteEditor(SOMViewer somViewer,
CommonSOMViewerStateData state)
Creates a new
PaletteEditor in the Embedded-mode, used together with the SOMViewer . |
Modifier and Type | Method and Description |
---|---|
private javax.swing.JButton |
createColorButton(int i,
java.awt.Color c) |
private javax.swing.JSpinner |
createGradientSpinner(int i,
double value,
double lBound,
double uBound) |
private javax.swing.JToggleButton |
getBtnAddColor()
This method initializes btnAddColor
|
private javax.swing.JButton |
getBtnApply()
This method initializes btnApply
|
private javax.swing.JButton |
getBtnClose()
This method initializes btnClose
|
private javax.swing.JToggleButton |
getBtnDelColor()
This method initializes btnDelColor
|
private javax.swing.JButton |
getBtnNew()
This method initializes btnNew
|
private javax.swing.JButton |
getBtnSaveJava()
This method initializes btnSaveJava
|
private javax.swing.JButton |
getBtnSaveMatLab()
This method initializes btnSaveMatLab
|
private javax.swing.JButton |
getBtnSaveXML()
This method initializes btnSaveXML
|
private javax.swing.JPanel |
getCenterPanel()
This method initializes centerPanel
|
private javax.swing.JCheckBox |
getChkInterpol()
This method initializes chkInterpol
|
private javax.swing.JCheckBox |
getChkUseGradientPoints()
This method initializes chkUseGradientPoints
|
private javax.swing.JCheckBox |
getChkVisible()
This method initializes chkVisible
|
private javax.swing.JPanel |
getColorPanel()
This method initializes colorPanel
|
private javax.swing.JPanel |
getEmbeddedPaletteSelector() |
private javax.swing.JPanel |
getMainPanel()
This method initializes mainPanel
|
private javax.swing.JPanel |
getNorthPanel()
This method initializes northPanel
|
private Palette |
getPalette() |
private PaletteDisplayer |
getPaletteDrawingPanel()
This method initializes paletteDrawingPanel
|
private javax.swing.JPanel |
getPnlAddRemoveColors()
This method initializes pnlAddRemoveColors
|
private javax.swing.JPanel |
getPnlColors()
This method initializes jPanel
|
private javax.swing.JPanel |
getPnlSeperator()
This method initializes pnlSeperator
|
private javax.swing.JPanel |
getPnlSettings()
This method initializes pnlSettings
|
private javax.swing.JScrollPane |
getScpColors()
This method initializes scpColors
|
private javax.swing.JScrollPane |
getScpDescription()
This method initializes scpDescription
|
private javax.swing.JPanel |
getSelectPanel()
This method initializes selectPanel
|
private javax.swing.JPanel |
getSouthPanel()
This method initializes southPanel
|
private javax.swing.JSpinner |
getSpnTargetColorCount()
This method initializes spnTargetColorCount
|
private javax.swing.JPanel |
getStandalonePaletteSelector() |
private javax.swing.JTextArea |
getTxtDescription()
This method initializes txtDescription
|
private javax.swing.JTextField |
getTxtGroup()
This method initializes txtGroup
|
private javax.swing.JTextField |
getTxtLongname()
This method initializes txtLongname
|
private javax.swing.JTextField |
getTxtShortname()
This method initializes txtShortname
|
private void |
initialize()
This method initializes this
|
static void |
main(java.lang.String[] args)
Starts the
PaletteEditor in Standalone-Mode. |
private void |
setPalette(Palette p)
Set the palette to edit.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, 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, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private javax.swing.JPanel northPanel
private javax.swing.JPanel centerPanel
private javax.swing.JPanel mainPanel
private javax.swing.JPanel southPanel
private javax.swing.JButton btnClose
private javax.swing.JButton btnSaveJava
private javax.swing.JButton btnSaveMatLab
private javax.swing.JButton btnSaveXML
private javax.swing.JButton btnNew
private javax.swing.JPanel selectPanel
private PaletteDisplayer paletteDrawingPanel
private javax.swing.JCheckBox chkInterpol
private javax.swing.JSpinner spnTargetColorCount
private javax.swing.JLabel lblColors
private javax.swing.JScrollPane scpColors
private javax.swing.JPanel colorPanel
private javax.swing.JCheckBox chkUseGradientPoints
private SOMViewer somViewer
private CommonSOMViewerStateData state
private Palette displayedPalette
private final int mode
private static final int STANDALONE
private static final int SOMVIEWER
private javax.swing.JButton btnApply
private javax.swing.JPanel pnlSeperator
private javax.swing.JPanel pnlAddRemoveColors
private javax.swing.JToggleButton btnAddColor
private javax.swing.JToggleButton btnDelColor
private javax.swing.JLabel lblWhatToDo
private javax.swing.JPanel pnlSettings
private javax.swing.JLabel jLabel
private javax.swing.JTextField txtShortname
private javax.swing.JLabel jLabel1
private javax.swing.JTextField txtLongname
private javax.swing.JLabel jLabel2
private javax.swing.JScrollPane scpDescription
private javax.swing.JTextArea txtDescription
private javax.swing.JComboBox<Palette> cmbPalettes
private javax.swing.JTextField xmlFile
private javax.swing.JPanel pnlColors
private javax.swing.JLabel jLabel3
private javax.swing.JTextField txtGroup
private javax.swing.JLabel jLabel4
private javax.swing.JLabel jLabel5
private javax.swing.JCheckBox chkVisible
public PaletteEditor()
PaletteEditor
in the Standalone-mode.public PaletteEditor(SOMViewer somViewer, CommonSOMViewerStateData state)
PaletteEditor
in the Embedded-mode, used together with the SOMViewer
.somViewer
- the SOMViewer
to wich the changes sould be applied.state
- the CommonSOMViewerStateData
holding various data, including the palettes to edit.private javax.swing.JPanel getStandalonePaletteSelector()
private javax.swing.JPanel getEmbeddedPaletteSelector()
private void initialize()
private javax.swing.JPanel getNorthPanel()
private javax.swing.JPanel getCenterPanel()
private javax.swing.JPanel getMainPanel()
private javax.swing.JPanel getSouthPanel()
private javax.swing.JButton getBtnClose()
private javax.swing.JButton getBtnSaveJava()
private javax.swing.JButton getBtnSaveMatLab()
private javax.swing.JButton getBtnSaveXML()
private javax.swing.JButton getBtnNew()
private javax.swing.JPanel getSelectPanel()
private PaletteDisplayer getPaletteDrawingPanel()
private javax.swing.JCheckBox getChkInterpol()
private javax.swing.JSpinner getSpnTargetColorCount()
private javax.swing.JScrollPane getScpColors()
private javax.swing.JPanel getColorPanel()
private javax.swing.JCheckBox getChkUseGradientPoints()
private javax.swing.JButton getBtnApply()
private javax.swing.JPanel getPnlSeperator()
private javax.swing.JPanel getPnlAddRemoveColors()
private javax.swing.JToggleButton getBtnAddColor()
private javax.swing.JToggleButton getBtnDelColor()
private javax.swing.JPanel getPnlSettings()
private javax.swing.JTextField getTxtShortname()
private javax.swing.JTextField getTxtLongname()
private javax.swing.JScrollPane getScpDescription()
private javax.swing.JTextArea getTxtDescription()
private javax.swing.JPanel getPnlColors()
private javax.swing.JTextField getTxtGroup()
private javax.swing.JCheckBox getChkVisible()
public static void main(java.lang.String[] args)
PaletteEditor
in Standalone-Mode.args
- Palette.savePaletteToXML(File)
which will be loaded
at startup.private javax.swing.JButton createColorButton(int i, java.awt.Color c)
private javax.swing.JSpinner createGradientSpinner(int i, double value, double lBound, double uBound)
private Palette getPalette()
private void setPalette(Palette p)
p
- The Palette.