org.das2.graph
Class DasLabelAxis

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.DasLabelAxis
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Editable, DataRangeSelectionListener, TimeRangeSelectionListener, DasUpdateListener

public class DasLabelAxis
extends DasAxis
implements DasUpdateListener

See Also:
Serialized Form

Nested Class Summary
 
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
 
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
protected DasLabelAxis(DatumVector labels, DataRange dataRange, int orientation)
           
  DasLabelAxis(DatumVector labels, int orientation)
           
 
Method Summary
 DasAxis createAttachedAxis(DasRow row, DasColumn column)
           
 DasAxis createAttachedAxis(int orientation)
          TODO
 Datum findTick(Datum xDatum, double direction, boolean minor)
          TODO
 java.awt.geom.AffineTransform getAffineTransform(DasAxis.Memento memento, java.awt.geom.AffineTransform at)
          return the AffineTransform, or null.
 int getInterItemSpace()
           
 int getItemMax(Datum d)
           
 int getItemMin(Datum d)
           
 int[] getLabelPositions()
           
 int getOutsidePadding()
          Getter for property outsidePadding.
 TickVDescriptor getTickV()
          TODO
 Datum invTransform(double d)
           
 boolean isFloppyItemSpacing()
          Getter for property floppyltemSpacing.
protected  void paintHorizontalAxis(java.awt.Graphics2D g)
          Paint the axis if it is horizontal
protected  void paintVerticalAxis(java.awt.Graphics2D g)
          Paint the axis if it is vertical
protected  boolean rangeIsAcceptable(DatumRange dr)
           
 void setFloppyItemSpacing(boolean floppyItemSpacing)
          Setter for property floppyltemSpacing.
 void setLabelFormatter(DatumFormatter df)
          vg1pws needed a way to explicitly set this.
 void setOutsidePadding(int outsidePadding)
          Setter for property outsidePadding.
protected  java.lang.String tickFormatter(Datum t)
          return a label for this datum and visible range.
protected  java.lang.String[] tickFormatter(DatumVector tickV, DatumRange datumRange)
          return the tick labels for these datums and visible range.
 double transform(double value, Units units)
          Transforms a double in the given units in data coordinates to a horizontal or vertical position on the parent canvas.
 void update(DasUpdateEvent e)
           
 void updateTickV()
           
 
Methods inherited from class org.das2.graph.DasAxis
addMouseListener, addMouseMotionListener, addMouseWheelListener, addTimeRangeSelectionListener, addToFavorites, areTickLabelsVisible, attachTo, clearHistory, clone, createAttachedAxis, createNamedAxis, dataRangeSelected, detach, deviceRangeChanged, drawLabel, getActiveRegion, getAxisBounds, getDataMaximum, getDataMaximum, getDataMinimum, getDataMinimum, getDataPath, getDataRange, getDatumFormatter, getDatumRange, getDevicePosition, getDLength, getDOMElement, getDrawTca, getFormat, getLabel, getLabelBounds, getLabelFont, getLineSpacing, getMasterAxis, getMaxLabelWidth, getMemento, getOrientation, getRange, getTickDirection, getTickLabelFont, getTitlePositionOffset, getUnits, getUserDatumFormatter, installComponent, isAnimated, isAttached, isFlipLabel, isFlipped, isHorizontal, isLog, isOppositeAxisVisible, isTickLabelsVisible, mutatorLock, orientationToString, paintComponent, parseOrientationString, 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, timeRangeSelected, toString, transform, transform, transformFast, uninstallComponent, updateImmediately, 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
 

Constructor Detail

DasLabelAxis

protected DasLabelAxis(DatumVector labels,
                       DataRange dataRange,
                       int orientation)

DasLabelAxis

public DasLabelAxis(DatumVector labels,
                    int orientation)
Method Detail

setLabelFormatter

public void setLabelFormatter(DatumFormatter df)
vg1pws needed a way to explicitly set this.


getLabelPositions

public int[] getLabelPositions()

findTick

public Datum findTick(Datum xDatum,
                      double direction,
                      boolean minor)
Description copied from class: DasAxis
TODO

Overrides:
findTick in class DasAxis
Returns:

updateTickV

public void updateTickV()
Overrides:
updateTickV in class DasAxis

getTickV

public TickVDescriptor getTickV()
Description copied from class: DasAxis
TODO

Overrides:
getTickV in class DasAxis
Returns:

transform

public double transform(double value,
                        Units units)
Description copied from class: DasAxis
Transforms a double in the given units in data coordinates to a horizontal or vertical position on the parent canvas.

Overrides:
transform in class DasAxis
Parameters:
value - a data value
units - the units of the given data value.
Returns:
Horizontal or vertical position on the canvas.

invTransform

public Datum invTransform(double d)
Overrides:
invTransform in class DasAxis

rangeIsAcceptable

protected boolean rangeIsAcceptable(DatumRange dr)
Overrides:
rangeIsAcceptable in class DasAxis

tickFormatter

protected java.lang.String tickFormatter(Datum t)
Description copied from class: DasAxis
return a label for this datum and visible range. This is intended to be overriden to change behavior. Note that both tickFormatter methods should be overridden.

Overrides:
tickFormatter in class DasAxis
Returns:
string, possibly with Granny control characters.

tickFormatter

protected java.lang.String[] tickFormatter(DatumVector tickV,
                                           DatumRange datumRange)
Description copied from class: DasAxis
return the tick labels for these datums and visible range. This is intended to be overriden to change behavior. Note that both tickFormatter methods should be overridden.

Overrides:
tickFormatter in class DasAxis
Returns:
Strings, possibly with Granny control characters.

getInterItemSpace

public int getInterItemSpace()

getItemMin

public int getItemMin(Datum d)

getItemMax

public int getItemMax(Datum d)

createAttachedAxis

public DasAxis createAttachedAxis(DasRow row,
                                  DasColumn column)

createAttachedAxis

public DasAxis createAttachedAxis(int orientation)
Description copied from class: DasAxis
TODO

Overrides:
createAttachedAxis in class DasAxis
Returns:

update

public void update(DasUpdateEvent e)
Specified by:
update in interface DasUpdateListener

paintHorizontalAxis

protected void paintHorizontalAxis(java.awt.Graphics2D g)
Description copied from class: DasAxis
Paint the axis if it is horizontal

Overrides:
paintHorizontalAxis in class DasAxis

paintVerticalAxis

protected void paintVerticalAxis(java.awt.Graphics2D g)
Description copied from class: DasAxis
Paint the axis if it is vertical

Overrides:
paintVerticalAxis in class DasAxis

getOutsidePadding

public int getOutsidePadding()
Getter for property outsidePadding.

Returns:
Value of property outsidePadding.

setOutsidePadding

public void setOutsidePadding(int outsidePadding)
Setter for property outsidePadding.

Parameters:
outsidePadding - New value of property outsidePadding.

isFloppyItemSpacing

public boolean isFloppyItemSpacing()
Getter for property floppyltemSpacing.

Returns:
Value of property floppyltemSpacing.

setFloppyItemSpacing

public void setFloppyItemSpacing(boolean floppyItemSpacing)
Setter for property floppyltemSpacing.

Parameters:
floppyItemSpacing - New value of property floppyltemSpacing.

getAffineTransform

public java.awt.geom.AffineTransform getAffineTransform(DasAxis.Memento memento,
                                                        java.awt.geom.AffineTransform at)
Description copied from class: DasAxis
return the AffineTransform, or null. The transform will be applied after the input transform is applied. So to just get the transform, pass in identity.

Overrides:
getAffineTransform in class DasAxis