|
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.PolarScalePart
Represents a round scale that looks for example like this:
It can be used to tag 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 polar scale part knows itself where to place in a container so that the scale corresponds to the grid.
Field Summary |
Fields inherited from class li.netcat.chart.util.AbstractPart |
BACKGROUND, FOREGROUND, PERSPECTIVE |
Constructor Summary | |
PolarScalePart(PolarGraphPart part)
Constructs a new PolarScalePart that attaches to the given polar part. |
Method Summary | |
float |
getAutoPerspectiveX()
Returns the x-direction of the auto perspective vector. |
float |
getAutoPerspectiveY()
Returns the y-direction of the auto perspective vector. |
int |
getMarkInterval()
Returns the mark interval. |
PolarGraphPart |
getPolarGraphPart()
Returns the polar graph part that gets decorated by this scale part. |
TagConstraints |
getTagConstraints(java.awt.Graphics g)
Subclasses must implement this method to report the tag constraints that do the first displacements. |
Tag[] |
getTags(java.awt.Graphics g)
Subclasses must implement this method to report the list of tags that must be layouted. |
protected Pen |
preparePen(Pen pen,
ScaleModel scaleModel,
int markIndex)
Callback method, that can be overridden by subclasses to influence the pen that draws the line before the tag gets created. |
protected Tag |
prepareTag(Tag tag,
ScaleModel scaleModel,
int markIndex,
java.awt.Graphics g)
Callback method, that can be overridden by subclasses to influence the created tag. |
protected TextLook |
prepareTextLook(TextLook look,
ScaleModel scaleModel,
int markIndex)
Callback method, that can be overridden by subclasses to influence the text look before the tag gets created. |
void |
setAutoPerspective(float x,
float y)
Sets a vector that is used to define the perspective positions of the tags automatically. |
void |
setMarkInterval(int interval)
Sets the mark interval. |
void |
setPolarGraphPart(PolarGraphPart part)
Sets the polar graph part that gets decorated by this scale part. |
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 |
Constructor Detail |
public PolarScalePart(PolarGraphPart part)
PolarScalePart
that attaches to the given polar part.
part
- The polar part that needs to be decorated by this scale or null
.Method Detail |
public PolarGraphPart getPolarGraphPart()
public void setPolarGraphPart(PolarGraphPart part)
part
- The polar graph part that gets decorated by this scale part.public void setAutoPerspective(float x, float y)
x
- The x-direction of the perspective.y
- The y-direction of the perspective.public float getAutoPerspectiveX()
public float getAutoPerspectiveY()
public int getMarkInterval()
public void setMarkInterval(int interval)
interval
- The new interval, must be >=1.public TagConstraints getTagConstraints(java.awt.Graphics g)
TagPart
getTagConstraints
in class TagPart
g
- The relevant graphics object.
public Tag[] getTags(java.awt.Graphics g)
TagPart
getTags
in class TagPart
g
- The relevant graphics object.
null
, but must not contain null
entries.protected TextLook prepareTextLook(TextLook look, ScaleModel scaleModel, int markIndex)
look
- The default look of the text.scaleModel
- The scale model used as data source.markIndex
- The current markIndex for the scale model.
protected Pen preparePen(Pen pen, ScaleModel scaleModel, int markIndex)
pen
- The default pen.scaleModel
- The scale model used as data source.markIndex
- The current markIndex for the scale model.
protected Tag prepareTag(Tag tag, ScaleModel scaleModel, int markIndex, java.awt.Graphics g)
tag
- The default tag that can be modified.scaleModel
- The scale model used as data source.markIndex
- The current markIndex for the scale model.g
- The graphics object that should be used to calculate string widths.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |