|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.chart.AxisAttributes
AxisAttributes represents chart coordinate axis attributes that may be shared among axes in the same axis group. These attributes are:
Render attributes control standard visual aspects of axis labels
and title. Axis render attributes are managed by AxisRenderAttributes objects, that define two attribute sets,
namely AXIS for axis attributes and TITLE
for title attributes.
Label value type spesification gives formatting details for axis
labels. The spesification is a text string, interpreted with the
DataValue objects that at chart generation time carry
information about axis minimum, maximum, and step values.
Gap gives a recommended percentage value of how much empty space should be left between elements rendered on this axis. Different chart factories interprete or ignore this value according to their nature.
Tic gives the axis tic mark shape used to visualize axis steps.
Tic mark level tells how many layers of tic marks are to be drawn on this axis. Many chart factories do not yet however support this feature very well.
Grid line stroke and color define the corresponding visual details
of grid lines perpendicular to this axis. Grid lines may be turned
off by leaving the stroke to null value, or with
NullStroke.
Label rotation gives in radians the angle of how much axis labels are to be rotated around their center. Zero angle typically gives horizontal orientation. Positive angles typically rotate the labels to the counter-clockwise direction.
Title rotation controls title angle just like label rotation controls label angle.
Offset sets how much space must be leaved between the axis line and labels.
Opposite flag indicates if this axis should be rendered at the opposite side of coordinate area. Reverse flag indicates if the direction of this axis should be reversed. Silent flag indicates if axis labels should be suppressed.
Axis position string value sets the point where other axes should
cross this one. Unlike most axis parameters, this setting therefore
affects the placement and rendering of other axes. Some chart
factories may also use this setting when deciding where certain
visualization base levels lie. In the default case and with normal
mathematical coordinates, axis position coincides with axis zero
value. Possible other position values are min and
max, and any data value axis DataValue objects
recognized. See ChartAxis.computeValues(com.davisor.data.DataValue[]) for more
information.
Any of the attributes may be left unset, which instructs the
receiving chart to use it's default settings. Different chart types
may also interpret given attributes in different ways. Please see
the documentation about the respective charts and attribute accessor
methods for more information about the significance of each
attribute.
AxisFactory,
Type,
Serialized Form| Field Summary | |
static java.lang.String |
AFTER_KEYWORD
Axis after position keyword ("after"). |
static float |
AFTER_VALUE
Axis after position value (2). |
static java.lang.String |
BEFORE_KEYWORD
Axis before position keyword ("before"). |
static float |
BEFORE_VALUE
Axis before position value (-1). |
protected java.lang.Number |
M_gap
Gap between axis elements (percents, may be null). |
protected java.lang.Boolean |
M_gridLines
Enable or disable grid lines perpendicular to the axis (may be null). |
protected java.lang.String |
M_labelFormat
Axis label value type specification (may be null). |
protected java.lang.Number |
M_labelOffset
Axis label distance from axis. |
protected java.lang.Number |
M_labelRotation
Axis label rotation (defaults to zero). |
protected java.lang.Integer |
M_level
The number of tic mark levels (defaults to 1). |
protected java.lang.Float |
M_markerOffset
Marker distance from labels. |
protected java.lang.Boolean |
M_opposite
Axis side (may be null). |
protected java.lang.String |
M_positionStringValue
Axis position (may be null). |
protected AxisRenderAttributes |
M_render
Axis render attributes. |
protected java.lang.Boolean |
M_reversed
Axis growth direction (may be null). |
protected java.lang.Boolean |
M_silent
Suppress axis labels (may be null). |
protected java.awt.Shape |
M_tic
Axis tic mark shape (may be null). |
protected java.lang.Float |
M_titleOffset
Title distance from markers. |
protected java.lang.Number |
M_titleRotation
Axis title rotation (defaults to zero). |
static java.lang.String |
MAX_KEYWORD
Axis max position keyword ("max"). |
static float |
MAX_VALUE
Axis max position value (1). |
static java.lang.String |
MIN_KEYWORD
Axis min position keyword ("min"). |
static float |
MIN_VALUE
Axis min position value (0). |
| Constructor Summary | |
AxisAttributes()
Creates new axis attributes. |
|
AxisAttributes(AxisAttributes aa)
Deep copy constructor. |
|
AxisAttributes(AxisRenderAttributes render,
java.lang.String labelFormat,
java.lang.Number gap,
java.awt.Shape tic,
java.lang.Integer level,
java.lang.Boolean gridLines,
java.lang.Float titleRotation,
java.lang.Float titleOffset,
java.lang.Float markerOffset,
java.lang.Float labelRotation,
java.lang.Number labelOffset,
java.lang.Boolean opposite,
java.lang.Boolean reversed,
java.lang.Boolean silent,
java.lang.String position)
Creates a new axis attribute set. |
|
| Method Summary | |
com.davisor.core.Dupable |
dup()
Duplicates this object. |
boolean |
equals(java.lang.Object object)
Test if this axis equals to given axis. |
java.lang.Number |
getGap()
Gets axis gap. |
java.lang.String |
getLabelFormat()
Gets axis label type spesification. |
java.lang.Number |
getLabelOffset()
Gets axis label offset. |
float |
getLabelOffset(float defaultOffset)
Gets axis label offset, or if unset, a given default offset value. |
float |
getLabelRotation()
Gets label rotation in radians. |
java.lang.Integer |
getLevel()
Gets axis tic recursion level. |
java.lang.Float |
getMarkerOffset()
Gets axis marker offset. |
float |
getMarkerOffset(float defaultOffset)
Gets axis marker offset, or if unset, a given default offset value. |
java.lang.String |
getPositionStringValue()
Gets axis position string value. |
AxisRenderAttributes |
getRender()
Gets axis render attributes. |
java.awt.Shape |
getTic()
Gets axis tic mark. |
java.lang.Float |
getTitleOffset()
Gets axis title offset. |
float |
getTitleOffset(float defaultOffset)
Gets axis title offset, or if unset, a given default offset value. |
float |
getTitleRotation()
Gets title rotation in radians. |
java.lang.Boolean |
hasGridLines()
Tests if grid lines perpendicular to the axis are enabled. |
int |
hashCode()
Gets axis attributes instance hash code. |
java.lang.Boolean |
isOpposite()
Gets axis render side. |
boolean |
isOppositeDefault()
Gets axis defaulted side. |
java.lang.Boolean |
isReversed()
Gets axis growth direction. |
boolean |
isReversedDefault()
Gets axis defaulted direction. |
java.lang.Boolean |
isSilent()
Gets axis silency. |
boolean |
isSilentDefault()
Gets axis defaulted silency. |
void |
setGap(float gap)
Sets axis gap. |
void |
setGap(java.lang.Number gap)
Sets axis gap. |
void |
setGridLines(boolean gridLines)
Sets if grid lines perpendicular to the axis are enabled. |
void |
setGridLines(java.lang.Boolean gridLines)
Sets if grid lines perpendicular to the axis are enabled. |
void |
setLabelFormat(java.lang.String labelFormat)
Sets the axis label value type specification. |
void |
setLabelOffset(float labelOffset)
Sets axis label offset. |
void |
setLabelOffset(java.lang.Number labelOffset)
Sets axis label offset. |
void |
setLabelRotation(float labelRotation)
Sets the label rotation. |
void |
setLabelRotation(java.lang.Number labelRotation)
Sets the label rotation. |
void |
setLevel(java.lang.Integer level)
Sets the axis tic recursion level. |
void |
setMarkerOffset(float markerOffset)
Sets axis marker offset. |
void |
setMarkerOffset(java.lang.Float markerOffset)
Sets axis marker offset. |
void |
setOpposite(boolean opposite)
Sets axis rendering side. |
void |
setOpposite(java.lang.Boolean opposite)
Sets axis rendering opposite. |
void |
setPositionStringValue(java.lang.String position)
Sets axis position string value. |
void |
setRender(AxisRenderAttributes render)
Sets axis render attributes. |
void |
setReversed(boolean reversed)
Sets axis growth direction. |
void |
setReversed(java.lang.Boolean reversed)
Sets axis growth direction. |
void |
setSilent(boolean silent)
Sets axis growth direction. |
void |
setSilent(java.lang.Boolean silent)
Sets axis silency. |
void |
setTic(java.awt.Shape tic)
Sets the axis tic mark. |
void |
setTitleOffset(float titleOffset)
Sets axis title offset. |
void |
setTitleOffset(java.lang.Float titleOffset)
Sets axis title offset. |
void |
setTitleRotation(float titleRotation)
Sets the title rotation. |
void |
setTitleRotation(java.lang.Number titleRotation)
Sets the title rotation. |
java.lang.String |
toString()
Gets rendering attributes XML representation. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String AFTER_KEYWORD
public static final float AFTER_VALUE
public static final java.lang.String BEFORE_KEYWORD
public static final float BEFORE_VALUE
public static final java.lang.String MAX_KEYWORD
public static final float MAX_VALUE
public static final java.lang.String MIN_KEYWORD
public static final float MIN_VALUE
protected java.lang.Number M_gap
protected java.lang.Boolean M_gridLines
protected java.lang.String M_labelFormat
protected java.lang.Number M_labelOffset
protected java.lang.Number M_labelRotation
protected java.lang.Integer M_level
protected AxisRenderAttributes M_render
protected java.lang.Boolean M_opposite
protected java.lang.String M_positionStringValue
protected java.lang.Boolean M_reversed
protected java.lang.Boolean M_silent
protected java.awt.Shape M_tic
protected java.lang.Float M_titleOffset
protected java.lang.Float M_markerOffset
protected java.lang.Number M_titleRotation
| Constructor Detail |
public AxisAttributes()
public AxisAttributes(AxisAttributes aa)
dup()
public AxisAttributes(AxisRenderAttributes render,
java.lang.String labelFormat,
java.lang.Number gap,
java.awt.Shape tic,
java.lang.Integer level,
java.lang.Boolean gridLines,
java.lang.Float titleRotation,
java.lang.Float titleOffset,
java.lang.Float markerOffset,
java.lang.Float labelRotation,
java.lang.Number labelOffset,
java.lang.Boolean opposite,
java.lang.Boolean reversed,
java.lang.Boolean silent,
java.lang.String position)
render - render attributes (may be null)labelFormat - label type specification (may be null)gap - gap (percents, may be null)tic - tic mark shape (may be null)level - tic mark recursion levelgridLines - enable or disable grid lines (may be null)titleRotation - title rotation (may be null)titleOffset - title offset (may be null)markerOffset - marker offset (may be null)labelRotation - label rotation (may be null)labelOffset - label offset (may be null)opposite - axis side (may be null)reversed - axis growth direction (may be null)silent - suppress axis labels (may be null)position - axis position (may be null)Type| Method Detail |
public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupablepublic boolean equals(java.lang.Object object)
public int hashCode()
public java.lang.String toString()
toString(),
Strings.toXML(String,Object)public java.lang.Number getGap()
setGap(float),
setGap(Number)public java.lang.Number getLabelOffset()
getLabelOffset(float),
setLabelOffset(Number)public float getLabelOffset(float defaultOffset)
defaultOffset - default offset to be used if offset has not been setgetLabelOffset(),
setLabelOffset(float)public float getLabelRotation()
Use Units to convert the angle
value to other angle units.
setLabelRotation(float),
setLabelRotation(Number),
Unitspublic java.lang.Integer getLevel()
setLevel(java.lang.Integer)public java.lang.String getPositionStringValue()
setPositionStringValue(java.lang.String),
ChartAxis.getPosition()public AxisRenderAttributes getRender()
setRender(com.davisor.graphics.chart.AxisRenderAttributes)public java.lang.String getLabelFormat()
setLabelFormat(java.lang.String)public java.lang.Float getMarkerOffset()
getMarkerOffset(float),
setMarkerOffset(float)public float getMarkerOffset(float defaultOffset)
defaultOffset - default offset to be used if offset has not been setgetMarkerOffset(),
setMarkerOffset(float)public java.awt.Shape getTic()
setTic(java.awt.Shape)public java.lang.Float getTitleOffset()
getTitleOffset(float),
setTitleOffset(float)public float getTitleOffset(float defaultOffset)
defaultOffset - default offset to be used if offset has not been setgetTitleOffset(),
setTitleOffset(float)public float getTitleRotation()
Use Units to convert the angle
value to other angle units.
setTitleRotation(float),
setTitleRotation(Number),
Unitspublic java.lang.Boolean hasGridLines()
setGridLines(boolean),
setGridLines(Boolean)public java.lang.Boolean isOpposite()
setOpposite(boolean),
setOpposite(Boolean)public boolean isOppositeDefault()
false is returned.
isOpposite()public java.lang.Boolean isReversed()
setReversed(boolean),
setReversed(Boolean)public boolean isReversedDefault()
false is returned.
isReversed()public java.lang.Boolean isSilent()
setSilent(boolean),
setSilent(Boolean)public boolean isSilentDefault()
false is returned.
isSilent()public void setReversed(boolean reversed)
isReversed(),
setReversed(Boolean)public void setReversed(java.lang.Boolean reversed)
isReversed(),
setReversed(boolean)public void setSilent(boolean silent)
isSilent(),
setSilent(Boolean)public void setSilent(java.lang.Boolean silent)
isSilent(),
setSilent(boolean)public void setGap(float gap)
getGap(),
setGap(Number)public void setGap(java.lang.Number gap)
null selects the chart
default behaviour.
getGap(),
setGap(float)public void setGridLines(boolean gridLines)
hasGridLines(),
setGridLines(Boolean)public void setGridLines(java.lang.Boolean gridLines)
hasGridLines(),
setGridLines(boolean)public void setLabelOffset(float labelOffset)
getLabelOffset(),
getLabelOffset(float),
setLabelOffset(Number)public void setLabelOffset(java.lang.Number labelOffset)
null, it defaults to some appropriate value, like
zero, font leading, or 50% of the font size.
getLabelOffset(),
getLabelOffset(float),
setLabelOffset(float)public void setLabelRotation(float labelRotation)
Use Units to convert the angle value to other angle
units.
labelRotation - label tilt anglegetLabelRotation(),
setLabelRotation(Number),
Unitspublic void setLabelRotation(java.lang.Number labelRotation)
Use Units to convert the angle value to other angle
units.
labelRotation - label tilt angle (may be null)getLabelRotation(),
setLabelRotation(float),
Unitspublic void setLevel(java.lang.Integer level)
getLevel()public void setRender(AxisRenderAttributes render)
getRender()public void setOpposite(boolean opposite)
isOpposite(),
setOpposite(Boolean)public void setOpposite(java.lang.Boolean opposite)
isOpposite(),
setOpposite(boolean)public void setPositionStringValue(java.lang.String position)
Axis position string value may be a data string value, expressed as the values that are laid on this axis, or one of the position string keywords:
ChartAxis.computePosition() for description of
how position string value is eventually interpreted, and actual
position value computed. Please note also, that the actual
position value is computed in that method, while the position
string value is just a simple data type intependent manner way to
bring in position information from user interface.
getPositionStringValue(),
setPositionStringValue(java.lang.String)public void setLabelFormat(java.lang.String labelFormat)
The axis type is automatically determined from the data that will be laid along this axis. Acceptable specification string formats vary between different data types, so prior knowledge of the nature of the expected axis data is necessary. Invalid specification strings may produce unexpected value rendering results.
labelFormat - axis label value type specificationgetLabelFormat(),
Typepublic void setMarkerOffset(float markerOffset)
getMarkerOffset(),
getMarkerOffset(float),
setMarkerOffset(Float)public void setMarkerOffset(java.lang.Float markerOffset)
null, it defaults to some appropriate value.
getMarkerOffset(),
getMarkerOffset(float),
setMarkerOffset(float)public void setTic(java.awt.Shape tic)
getTic()public void setTitleOffset(float titleOffset)
getTitleOffset(),
getTitleOffset(float),
setTitleOffset(Float)public void setTitleOffset(java.lang.Float titleOffset)
null, it defaults to some appropriate value.
getTitleOffset(),
getTitleOffset(float),
setTitleOffset(float)public void setTitleRotation(float titleRotation)
Use Units to convert the angle value to other angle
units.
titleRotation - title tilt anglegetTitleRotation(),
setTitleRotation(Number),
Unitspublic void setTitleRotation(java.lang.Number titleRotation)
Use Units to convert the angle value to other angle
units.
titleRotation - title tilt angle (may be null)getTitleRotation(),
setTitleRotation(float),
Units
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||