|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.activity.Activity
prefuse.action.Action
prefuse.action.GroupAction
prefuse.action.layout.Layout
prefuse.action.layout.AxisLabelLayout
public class AxisLabelLayout
Layout Action that positions axis grid lines and labels for a given range model.
| Field Summary | |
|---|---|
static java.lang.String |
FRAC
|
static java.lang.String |
LABEL
|
static java.lang.String |
VALUE
|
| Fields inherited from class prefuse.action.layout.Layout |
|---|
m_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpb |
| Fields inherited from class prefuse.action.GroupAction |
|---|
m_group |
| Fields inherited from class prefuse.action.Action |
|---|
m_vis |
| Fields inherited from class prefuse.activity.Activity |
|---|
DEFAULT_STEP_TIME, INFINITY |
| Constructor Summary | |
|---|---|
AxisLabelLayout(java.lang.String group,
AxisLayout layout)
Create a new AxisLabelLayout layout. |
|
AxisLabelLayout(java.lang.String group,
AxisLayout layout,
java.awt.geom.Rectangle2D bounds)
Create a new AxisLabelLayout layout. |
|
AxisLabelLayout(java.lang.String group,
AxisLayout layout,
java.awt.geom.Rectangle2D bounds,
double spacing)
Create a new AxisLabelLayout layout. |
|
AxisLabelLayout(java.lang.String group,
Axis axis,
ValuedRangeModel values)
Create a new AxisLabelLayout layout. |
|
AxisLabelLayout(java.lang.String group,
Axis axis,
ValuedRangeModel values,
java.awt.geom.Rectangle2D bounds)
Create a new AxisLabelLayout layout. |
|
| Method Summary | |
|---|---|
protected double |
adjust(double v)
Adjust a value according to the current scale type. |
protected void |
garbageCollect(VisualTable<?,? extends VisualItem<?>> labels)
Remove axis labels no longer being used. |
protected double |
getBreadth(java.awt.geom.Rectangle2D b)
Get the "breadth" of a rectangle, based on the axis type. |
protected double |
getLinearStep(double span,
double scale)
Compute a linear step between axis marks. |
java.text.NumberFormat |
getNumberFormat()
Get the formatter used to format labels for numerical values. |
protected int |
getOrdinalStep(double span,
double scale)
Compute an ordinal step between axis marks. |
Scale |
getScale()
Returns the scale type used for the axis. |
double |
getSpacing()
Get the required minimum spacing between axis labels. |
protected VisualTable<?,? extends VisualItem<?>> |
getTable()
Create a new table for representing axis labels. |
boolean |
isAscending()
Indicates if the axis values should be presented in ascending order along the axis. |
protected void |
linearLayout(VisualTable<?,? extends VisualItem<?>> labels)
Calculates a quantitative, linearly scaled layout. |
protected void |
logLayout(VisualTable<?,? extends VisualItem<?>> labels)
Calculates a quantitative, logarithmically-scaled layout. |
protected void |
ordinalLayout(VisualTable<?,? extends VisualItem<?>> labels)
Compute an ordinal layout of axis marks. |
protected void |
reset(VisualItem<?> item)
Reset an axis label VisualItem |
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs. |
protected void |
set(VisualItem<?> item,
double xOrY,
java.awt.geom.Rectangle2D b)
Set the layout values for an axis label item. |
void |
setAscending(boolean asc)
Sets if the axis values should be presented in ascending order along the axis. |
void |
setNumberFormat(java.text.NumberFormat nf)
Set the formatter used to format labels for numerical values. |
void |
setRangeModel(ValuedRangeModel model)
Sets the range model used to layout this axis. |
void |
setScale(Scale scale)
Sets the scale type used for the axis. |
void |
setSpacing(double spacing)
Set the required minimum spacing between axis labels. |
protected void |
sqrtLayout(VisualTable<?,? extends VisualItem<?>> labels)
Calculates a quantitative, square root scaled layout. |
| Methods inherited from class prefuse.action.layout.Layout |
|---|
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setY |
| Methods inherited from class prefuse.action.GroupAction |
|---|
getGroup, setGroup |
| Methods inherited from class prefuse.action.Action |
|---|
getVisualization, run, setVisualization |
| Methods inherited from class prefuse.activity.Activity |
|---|
addActivityListener, alwaysRunAfter, cancel, fireActivityCancelled, fireActivityFinished, fireActivityScheduled, fireActivityStarted, fireActivityStepped, getDuration, getNextTime, getPace, getPacingFunction, getStartTime, getStepTime, getStopTime, isEnabled, isRunning, isScheduled, removeActivityListener, run, runAfter, runAt, setDuration, setEnabled, setPacingFunction, setStartTime, setStepTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FRAC
public static final java.lang.String LABEL
public static final java.lang.String VALUE
| Constructor Detail |
|---|
public AxisLabelLayout(java.lang.String group,
Axis axis,
ValuedRangeModel values)
group - the data group of the axis lines and labelsaxis - the axis typevalues - the range model that defines the span of the axis
public AxisLabelLayout(java.lang.String group,
Axis axis,
ValuedRangeModel values,
java.awt.geom.Rectangle2D bounds)
group - the data group of the axis lines and labelsaxis - the axis typevalues - the range model that defines the span of the axisbounds - the layout bounds within which to place the axis marks
public AxisLabelLayout(java.lang.String group,
AxisLayout layout)
group - the data group of the axis lines and labelslayout - an AxisLayout instance to model this layout after.
The axis type and range model of the provided instance will be used.
public AxisLabelLayout(java.lang.String group,
AxisLayout layout,
java.awt.geom.Rectangle2D bounds)
group - the data group of the axis lines and labelslayout - an AxisLayout instance to model this layout after.
The axis type and range model of the provided instance will be used.bounds - the layout bounds within which to place the axis marks
public AxisLabelLayout(java.lang.String group,
AxisLayout layout,
java.awt.geom.Rectangle2D bounds,
double spacing)
group - the data group of the axis lines and labelslayout - an AxisLayout instance to model this layout after.
The axis type and range model of the provided instance will be used.bounds - the layout bounds within which to place the axis marksspacing - the minimum spacing between axis labels| Method Detail |
|---|
public java.text.NumberFormat getNumberFormat()
NumberFormat used to format numerical labels.public void setNumberFormat(java.text.NumberFormat nf)
nf - the NumberFormat used to format numerical labels.public double getSpacing()
public void setSpacing(double spacing)
spacing - the axis label spacing to usepublic Scale getScale()
NumberValuedRange).
Scale.LINEAR,
Scale.SQRT, or
Scale.LOG.public void setScale(Scale scale)
NumberValuedRange).
scale - the scale type. One of
Scale.LINEAR,
Scale.SQRT, or
Scale.LOG.public boolean isAscending()
public void setAscending(boolean asc)
asc - true if data values should increase as pixel coordinates
increase, false if data values should decrease as pixel coordinates
increase.public void setRangeModel(ValuedRangeModel model)
model - the range modelpublic void run(double frac)
Action
run in class GroupActionfrac - the fraction of this Action's duration that has elapsed.GroupAction.run(double)protected void linearLayout(VisualTable<?,? extends VisualItem<?>> labels)
protected void sqrtLayout(VisualTable<?,? extends VisualItem<?>> labels)
protected void logLayout(VisualTable<?,? extends VisualItem<?>> labels)
protected double getBreadth(java.awt.geom.Rectangle2D b)
protected double adjust(double v)
protected double getLinearStep(double span,
double scale)
protected void ordinalLayout(VisualTable<?,? extends VisualItem<?>> labels)
protected int getOrdinalStep(double span,
double scale)
protected void set(VisualItem<?> item,
double xOrY,
java.awt.geom.Rectangle2D b)
protected void reset(VisualItem<?> item)
protected void garbageCollect(VisualTable<?,? extends VisualItem<?>> labels)
protected VisualTable<?,? extends VisualItem<?>> getTable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||