public class AxisLayout extends Layout
setRangeModel(ValuedRangeModel) method. Also, the set of items
processed by this layout can be filtered by providing a filtering
predicate (@link #setFilter(Predicate)).m_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpbm_groupDEFAULT_STEP_TIME, INFINITY| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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 determining 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 determining the span of the axis.
|
void |
setScale(int scale)
Sets the scale type used for the axis.
|
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setYgetGroup, setGroupgetVisualization, run, setVisualizationaddActivityListener, 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, setStepTimepublic 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.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)
Actionrun in class GroupActionfrac - 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)