public class ColorPane extends DialogPane implements ChangeListener, DocumentListener, ItemListener
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected BioColorWidget |
blue
Color map widgets.
|
protected JSlider |
brightness
Slider for level of brightness.
|
protected JLabel |
brightnessValue
Label for current brightness value.
|
protected JRadioButton |
composite
Color model options.
|
protected JRadioButton |
constant
Opacity model options.
|
protected JSlider |
contrast
Slider for level of contrast.
|
protected JLabel |
contrastValue
Label for current contrast value.
|
protected JRadioButton |
curved
Opacity model options.
|
protected JFileChooser |
fileBox
LUT file chooser.
|
protected JCheckBox |
fixed
Option for fixed color scaling.
|
protected BioColorWidget |
green
Color map widgets.
|
protected ColorHandler |
handler
Color handler for this color pane.
|
protected JTextField |
hiVal
Text field for high color scale value.
|
protected JRadioButton |
hsv
Color model options.
|
protected boolean |
ignore
Should changes to the color components be ignored?
|
protected JTextField |
loVal
Text field for low color scale value.
|
static String[] |
LUT_NAMES
Names for preset color look-up table.
|
protected JButton |
lutLoad
Button for loading color look-up table.
|
protected JButton |
lutPresets
Button for selecting a color look-up table from a list of presets.
|
static float[][][] |
LUTS
Preset color look-up tables.
|
protected JButton |
lutSave
Button for saving color look-up table.
|
protected JPopupMenu |
lutsMenu
Popup menu for selecting a preset color look-up table.
|
protected ScalarMap[] |
maps
List of mappings from range components to RGB.
|
protected JSlider |
opacity
Slider for level of opacity.
|
protected JLabel |
opacityValue
Label for current opacity value.
|
protected DisplayImpl |
preview
Color preview display.
|
protected BioColorWidget |
red
Color map widgets.
|
protected JRadioButton |
rgb
Color model options.
|
protected BioComboBox |
selector
Combo box for choosing color widgets.
|
protected JLabel |
toLabel
Label for fixed color scale.
|
protected JPanel |
widgetPane
GUI panel for color table widget.
|
APPROVE_OPTION, cancel, CANCEL_OPTION, dialog, ok, pane, rval, title
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ColorPane(ColorHandler h)
Constructs a dialog for adjusting color parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Handles GUI events.
|
void |
changedUpdate(DocumentEvent e)
Handles text field changes.
|
protected void |
doAlphas()
Updates image transparencies, when settings are adjusted.
|
protected void |
doColorRanges()
Updates image color ranges, when settings are adjusted.
|
protected void |
doColorTables()
Updates image color tables, when settings are adjusted.
|
RealType |
getBlue()
Gets current blue RealType.
|
int |
getBrightness()
Gets current brightness value.
|
int |
getColorMode()
Gets current color model.
|
int |
getContrast()
Gets current contrast value.
|
boolean[] |
getFixed()
Gets whether each color table has a fixed color range.
|
RealType |
getGreen()
Gets current green RealType.
|
double[] |
getHi()
Gets color table range maximums.
|
double[] |
getLo()
Gets color table range minimums.
|
int |
getOpacityModel()
Gets current opacity model.
|
int |
getOpacityValue()
Gets current opacity value.
|
RealType |
getRed()
Gets current red RealType.
|
float[][][] |
getTables()
Gets color table values.
|
void |
guessTypes()
Guesses reasonable mappings from range RealTypes to color components.
|
void |
insertUpdate(DocumentEvent e)
Handles text field additions.
|
void |
itemStateChanged(ItemEvent e)
ItemListener method for handling color mapping changes.
|
protected JPanel |
makeMappingsPanel()
Constructs panel containing color mapping combo boxes.
|
protected JPanel |
makeModelPanel()
Constructs panel containing color model radio buttons.
|
protected JPanel |
makeSliderPanel()
Constructs panel with brightness, contrast and transparency sliders.
|
protected JPanel |
makeTablesPanel()
Constructs panel containing color table components.
|
void |
removeUpdate(DocumentEvent e)
Handles text field deletions.
|
void |
resetComponents()
Resets the color pane's components to their default states.
|
void |
setPreviewData(FlatField ff)
Sets the data displayed in the preview display to that given.
|
void |
setWidgetTable(float[][] table)
Sets the currently selected range component's color widget table.
|
void |
stateChanged(ChangeEvent e)
Handles slider changes.
|
doButtonLayout, makeButtons, showDialog, showDialog, showDialog, showDialog, showDialog, showDialog, showDialog
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final String[] LUT_NAMES
public static final float[][][] LUTS
protected JFileChooser fileBox
protected DisplayImpl preview
protected JPanel widgetPane
protected JSlider brightness
protected JLabel brightnessValue
protected JSlider contrast
protected JLabel contrastValue
protected JSlider opacity
protected JLabel opacityValue
protected JRadioButton constant
protected JRadioButton curved
protected JRadioButton rgb
protected JRadioButton hsv
protected JRadioButton composite
protected BioColorWidget red
protected BioColorWidget green
protected BioColorWidget blue
protected BioComboBox selector
protected JCheckBox fixed
protected JTextField loVal
protected JLabel toLabel
protected JTextField hiVal
protected JButton lutLoad
protected JButton lutSave
protected JPopupMenu lutsMenu
protected JButton lutPresets
protected ColorHandler handler
protected ScalarMap[] maps
protected boolean ignore
public ColorPane(ColorHandler h)
public void setPreviewData(FlatField ff) throws VisADException, RemoteException
VisADException
RemoteException
public void guessTypes()
public void setWidgetTable(float[][] table)
public int getBrightness()
public int getContrast()
public int getOpacityValue()
public int getOpacityModel()
public int getColorMode()
public RealType getRed()
public RealType getGreen()
public RealType getBlue()
public double[] getLo()
public double[] getHi()
public boolean[] getFixed()
public float[][][] getTables()
public void resetComponents()
resetComponents
in class DialogPane
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
actionPerformed
in class DialogPane
public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public void changedUpdate(DocumentEvent e)
changedUpdate
in interface DocumentListener
public void insertUpdate(DocumentEvent e)
insertUpdate
in interface DocumentListener
public void removeUpdate(DocumentEvent e)
removeUpdate
in interface DocumentListener
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
protected JPanel makeSliderPanel()
protected JPanel makeModelPanel()
protected JPanel makeMappingsPanel()
protected JPanel makeTablesPanel()
protected void doColorTables()
protected void doAlphas()
protected void doColorRanges()
Copyright © 2015–2022 SciJava. All rights reserved.