org.das2.graph
Class DasColorBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by org.das2.graph.DasCanvasComponent
                  extended by org.das2.graph.DasAxis
                      extended by org.das2.graph.DasColorBar
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Editable, DataRangeSelectionListener, TimeRangeSelectionListener

public class DasColorBar
extends DasAxis

See Also:
Serialized Form

Nested Class Summary
protected  class DasColorBar.ColorBarLayoutManager
           
 class DasColorBar.ColorBarRepaletteMouseModule
           
static class DasColorBar.Type
           
 
Nested classes/interfaces inherited from class org.das2.graph.DasAxis
DasAxis.AxisLayoutManager, DasAxis.Lock, DasAxis.Memento
 
Nested classes/interfaces inherited from class org.das2.graph.DasCanvasComponent
DasCanvasComponent.CanvasComponentAction
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
static java.lang.String PROPERTY_FILL_COLOR
           
static java.lang.String PROPERTY_TYPE
           
 
Fields inherited from class org.das2.graph.DasAxis
autoTickV, axisLabel, BOTTOM, dataRange, datumFormatter, DOWN, flipLabel, formatString, HORIZONTAL, LEFT, primaryInputPanel, PROP_BOUNDS, PROP_FLIPLABEL, PROP_FORMATSTRING, PROP_LABEL, PROP_LOG, PROP_OPPOSITE_AXIS_VISIBLE, PROP_UNITS, PROPERTY_DATUMRANGE, PROPERTY_TICKS, RIGHT, secondaryInputPanel, tickV, TOP, UP, VERTICAL
 
Fields inherited from class org.das2.graph.DasCanvasComponent
mouseAdapter, PROPERTIES_ACTION
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
 
Constructor Summary
DasColorBar(Datum min, Datum max, boolean isLog)
           
DasColorBar(Datum min, Datum max, int orientation, boolean isLog)
           
 
Method Summary
static DasColorBar createNamedColorBar(java.lang.String name)
           
 java.awt.Shape getActiveRegion()
          TODO
protected  java.awt.Rectangle getAxisBounds()
          Calculate the rectangle that bounds the axis including its labels.
static DasColumn getColorBarColumn(DasColumn column)
           
 org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
          TODO
 java.awt.Color getFillColor()
          Getter for property fillColor.
 int getFillColorIndex()
           
 java.awt.image.IndexColorModel getIndexColorModel()
           
 MouseModule getRepaletteMouseModule(Renderer r)
           
 DasColorBar.Type getType()
           
 int indexColorTransform(double x, Units units)
           
protected  void paintComponent(java.awt.Graphics g)
          paints the axis component.
 int rgbTransform(double x, Units units)
           
 void setFillColor(java.awt.Color fillColor)
          Setter for property fillColor.
 void setType(DasColorBar.Type type)
           
 
Methods inherited from class org.das2.graph.DasAxis
addMouseListener, addMouseMotionListener, addMouseWheelListener, addTimeRangeSelectionListener, addToFavorites, areTickLabelsVisible, attachTo, clearHistory, clone, createAttachedAxis, createAttachedAxis, createNamedAxis, dataRangeSelected, detach, deviceRangeChanged, drawLabel, findTick, getAffineTransform, getDataMaximum, getDataMaximum, getDataMinimum, getDataMinimum, getDataPath, getDataRange, getDatumFormatter, getDatumRange, getDevicePosition, getDLength, getDrawTca, getFormat, getLabel, getLabelBounds, getLabelFont, getLineSpacing, getMasterAxis, getMaxLabelWidth, getMemento, getOrientation, getRange, getTickDirection, getTickLabelFont, getTickV, getTitlePositionOffset, getUnits, getUserDatumFormatter, installComponent, invTransform, isAnimated, isAttached, isFlipLabel, isFlipped, isHorizontal, isLog, isOppositeAxisVisible, isTickLabelsVisible, mutatorLock, orientationToString, paintHorizontalAxis, paintVerticalAxis, parseOrientationString, rangeIsAcceptable, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeTimeRangeSelectionListener, resetRange, resize, scanNext, scanPrevious, setAnimated, setDataMaximum, setDataMinimum, setDataPath, setDataRange, setDataRangeForward, setDataRangePrev, setDataRangeZoomOut, setDataSetDescriptor, setDatumRange, setDrawTca, setFlipLabel, setFlipped, setFormat, setLabel, setLabelFont, setLog, setOppositeAxisVisible, setOrientation, setPlot, setTickLabelFont, setTickLabelsVisible, setTickV, setUnits, setUserDatumFormatter, tickFormatter, tickFormatter, timeRangeSelected, toString, transform, transform, transform, transformFast, uninstallComponent, updateImmediately, updateTickV, valueIsAdjusting
 
Methods inherited from class org.das2.graph.DasCanvasComponent
acceptContext, addMouseModule, coalesceEvents, getActions, getCanvas, getColumn, getDasMouseInputAdapter, getDasName, getEmSize, getFont, getMouseAdapter, getRow, processDasUpdateEvent, processEvent, removeMouseModule, setBounds, setBounds, setColumn, setDasMouseInputAdapter, setDasName, setRow, showProperties, update
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI
 
Methods inherited from class java.awt.Container
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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, bounds, checkImage, checkImage, 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, 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, hide, 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, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_TYPE

public static final java.lang.String PROPERTY_TYPE
See Also:
Constant Field Values

PROPERTY_FILL_COLOR

public static final java.lang.String PROPERTY_FILL_COLOR
See Also:
Constant Field Values
Constructor Detail

DasColorBar

public DasColorBar(Datum min,
                   Datum max,
                   boolean isLog)

DasColorBar

public DasColorBar(Datum min,
                   Datum max,
                   int orientation,
                   boolean isLog)
Method Detail

rgbTransform

public int rgbTransform(double x,
                        Units units)

indexColorTransform

public int indexColorTransform(double x,
                               Units units)

getIndexColorModel

public java.awt.image.IndexColorModel getIndexColorModel()

getFillColorIndex

public int getFillColorIndex()

getType

public DasColorBar.Type getType()

setType

public void setType(DasColorBar.Type type)

paintComponent

protected void paintComponent(java.awt.Graphics g)
Description copied from class: DasAxis
paints the axis component. The tickV's and bounds should be calculated at this point

Overrides:
paintComponent in class DasAxis

getAxisBounds

protected java.awt.Rectangle getAxisBounds()
Description copied from class: DasAxis
Calculate the rectangle that bounds the axis including its labels. When the axis is drawn on both sides of the plot, this rectangle will extend across the plot.

Overrides:
getAxisBounds in class DasAxis
Returns:
Rectangle containing the axes and its labels.

getColorBarColumn

public static DasColumn getColorBarColumn(DasColumn column)

getDOMElement

public org.w3c.dom.Element getDOMElement(org.w3c.dom.Document document)
Description copied from class: DasAxis
TODO

Overrides:
getDOMElement in class DasAxis
Returns:

createNamedColorBar

public static DasColorBar createNamedColorBar(java.lang.String name)

getActiveRegion

public java.awt.Shape getActiveRegion()
Description copied from class: DasAxis
TODO

Overrides:
getActiveRegion in class DasAxis

getRepaletteMouseModule

public MouseModule getRepaletteMouseModule(Renderer r)

getFillColor

public java.awt.Color getFillColor()
Getter for property fillColor.

Returns:
Value of property fillColor.

setFillColor

public void setFillColor(java.awt.Color fillColor)
Setter for property fillColor.

Parameters:
fillColor - New value of property fillColor.