|
||||||||||
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.AxisLayout
public class AxisLayout
Layout Action that assigns positions along a single dimension (either x or
y) according to a specified data field. By default, the range of values
along the axis is automatically determined by the minimum and maximum
values of the data field. The range bounds can be manually set using the
setRangeModel(ValuedRangeModel)
method. Also, the set of items
processed by this layout can be filtered by providing a filtering
predicate (@link #setFilter(Predicate)).
Field Summary |
---|
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 | |
---|---|
AxisLayout(java.lang.String group,
java.lang.String field)
Create a new AxisLayout. |
|
AxisLayout(java.lang.String group,
java.lang.String field,
int axis)
Create a new AxisLayout. |
|
AxisLayout(java.lang.String group,
java.lang.String field,
int axis,
Predicate filter)
Create a new AxisLayout. |
Method Summary | |
---|---|
int |
getAxis()
Return the axis type of this layout, either Constants.X_AXIS or Constants.Y_AXIS . |
java.lang.String |
getDataField()
Get the data field used by this axis layout action. |
int |
getDataType()
Return the data type used by this layout. |
protected int |
getDataType(TupleSet ts)
Retrieve the data type. |
Predicate |
getFilter()
Get the predicate filter to limit which items are considered for layout. |
ValuedRangeModel |
getRangeModel()
Get the range model determing the span of the axis. |
int |
getScale()
Returns the scale type used for the axis. |
protected void |
numericalLayout(TupleSet ts)
Compute a quantitative axis layout. |
protected void |
ordinalLayout(TupleSet ts)
Compute an ordinal axis layout. |
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs. |
protected void |
set(VisualItem item,
double frac)
Set the layout position of an item. |
void |
setAxis(int axis)
Set the axis type of this layout. |
void |
setDataField(java.lang.String field)
Set the data field used by this axis layout action. |
void |
setDataType(int type)
Set the data type used by this layout. |
void |
setFilter(Predicate filter)
Set a predicate filter to limit which items are considered for layout. |
void |
setRangeModel(ValuedRangeModel model)
Set the range model determing the span of the axis. |
void |
setScale(int scale)
Sets the scale type used for the axis. |
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 |
Constructor Detail |
---|
public AxisLayout(java.lang.String group, java.lang.String field)
group
- the data group to layoutfield
- the data field upon which to base the layoutpublic AxisLayout(java.lang.String group, java.lang.String field, int axis)
group
- the data group to layoutfield
- the data field upon which to base the layoutaxis
- the axis type, either Constants.X_AXIS
or Constants.Y_AXIS
.public AxisLayout(java.lang.String group, java.lang.String field, int axis, Predicate filter)
group
- the data group to layoutfield
- the data field upon which to base the layoutaxis
- the axis type, either Constants.X_AXIS
or Constants.Y_AXIS
.filter
- an optional predicate filter for limiting which items
to layout.Method Detail |
---|
public void setDataField(java.lang.String field)
field
- the name of the data field that determines the layoutpublic java.lang.String getDataField()
public void setRangeModel(ValuedRangeModel model)
ValuedRangeModel.getLowValue()
and
ValuedRangeModel.getHighValue()
methods.
model
- the range model for the axis.public ValuedRangeModel getRangeModel()
ValuedRangeModel.getLowValue()
and
ValuedRangeModel.getHighValue()
methods.
public void setFilter(Predicate filter)
filter
- the predicate filter to use. If null, no filtering
will be performed.public Predicate getFilter()
public int getScale()
NumberValuedRange
).
Constants.LINEAR_SCALE
,
Constants.SQRT_SCALE
, or
Constants.LOG_SCALE
.public void setScale(int scale)
NumberValuedRange
).
scale
- the scale type. One of
Constants.LINEAR_SCALE
,
Constants.SQRT_SCALE
, or
Constants.LOG_SCALE
.public int getAxis()
Constants.X_AXIS
or Constants.Y_AXIS
.
public void setAxis(int axis)
axis
- the axis type to use for this layout, either
Constants.X_AXIS
or Constants.Y_AXIS
.public int getDataType()
Constants.NOMINAL
, Constants.ORDINAL
,
Constants.NUMERICAL
, or
Constants.UNKNOWN
.
public void setDataType(int type)
type
- the data type used by this layout, one of
Constants.NOMINAL
, Constants.ORDINAL
,
Constants.NUMERICAL
, or
Constants.UNKNOWN
.public void run(double frac)
Action
run
in class GroupAction
frac
- the fraction of this Action's duration that has elapsed.Action.run(double)
protected int getDataType(TupleSet ts)
protected void set(VisualItem item, double frac)
protected void numericalLayout(TupleSet ts)
protected void ordinalLayout(TupleSet ts)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |