|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
at.tuwien.ifs.somtoolbox.apps.PaletteEditor
public class PaletteEditor
This class allows you to quickly view, edit, create and export palettes. It can be used embedded into the SOMViewer or started Standalone.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
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 |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
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 . |
Method Summary | |
---|---|
private JButton |
createColorButton(int i,
Color c)
|
private JSpinner |
createGradientSpinner(int i,
double value,
double lBound,
double uBound)
|
private JToggleButton |
getBtnAddColor()
This method initializes btnAddColor |
private JButton |
getBtnApply()
This method initializes btnApply |
private JButton |
getBtnClose()
This method initializes btnClose |
private JToggleButton |
getBtnDelColor()
This method initializes btnDelColor |
private JButton |
getBtnNew()
This method initializes btnNew |
private JButton |
getBtnSaveJava()
This method initializes btnSaveJava |
private JButton |
getBtnSaveMatLab()
This method initializes btnSaveMatLab |
private JButton |
getBtnSaveXML()
This method initializes btnSaveXML |
private JPanel |
getCenterPanel()
This method initializes centerPanel |
private JCheckBox |
getChkInterpol()
This method initializes chkInterpol |
private JCheckBox |
getChkUseGradientPoints()
This method initializes chkUseGradientPoints |
private JCheckBox |
getChkVisible()
This method initializes chkVisible |
private JPanel |
getColorPanel()
This method initializes colorPanel |
private JPanel |
getEmbeddedPaletteSelector()
|
private JPanel |
getMainPanel()
This method initializes mainPanel |
private JPanel |
getNorthPanel()
This method initializes northPanel |
private Palette |
getPalette()
|
private PaletteDisplayer |
getPaletteDrawingPanel()
This method initializes paletteDrawingPanel |
private JPanel |
getPnlAddRemoveColors()
This method initializes pnlAddRemoveColors |
private JPanel |
getPnlColors()
This method initializes jPanel |
private JPanel |
getPnlSeperator()
This method initializes pnlSeperator |
private JPanel |
getPnlSettings()
This method initializes pnlSettings |
private JScrollPane |
getScpColors()
This method initializes scpColors |
private JScrollPane |
getScpDescription()
This method initializes scpDescription |
private JPanel |
getSelectPanel()
This method initializes selectPanel |
private JPanel |
getSouthPanel()
This method initializes southPanel |
private JSpinner |
getSpnTargetColorCount()
This method initializes spnTargetColorCount |
private JPanel |
getStandalonePaletteSelector()
|
private JTextArea |
getTxtDescription()
This method initializes txtDescription |
private JTextField |
getTxtGroup()
This method initializes txtGroup |
private JTextField |
getTxtLongname()
This method initializes txtLongname |
private JTextField |
getTxtShortname()
This method initializes txtShortname |
private void |
initialize()
This method initializes this |
static void |
main(String[] args)
Starts the PaletteEditor in Standalone-Mode. |
private void |
setPalette(Palette p)
Set the palette to edit. |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private static final long serialVersionUID
private JPanel northPanel
private JPanel centerPanel
private JPanel mainPanel
private JPanel southPanel
private JButton btnClose
private JButton btnSaveJava
private JButton btnSaveMatLab
private JButton btnSaveXML
private JButton btnNew
private JPanel selectPanel
private PaletteDisplayer paletteDrawingPanel
private JCheckBox chkInterpol
private JSpinner spnTargetColorCount
private JLabel lblColors
private JScrollPane scpColors
private JPanel colorPanel
private 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 JButton btnApply
private JPanel pnlSeperator
private JPanel pnlAddRemoveColors
private JToggleButton btnAddColor
private JToggleButton btnDelColor
private JLabel lblWhatToDo
private JPanel pnlSettings
private JLabel jLabel
private JTextField txtShortname
private JLabel jLabel1
private JTextField txtLongname
private JLabel jLabel2
private JScrollPane scpDescription
private JTextArea txtDescription
private JComboBox cmbPalettes
private JTextField xmlFile
private JPanel pnlColors
private JLabel jLabel3
private JTextField txtGroup
private JLabel jLabel4
private JLabel jLabel5
private JCheckBox chkVisible
Constructor Detail |
---|
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.Method Detail |
---|
private JPanel getStandalonePaletteSelector()
private JPanel getEmbeddedPaletteSelector()
private void initialize()
private JPanel getNorthPanel()
private JPanel getCenterPanel()
private JPanel getMainPanel()
private JPanel getSouthPanel()
private JButton getBtnClose()
private JButton getBtnSaveJava()
private JButton getBtnSaveMatLab()
private JButton getBtnSaveXML()
private JButton getBtnNew()
private JPanel getSelectPanel()
private PaletteDisplayer getPaletteDrawingPanel()
private JCheckBox getChkInterpol()
private JSpinner getSpnTargetColorCount()
private JScrollPane getScpColors()
private JPanel getColorPanel()
private JCheckBox getChkUseGradientPoints()
private JButton getBtnApply()
private JPanel getPnlSeperator()
private JPanel getPnlAddRemoveColors()
private JToggleButton getBtnAddColor()
private JToggleButton getBtnDelColor()
private JPanel getPnlSettings()
private JTextField getTxtShortname()
private JTextField getTxtLongname()
private JScrollPane getScpDescription()
private JTextArea getTxtDescription()
private JPanel getPnlColors()
private JTextField getTxtGroup()
private JCheckBox getChkVisible()
public static void main(String[] args)
PaletteEditor
in Standalone-Mode.
args
- Palette.savePaletteToXML(File)
which will be loaded
at startup.private JButton createColorButton(int i, Color c)
private JSpinner createGradientSpinner(int i, double value, double lBound, double uBound)
private Palette getPalette()
private void setPalette(Palette p)
p
- The Palette.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |