org.omegahat.Graphics.Plots
Class CategoricalAxis

java.lang.Object
  |
  +--org.omegahat.Graphics.Primitives.GraphicalObject
        |
        +--org.omegahat.Graphics.Primitives.RGO
              |
              +--org.omegahat.Graphics.Primitives.GraphicalContainer
                    |
                    +--org.omegahat.Graphics.Plots.Axis
                          |
                          +--org.omegahat.Graphics.Plots.CategoricalAxis
All Implemented Interfaces:
Addable, AxisInt, Copyable, GraphicalComponentInt, GraphicalContainerInt, MathOperable, ScaledComponentInt, SimpleGraphicalContainerInt, Subsettable, Tree
Direct Known Subclasses:
CategoricalBottomAxis

public abstract class CategoricalAxis
extends Axis

an axis with arbitrary strings as the labels. The axis uses a grid allocator to define a region for each tick


Fields inherited from class org.omegahat.Graphics.Plots.Axis
axisLabel, DEFAULT_NTICKS, nTicks, tickLabel, tickLocn, ticks
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalContainer
allocator, children, origin, parent, scaleX, scaleY
 
Fields inherited from class org.omegahat.Graphics.Primitives.RGO
region
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
ACTIVE, fontSize, lastDevice, lastHeightCM, lastRegion, lastWidthCM, parents, status, VISIBLE
 
Fields inherited from interface org.omegahat.Environment.DataStructures.MathOperable
DIVIDE, MINUS, MULTIPLY, PLUS
 
Constructor Summary
CategoricalAxis(java.lang.String[] labels)
           
CategoricalAxis(java.lang.String[] labels, java.lang.String label)
           
 
Method Summary
 GraphicalContainerInt createTick(java.lang.String label)
           
 void editScale(double min, double max)
          Change the scale to the given minimum and maximum.
 ScaleInt getScale()
          Get the scale object for this axis
 void makeAllocator(int numTicks)
           
 void makeAxis(java.lang.String[] labels, java.lang.String label)
           
 
Methods inherited from class org.omegahat.Graphics.Plots.Axis
create, createTickData, getAxisLabel, getNTicks, getTickLabels, getTickLocations, makeAxis, makeContainer, makeLabel, makeMajor, makeTicks, removeTicks, setAxisLabel, setNTicks, setTickLabels, setTickLocations
 
Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalContainer
add, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addValue, copy, copy, draw, drawChildren, get, getChild, getChildCount, getChildren, getDevice, getOrigin, getRegionAllocator, getXScale, getYScale, parent, parent, remove, removeGraphicalObject, removeGraphicalObject, setOrigin, setRegionAllocator, setXScale, setYScale, subset, subset, transform, transform
 
Methods inherited from class org.omegahat.Graphics.Primitives.RGO
center, centre, createRegionDescription, createRegionDescription, getRegion, height, height, setHJust, setRegion, setVJust, width, width, x, x, y, y
 
Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
cacheSize, getFontSize, getFontSize, getParameters, getParents, getStatus, isActive, isVisible, lastHeightCM, lastRegion, lastWidthCM, parents, setActive, setParameters, setParents, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omegahat.Graphics.Primitives.ScaledComponentInt
getXScale, getYScale, setXScale, setYScale
 
Methods inherited from interface org.omegahat.Graphics.Primitives.GraphicalComponentInt
draw, getParameters, getRegion, isActive, isVisible, parent, parent, parents, setActive, setParameters, setRegion, setVisible
 

Constructor Detail

CategoricalAxis

public CategoricalAxis(java.lang.String[] labels)

CategoricalAxis

public CategoricalAxis(java.lang.String[] labels,
                       java.lang.String label)
Method Detail

getScale

public ScaleInt getScale()
Description copied from interface: AxisInt
Get the scale object for this axis
Overrides:
getScale in class Axis

makeAllocator

public void makeAllocator(int numTicks)

makeAxis

public void makeAxis(java.lang.String[] labels,
                     java.lang.String label)

createTick

public GraphicalContainerInt createTick(java.lang.String label)

editScale

public void editScale(double min,
                      double max)
Description copied from class: Axis
Change the scale to the given minimum and maximum.

The bottom axis and left axis define this to recreate the suitable ticks, etc.

Overrides:
editScale in class Axis