anl.aida.bubble
Class AbstractAxis

java.lang.Object
  extended by edu.umd.cs.piccolo.PNode
      extended by edu.umd.cs.piccolox.nodes.PComposite
          extended by anl.aida.bubble.AbstractAxis
All Implemented Interfaces:
java.awt.print.Printable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractDomainAxis, RangeAxis

public abstract class AbstractAxis
extends edu.umd.cs.piccolox.nodes.PComposite

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode
edu.umd.cs.piccolo.PNode.PSceneGraphDelegate
 
Field Summary
protected  edu.umd.cs.piccolo.nodes.PText axisLabel
           
protected  edu.umd.cs.piccolo.PCanvas canvas
           
protected  AxisHighlight highlight
           
protected  java.text.DecimalFormat highlightFormatter
           
protected  int insets
           
protected  java.lang.String label
           
protected  java.text.DecimalFormat labelFormatter
           
protected  NumericRange origRange
           
protected  float pixelExtent
           
protected  NumericRange range
           
protected  java.util.List<java.lang.Float> tickLocations
           
 
Fields inherited from class edu.umd.cs.piccolo.PNode
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
AbstractAxis(NumericRange range, java.lang.String label)
           
 
Method Summary
 java.lang.String getLabel()
           
 float getPixelExtent()
           
abstract  float getPixelLocation(double val)
          Gets the pixel location for the data value.
protected  float getPixelLocationLin(double val)
          Gets the pixel location for the data value in a linear scale.
protected  float getPixelLocationLog(double val)
          Gets the pixel location for the data value in a log scale.
 java.lang.Iterable<java.lang.Float> getTickLocations()
           
abstract  double getValueForPixel(double pixel)
          Gets the axis value for the pixel location.
protected  double getValueForPixelLin(double pixel)
           
protected  double getValueForPixelLog(double pixel)
           
abstract  void highlight(double val)
           
protected  void initRange(double extra)
           
protected abstract  void layout()
           
 void removeHighlight()
           
 void resetRange()
          Resets axis to its original range.
 void setLabel(java.lang.String label)
           
 void zoomTo(NumericRange range)
          Zooms the axis such that it shows the specified range.
 
Methods inherited from class edu.umd.cs.piccolox.nodes.PComposite
fullPick
 
Methods inherited from class edu.umd.cs.piccolo.PNode
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, internalUpdateBounds, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, paint, paintAfterChildren, paramString, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

highlightFormatter

protected java.text.DecimalFormat highlightFormatter

labelFormatter

protected java.text.DecimalFormat labelFormatter

range

protected NumericRange range

origRange

protected NumericRange origRange

label

protected java.lang.String label

canvas

protected edu.umd.cs.piccolo.PCanvas canvas

insets

protected int insets

pixelExtent

protected float pixelExtent

tickLocations

protected java.util.List<java.lang.Float> tickLocations

highlight

protected AxisHighlight highlight

axisLabel

protected edu.umd.cs.piccolo.nodes.PText axisLabel
Constructor Detail

AbstractAxis

public AbstractAxis(NumericRange range,
                    java.lang.String label)
Method Detail

initRange

protected void initRange(double extra)

layout

protected abstract void layout()

highlight

public abstract void highlight(double val)

removeHighlight

public void removeHighlight()

getPixelLocation

public abstract float getPixelLocation(double val)
Gets the pixel location for the data value.

Parameters:
val - the value to get the pixel location for
Returns:
the pixel location for the data value.

getValueForPixel

public abstract double getValueForPixel(double pixel)
Gets the axis value for the pixel location.

Parameters:
pixel - the pixel to get the axis value for
Returns:
the axis value for the pixel location.

zoomTo

public void zoomTo(NumericRange range)
Zooms the axis such that it shows the specified range.

Parameters:
range - the range to zoom to.

resetRange

public void resetRange()
Resets axis to its original range.


getPixelLocationLin

protected float getPixelLocationLin(double val)
Gets the pixel location for the data value in a linear scale.

Parameters:
val - the value to get the pixel location for
Returns:
the pixel location for the data value.

getValueForPixelLin

protected double getValueForPixelLin(double pixel)

getPixelLocationLog

protected float getPixelLocationLog(double val)
Gets the pixel location for the data value in a log scale.

Parameters:
val - the value to get the pixel location for
Returns:
the pixel location for the data value in a log scale.

getValueForPixelLog

protected double getValueForPixelLog(double pixel)

getTickLocations

public java.lang.Iterable<java.lang.Float> getTickLocations()

getPixelExtent

public float getPixelExtent()

getLabel

public java.lang.String getLabel()
Returns:
the label

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - the label to set