| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--ncsa.horizon.awt.color.HorizonColorModelDisplay
The display is made up of a HorizonColorBar and three LabeledColors, the latter representing the undefined, underflow, and overflow color values. ColorModels can be passed to this class (via the constructor or the setActiveColorModel() method) in the form of an IndexColorModel or a HorizonColorModel. If the color model reference is of the last kind, the bar will allow the user to mutate the model via mouse drags on the canvas and mouse clicks on the LabeledColors.
Fiddling the color model via the color bar is the same as for the HorizonColorBar. This fiddling comes in two modes: shifting and stretching. Shifting is done by dragging the mouse left or right; this causes the values in the color table to be shifted. By dragging the mouse up or down, one can compress or stretch the array of colors in the color table.
The special colors representing undefined, underflow, and overflow values can be edited by clicking on the corresponding colored box. This will bring up a widget that allows the red, green, blue, and alpha components to be edited.
| Fields inherited from class java.awt.Component | |
| BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT | |
| Constructor Summary | |
| HorizonColorModelDisplay(java.awt.image.IndexColorModel indexcolormodel)
Given an IndexColorModel, instantiates a HorizonColorModelDisplay. |
|
| HorizonColorModelDisplay(HorizonColorModel hcm,
boolean allowFiddling)
Instantiate a HorizonColorModelDisplay with a given HorizonColorModel. |
|
| Method Summary | |
| void | actionPerformed(java.awt.event.ActionEvent e)
Performs the action of opening ColorEditPanels when a LabeledColor is clicked on. |
| StretchableColorModel | getActiveColorModel()
return the color model currently being displayed. |
| static void | main(java.lang.String[] args)
|
| void | setActiveColorModel(java.awt.image.IndexColorModel cm)
replace the current color model being displayed. |
| void | setActiveColorModel(HorizonColorModel cm,
boolean allowFiddling)
replace the current color model being displayed. |
| Methods inherited from class java.awt.Panel | |
| addNotify | |
| Methods inherited from class java.awt.Container | |
| add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree | |
| Methods inherited from class java.awt.Component | |
| action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate | |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Constructor Detail |
public HorizonColorModelDisplay(java.awt.image.IndexColorModel indexcolormodel)
indecolormodel
- an IndexColorModel.
public HorizonColorModelDisplay(HorizonColorModel hcm,
boolean allowFiddling)
hcm
- a HorizonColorModel.
allowFiddling
- if true, allow the model to be modified.| Method Detail |
public void setActiveColorModel(java.awt.image.IndexColorModel cm)
public void setActiveColorModel(HorizonColorModel cm,
boolean allowFiddling)
cm
- a HorizonColorModel
allowFiddling
- if true, allow fiddling of the color modelpublic StretchableColorModel getActiveColorModel()
public void actionPerformed(java.awt.event.ActionEvent e)
e
- an ActionEvent.public static void main(java.lang.String[] args)
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||