jas.plot
Class Axis

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--jas.plot.PlotComponent
                          |
                          +--jas.plot.Axis
All Implemented Interfaces:
HasPopupItems, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
ManagedAxis

public class Axis
extends PlotComponent
implements HasPopupItems

This class represents a plot axis as a GUI component. It depends on a subclass of AxisType to implement the type-specific properties necessary for a meaningful axis.

See Also:
AxisType, Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int HORIZONTAL
          Represents horizontal orientation for both labels and axes.
static int VERTICAL
          Represents vertical orientation for both labels and axes.
 
Fields inherited from class jas.plot.PlotComponent
BEVEL_IN, BEVEL_OUT, ETCHED, LINE, NONE, OTHER, SHADOW
 
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
Axis()
          This consturctor is primarily for object deserialization.
Axis(AxisType type, boolean onLeftSide)
          Creates a vertical axis object.
Axis(AxisType type, int axisOrientation)
          Creates a new axis object.
Axis(AxisType type, int axisOrientation, boolean onLeftSide)
          Creates a new axis object.
Axis(int axisOrientation)
          Creates a new axis object, using a numeric axis (class DoubleAxis).
Axis(int axisOrientation, boolean onLeftSide)
          Creates a numerical axis object (uses class DoubleAxis).
 
Method Summary
 java.awt.Color getAxisColor()
           
 int getAxisOrientation()
           
 java.awt.Color getAxisOriginDotColor()
           
 java.awt.Color getMajorTickMarkColor()
           
 int getMaxLocation()
          Used by superclasses to convert coordinates.
 int getMinLocation()
          Used by superclasses to convert coordinates.
 java.awt.Color getMinorTickMarkColor()
           
 boolean getOnLeftSide()
           
 java.awt.Color getTextColor()
           
 AxisType getType()
          Returns the AxisType for this axis.
 void modifyPopupMenu(javax.swing.JPopupMenu menu, java.awt.Component source)
          Modify the given menu object.
 void setAxisColor(java.awt.Color newColor)
           
protected  void setAxisOrientation(int i)
           
 void setAxisOriginDotColor(java.awt.Color newColor)
           
 void setBounds(int x, int y, int width, int height)
          This method is public as an implementation side-effect; do not call.
 void setFont(java.awt.Font font)
           
 void setMajorTickMarkColor(java.awt.Color newColor)
           
 void setMinorTickMarkColor(java.awt.Color newColor)
           
 void setOnLeftSide(boolean left)
           
 void setTextColor(java.awt.Color newColor)
           
 void setType(AxisType type)
          Sets the AxisType for this axis.
 
Methods inherited from class jas.plot.PlotComponent
getBorderType, isPaintingBackground, paintComponent, setBackground, setBorderType
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERTICAL

public static final int VERTICAL
Represents vertical orientation for both labels and axes.

HORIZONTAL

public static final int HORIZONTAL
Represents horizontal orientation for both labels and axes.
Constructor Detail

Axis

public Axis()
This consturctor is primarily for object deserialization. It creates a vertical axis object with a numeric (class DoubleAxis) which will be on the left side.
See Also:
DoubleAxis

Axis

public Axis(AxisType type,
            int axisOrientation)
Creates a new axis object. If this axis is vertical it will be on the left side of the plot.
Parameters:
type - the AxisType object that represents the data type for this axis
axisOrientation - the orientation of the axis (use constants Axis.HORIZONTAL and Axis.VERTICAL)

Axis

public Axis(int axisOrientation)
Creates a new axis object, using a numeric axis (class DoubleAxis). If this axis is vertical it will be on the left side of the plot.
Parameters:
axisOrientation - the orientation of the axis (use constants Axis.HORIZONTAL and Axis.VERTICAL)
See Also:
DoubleAxis

Axis

public Axis(int axisOrientation,
            boolean onLeftSide)
Creates a numerical axis object (uses class DoubleAxis).
Parameters:
axisOrientation - the orientation of the axis (use constants Axis.HORIZONTAL and Axis.VERTICAL)
onLeftSide - whether this axis is on the left
See Also:
DoubleAxis

Axis

public Axis(AxisType type,
            boolean onLeftSide)
Creates a vertical axis object.
Parameters:
type - the AxisType object that represents the data type for this axis
onLeftSide - whether this axis is on the left

Axis

public Axis(AxisType type,
            int axisOrientation,
            boolean onLeftSide)
Creates a new axis object.
Parameters:
type - the AxisType object that represents the data type for this axis
axisOrientation - the orientation of the axis (use constants Axis.HORIZONTAL and Axis.VERTICAL)
onLeftSide - whether this axis is on the left
Method Detail

modifyPopupMenu

public void modifyPopupMenu(javax.swing.JPopupMenu menu,
                            java.awt.Component source)
Description copied from interface: HasPopupItems
Modify the given menu object.
Specified by:
modifyPopupMenu in interface HasPopupItems

setType

public final void setType(AxisType type)
Sets the AxisType for this axis.

setFont

public final void setFont(java.awt.Font font)
Overrides:
setFont in class javax.swing.JComponent

getType

public final AxisType getType()
Returns the AxisType for this axis.

getMinLocation

public final int getMinLocation()
Used by superclasses to convert coordinates.

getMaxLocation

public final int getMaxLocation()
Used by superclasses to convert coordinates.

setBounds

public final void setBounds(int x,
                            int y,
                            int width,
                            int height)
This method is public as an implementation side-effect; do not call.
Overrides:
setBounds in class java.awt.Component

getAxisOrientation

public final int getAxisOrientation()

setAxisOrientation

protected final void setAxisOrientation(int i)

getOnLeftSide

public final boolean getOnLeftSide()

setOnLeftSide

public final void setOnLeftSide(boolean left)

getAxisColor

public java.awt.Color getAxisColor()

setAxisColor

public void setAxisColor(java.awt.Color newColor)

getAxisOriginDotColor

public java.awt.Color getAxisOriginDotColor()

setAxisOriginDotColor

public void setAxisOriginDotColor(java.awt.Color newColor)

getMajorTickMarkColor

public java.awt.Color getMajorTickMarkColor()

setMajorTickMarkColor

public void setMajorTickMarkColor(java.awt.Color newColor)

getMinorTickMarkColor

public java.awt.Color getMinorTickMarkColor()

setMinorTickMarkColor

public void setMinorTickMarkColor(java.awt.Color newColor)

getTextColor

public java.awt.Color getTextColor()

setTextColor

public void setTextColor(java.awt.Color newColor)