|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectli.netcat.chart.util.AbstractPart
li.netcat.chart.util.TextPart
li.netcat.chart.util.TagPart
li.netcat.chart.util.CartesianScalePart
Represents a straight scale that looks for example like this:
It can be used to tag a Cartesian grid or the vertical component of a polar grid.
This part uses the tag concept and is therefore very flexible in its strategy and layout.
For more details, see the super class TagPart.
The Cartesian scale part can be positioned at the top, left, bottom or right of a Cartesian graph part or at the left or right of a polar graph part.
| Field Summary | |
static int |
BOTTOM
Equal to ChartConstants.BOTTOM |
static int |
LEFT
Equal to ChartConstants.LEFT |
static int |
RIGHT
Equal to ChartConstants.RIGHT |
static int |
TOP
Equal to ChartConstants.TOP |
| Fields inherited from class li.netcat.chart.util.AbstractPart |
BACKGROUND, FOREGROUND, PERSPECTIVE |
| Constructor Summary | |
CartesianScalePart(CartesianGraphPart part,
int position)
Constructs a new CartesianScalePart that attaches to the given Cartesian part
at the given position. |
|
CartesianScalePart(PolarGraphPart part,
int position)
Constructs a new CartesianScalePart that attaches to the given polar part
at the given position. |
|
| Method Summary | |
GraphPart |
getGraphPart()
Returns the graph part that gets decorated by this scale part. |
int |
getMarkInterval()
Returns the mark interval. |
int |
getPosition()
Returns the position of this scale. |
TagConstraints |
getTagConstraints(java.awt.Graphics g)
This overridden method returns the tag constraints that are used to position all labels. |
Tag[] |
getTags(java.awt.Graphics g)
This overridden methods creates all tags using the corresponding scale model of the current part. |
void |
setGraphPart(GraphPart part)
Sets the graph part that gets decorated by this scale. |
void |
setMarkInterval(int interval)
Sets the mark interval. |
void |
setPosition(int position)
Sets the position of this scale. |
| Methods inherited from class li.netcat.chart.util.TagPart |
createTag, createTag, createTag, getAdditionalLineLength, getBottom, getLayout, getLeft, getLinePenBox, getPen, getRight, getTagManager, getTextPenBox, getTop, setAdditionalLineLength, setInsets, setLinePenBox, setPen, setTagManager, setTextPenBox |
| Methods inherited from class li.netcat.chart.util.TextPart |
getTextLook, setTextLook |
| Methods inherited from class li.netcat.chart.util.AbstractPart |
getChart, getPerspective, invalidate, setChart, setPerspective |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TOP
ChartConstants.TOP
public static final int LEFT
ChartConstants.LEFT
public static final int BOTTOM
ChartConstants.BOTTOM
public static final int RIGHT
ChartConstants.RIGHT
| Constructor Detail |
public CartesianScalePart(PolarGraphPart part,
int position)
CartesianScalePart that attaches to the given polar part
at the given position.
part - The polar part that needs to be decorated by this scale or null.position - The position of the scale. Specify either LEFT or RIGHT.
public CartesianScalePart(CartesianGraphPart part,
int position)
CartesianScalePart that attaches to the given Cartesian part
at the given position.
part - The Cartesian part that needs to be decorated by this scale or null.position - The position of the scale. Specify either TOP, LEFT, BOTTOM or RIGHT.| Method Detail |
public GraphPart getGraphPart()
null.public void setGraphPart(GraphPart part)
part - The part must be either an instance of CartesianGraphPart or PolarGraphPart.
If the position is TOP or BOTTOM, this parameter can not be of instance PolarGraphPart.public int getPosition()
TOP, LEFT, BOTTOM or RIGHT.public void setPosition(int position)
position - Specify one of TOP, LEFT, BOTTOM or RIGHT. If the current graph part is an
instance of a PolarGraphPart, this parameter can only be LEFT or RIGHT.public int getMarkInterval()
public void setMarkInterval(int interval)
interval - The new interval, must be >=1.public TagConstraints getTagConstraints(java.awt.Graphics g)
getTagConstraints in class TagPartg - The relevant graphics object.
null if the current graph part is null or an instance of LineTagConstraints.public Tag[] getTags(java.awt.Graphics g)
getTags in class TagPartg - The relevant graphics object.
|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||