public class DasColorBar extends DasAxis
Modifier and Type | Class and Description |
---|---|
protected class |
DasColorBar.ColorBarLayoutManager
TODO: Ed document me
|
static class |
DasColorBar.Type
enumeration of the types of colorbars.
|
DasAxis.AxisLayoutManager, DasAxis.Lock, DasAxis.Memento
DasCanvasComponent.CanvasComponentAction
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_SHOWCOLORBAR |
static java.lang.String |
PROP_SPECIALCOLORS |
static java.lang.String |
PROPERTY_FILL_COLOR
handle for the property fillColor.
|
static java.lang.String |
PROPERTY_TYPE
handle for the property "type".
|
axisLabel, BOTTOM, dataRange, datumFormatter, dividerDatumFormatter, enableHistory, flipLabel, formatString, HORIZONTAL, LEFT, majorTicksDomainDivider, MAX_TCA_LINES, minorTicksDomainDivider, primaryInputPanel, PROP_AXISOFFSET, PROP_BOUNDS, PROP_DIVIDERDATUMFORMATTER, PROP_ENABLEHISTORY, PROP_FLIPLABEL, PROP_FLIPPED, PROP_FONTSIZE, PROP_FORMATSTRING, PROP_LABEL, PROP_LINETHICKNESS, PROP_LOCKDOMAINDIVIDER, PROP_LOG, PROP_MAJORTICKSDOMAINDIVIDER, PROP_MINORTICKSDOMAINDIVIDER, PROP_OPPOSITE_AXIS_VISIBLE, PROP_REFERENCE, PROP_SCAN_RANGE, PROP_TCALABELS, PROP_TCAROWS, PROP_TICKVALUES, PROP_UNITS, PROP_USEDOMAINDIVIDER, PROPERTY_DATUMRANGE, PROPERTY_TICKS, RIGHT, secondaryInputPanel, tickV, TOP, useDomainDivider, VERTICAL
mouseAdapter, PROP_OPAQUEBACKGROUND, PROPERTIES_ACTION
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DasColorBar(Datum min,
Datum max,
boolean log)
Create an color bar object, relating data and color.
|
DasColorBar(Datum min,
Datum max,
int orientation,
boolean log)
Create an color bar object, relating data and color.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Shape |
getActiveRegion()
get the region containing the axis.
|
java.awt.Rectangle |
getAxisBounds()
Calculate the rectangle that bounds the axis including its labels.
|
static DasColumn |
getColorBarColumn(DasColumn column)
return a column suitable for the colorbar, based on the spectrogram
column.
|
java.awt.Color |
getFillColor()
get the color used to indicate fill, often gray or a transparent
white.
|
int |
getFillColorIndex()
return the index of the fill color in the indexed color model.
|
java.awt.image.IndexColorModel |
getIndexColorModel()
return the color model so that indexed color model can be used.
|
java.lang.String |
getSpecialColors() |
DasColorBar.Type |
getType()
return the type of colorbar (e.g.
|
int |
indexColorTransform(double data,
Units units)
convert the double to an indexed color.
|
boolean |
isShowColorBar() |
protected void |
paintComponent(java.awt.Graphics g)
paints the axis component.
|
int |
rgbTransform(double data,
Units units)
convert the double to an RGB color.
|
void |
setFillColor(java.awt.Color fillColor)
set the color used to indicate fill, often gray or a transparent
white.
|
void |
setShowColorBar(boolean showColorBar)
when set to false, this is basically an ordinary axis.
|
void |
setSpecialColors(java.lang.String specialColors)
set this to a comma-delineated list of name:value pairs,
|
void |
setType(DasColorBar.Type type)
set the type of colorbar
|
addMouseListener, addMouseMotionListener, addMouseWheelListener, addTickV, addTimeRangeSelectionListener, addToFavorites, attachTo, clearHistory, clone, createAttachedAxis, createAttachedAxis, dataRangeSelected, detach, deviceRangeChanged, drawLabel, findTick, getAffineTransform, getAxisOffset, getAxisOffsetPixels, getDataMaximum, getDataMaximum, getDataMinimum, getDataMinimum, getDataPath, getDataRange, getDatumFormatter, getDatumRange, getDevicePosition, getDividerDatumFormatter, getDLength, getDrawTca, getFontSize, getFormat, getLabel, getLabelBounds, getLabelFont, getLabelOffset, getLineSpacing, getLineThickness, getMajorTicksDomainDivider, getMasterAxis, getMaxLabelWidth, getMemento, getMinorTicksDomainDivider, getOrientation, getRange, getReference, getScanRange, getTcaLabels, getTcaRows, getTickDirection, getTickLabelFont, getTickLength, getTickLines, getTickV, getTickValues, getTitlePositionOffset, getUnits, getUserDatumFormatter, installComponent, invTransform, invTransform, isAnimated, isAttached, isDrawTca, isEnableHistory, isFlipLabel, isFlipped, isHorizontal, isLockDomainDivider, isLog, isOppositeAxisVisible, isTcaLoaded, isTickLabelsVisible, isUseDomainDivider, mutatorLock, paintHorizontalAxis, paintVerticalAxis, processEvent, rangeIsAcceptable, removeFromFavorites, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeTimeRangeSelectionListener, repaint, resetRange, resetTickV, resize, scanNext, scanPrevious, setAnimated, setAxisOffset, setDataMaximum, setDataMinimum, setDataPath, setDataRange, setDataRangeForward, setDataRangePrev, setDataRangeZoomOut, setDatumRange, setDividerDatumFormatter, setDrawTca, setEnableHistory, setFlipLabel, setFlipped, setFontSize, setFormat, setLabel, setLabelOffset, setLeftXLabelOverride, setLineThickness, setLockDomainDivider, setLog, setMajorTicksDomainDivider, setMinorTicksDomainDivider, setNextAction, setNextActionLabel, setOppositeAxisVisible, setOrientation, setPlot, setPreviousAction, setPreviousActionLabel, setReference, setScanRange, setTcaFunction, setTcaLabels, setTcaRows, setTickLabelsVisible, setTickLength, setTickV, setTickV, setTickValues, setUnits, setUseDomainDivider, setUserDatumFormatter, setVisible, tickFormatter, tickFormatter, timeRangeSelected, toString, transform, transform, transform, transform, transform, transformFast, uninstallComponent, updateImmediately, updateTickV, updateTickVManualTicks, valueIsAdjusting
acceptContext, addMouseModule, coalesceEvents, getActions, getCanvas, getColumn, getDasMouseInputAdapter, getDasName, getEmSize, getFont, getLineThicknessDouble, getRow, isOpaqueBackground, processDasUpdateEvent, removeMouseModule, setColumn, setDasName, setOpaqueBackground, setRow, showProperties, update
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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, unregisterKeyboardAction, update, updateUI
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, transferFocusDownCycle, validate, validateTree
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, getAccessibleContext, 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, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String PROPERTY_TYPE
public static final java.lang.String PROPERTY_FILL_COLOR
public static final java.lang.String PROP_SPECIALCOLORS
public static final java.lang.String PROP_SHOWCOLORBAR
public DasColorBar(Datum min, Datum max, boolean log)
min
- the minimum valuemax
- the maximum valuelog
- if true then the axis is a log axis.public DasColorBar(Datum min, Datum max, int orientation, boolean log)
min
- the minimum valuemax
- the maximum valueorientation
- the position relative to a plot, one of DasAxis.TOP, DasAxis.BOTTOM, DasAxis.LEFT, DasAxis.RIGHT.log
- if true then the axis is a log axis.public java.lang.String getSpecialColors()
public void setSpecialColors(java.lang.String specialColors)
specialColors
- public int rgbTransform(double data, Units units)
data
- a data valueunits
- the units of the given data value.Color(int)
public int indexColorTransform(double data, Units units)
data
- a data valueunits
- the units of the given data value.getIndexColorModel()
public java.awt.image.IndexColorModel getIndexColorModel()
public int getFillColorIndex()
public DasColorBar.Type getType()
public final void setType(DasColorBar.Type type)
type
- type of colorbar (e.g. DasColorBar.Type.GRAYSCALE or DasColorBar.Type.APL_RAINBOW_BLACK0)protected void paintComponent(java.awt.Graphics g)
DasAxis
paintComponent
in class DasAxis
g
- the graphics context.public java.awt.Rectangle getAxisBounds()
DasAxis
getAxisBounds
in class DasAxis
public static DasColumn getColorBarColumn(DasColumn column)
column
- the column for the spectrogram described.public java.awt.Shape getActiveRegion()
DasAxis
getActiveRegion
in class DasAxis
public boolean isShowColorBar()
public void setShowColorBar(boolean showColorBar)
showColorBar
- true if the colorbar should be drawn.public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color fillColor)
fillColor
- the new fill color.