| prefuse.action.layout.Layout prefuse.action.layout.AxisLabelLayout
AxisLabelLayout | public class AxisLabelLayout extends Layout (Code) | | Layout Action that positions axis grid lines and labels for a given
range model.
author: jeffrey heer |
Constructor Summary | |
public | AxisLabelLayout(String group, int axis, ValuedRangeModel values) Create a new AxisLabelLayout layout. | public | AxisLabelLayout(String group, int axis, ValuedRangeModel values, Rectangle2D bounds) Create a new AxisLabelLayout layout. | public | AxisLabelLayout(String group, AxisLayout layout) Create a new AxisLabelLayout layout. | public | AxisLabelLayout(String group, AxisLayout layout, Rectangle2D bounds) Create a new AxisLabelLayout layout. | public | AxisLabelLayout(String group, AxisLayout layout, Rectangle2D bounds, double spacing) 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 labels) Remove axis labels no longer being used. | protected double | getBreadth(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. | public 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. | public int | getScale() Returns the scale type used for the axis. | public double | getSpacing() Get the required minimum spacing between axis labels. | protected VisualTable | getTable() Create a new table for representing axis labels. | public boolean | isAscending() Indicates if the axis values should be presented in ascending order
along the axis. | protected void | linearLayout(VisualTable labels) Calculates a quantitative, linearly scaled layout. | protected void | logLayout(VisualTable labels) Calculates a quantitative, logarithmically-scaled layout. | protected void | ordinalLayout(VisualTable labels) Compute an ordinal layout of axis marks. | protected void | reset(VisualItem item) | public void | run(double frac) | protected void | set(VisualItem item, double xOrY, Rectangle2D b) Set the layout values for an axis label item. | public void | setAscending(boolean asc) Sets if the axis values should be presented in ascending order
along the axis. | public void | setNumberFormat(NumberFormat nf) Set the formatter used to format labels for numerical values. | public void | setRangeModel(ValuedRangeModel model) Sets the range model used to layout this axis. | public void | setScale(int scale) Sets the scale type used for the axis. | public void | setSpacing(double spacing) Set the required minimum spacing between axis labels. | protected void | sqrtLayout(VisualTable labels) Calculates a quantitative, square root scaled layout. |
AxisLabelLayout | public AxisLabelLayout(String group, int axis, ValuedRangeModel values, Rectangle2D bounds)(Code) | | Create a new AxisLabelLayout layout.
Parameters: group - the data group of the axis lines and labels Parameters: axis - the axis type, either prefuse.Constants.X_AXISor prefuse.Constants.Y_AXIS. Parameters: values - the range model that defines the span of the axis Parameters: bounds - the layout bounds within which to place the axis marks |
AxisLabelLayout | public AxisLabelLayout(String group, AxisLayout layout)(Code) | | Create a new AxisLabelLayout layout.
Parameters: group - the data group of the axis lines and labels Parameters: layout - an AxisLayout instance to model this layout after.The axis type and range model of the provided instance will be used. |
AxisLabelLayout | public AxisLabelLayout(String group, AxisLayout layout, Rectangle2D bounds)(Code) | | Create a new AxisLabelLayout layout.
Parameters: group - the data group of the axis lines and labels Parameters: layout - an AxisLayout instance to model this layout after.The axis type and range model of the provided instance will be used. Parameters: bounds - the layout bounds within which to place the axis marks |
AxisLabelLayout | public AxisLabelLayout(String group, AxisLayout layout, Rectangle2D bounds, double spacing)(Code) | | Create a new AxisLabelLayout layout.
Parameters: group - the data group of the axis lines and labels Parameters: layout - an AxisLayout instance to model this layout after.The axis type and range model of the provided instance will be used. Parameters: bounds - the layout bounds within which to place the axis marks Parameters: spacing - the minimum spacing between axis labels |
adjust | protected double adjust(double v)(Code) | | Adjust a value according to the current scale type.
|
garbageCollect | protected void garbageCollect(VisualTable labels)(Code) | | Remove axis labels no longer being used.
|
getBreadth | protected double getBreadth(Rectangle2D b)(Code) | | Get the "breadth" of a rectangle, based on the axis type.
|
getLinearStep | protected double getLinearStep(double span, double scale)(Code) | | Compute a linear step between axis marks.
|
getNumberFormat | public NumberFormat getNumberFormat()(Code) | | Get the formatter used to format labels for numerical values.
the NumberFormat used to format numerical labels. |
getOrdinalStep | protected int getOrdinalStep(double span, double scale)(Code) | | Compute an ordinal step between axis marks.
|
getSpacing | public double getSpacing()(Code) | | Get the required minimum spacing between axis labels.
the axis label spacing |
getTable | protected VisualTable getTable()(Code) | | Create a new table for representing axis labels.
|
isAscending | public boolean isAscending()(Code) | | Indicates if the axis values should be presented in ascending order
along the axis.
true if data values increase as pixel coordinates increase,false if data values decrease as pixel coordinates increase. |
linearLayout | protected void linearLayout(VisualTable labels)(Code) | | Calculates a quantitative, linearly scaled layout.
|
logLayout | protected void logLayout(VisualTable labels)(Code) | | Calculates a quantitative, logarithmically-scaled layout.
TODO: This method is currently not working correctly.
|
ordinalLayout | protected void ordinalLayout(VisualTable labels)(Code) | | Compute an ordinal layout of axis marks.
|
setAscending | public void setAscending(boolean asc)(Code) | | Sets if the axis values should be presented in ascending order
along the axis.
Parameters: asc - true if data values should increase as pixel coordinatesincrease, false if data values should decrease as pixel coordinatesincrease. |
setNumberFormat | public void setNumberFormat(NumberFormat nf)(Code) | | Set the formatter used to format labels for numerical values.
Parameters: nf - the NumberFormat used to format numerical labels. |
setRangeModel | public void setRangeModel(ValuedRangeModel model)(Code) | | Sets the range model used to layout this axis.
Parameters: model - the range model |
setSpacing | public void setSpacing(double spacing)(Code) | | Set the required minimum spacing between axis labels.
Parameters: spacing - the axis label spacing to use |
sqrtLayout | protected void sqrtLayout(VisualTable labels)(Code) | | Calculates a quantitative, square root scaled layout.
|
|
|