|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.maps.ephemera.RotateTextEphemeron
public class RotateTextEphemeron
Rotates text around anchor point.
Copyright 2007 Paul Reavis
| Field Summary | |
|---|---|
protected XyPoint |
anchor
|
protected MapApp |
app
|
protected double |
DEGREE_TO_BIT
|
protected MapSet |
mapset
|
protected int |
rotation
|
protected java.lang.String |
text
|
protected double |
textPixelWidth
|
protected java.lang.String |
textStyle
|
| Constructor Summary | |
|---|---|
RotateTextEphemeron(MapApp app,
MapSet mapset,
XyPoint anchor,
java.lang.String text,
java.lang.String textStyle)
Spins passed text around fixed point. |
|
RotateTextEphemeron(XyPoint anchor,
java.lang.String text,
java.lang.String textStyle,
double textPixelWidth)
Spins passed text around fixed point. |
|
| Method Summary | |
|---|---|
void |
draw(DrawingSurface surface,
MapViewFrame frame,
XyPoint mousePosition)
Draw appropriate graphics on the given surface with the given frame, mouse position, and any implementation-specific internal state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XyPoint anchor
protected java.lang.String text
protected java.lang.String textStyle
protected transient int rotation
protected final double DEGREE_TO_BIT
protected double textPixelWidth
protected MapSet mapset
protected MapApp app
| Constructor Detail |
|---|
public RotateTextEphemeron(XyPoint anchor,
java.lang.String text,
java.lang.String textStyle,
double textPixelWidth)
Uses passed pixel width as length of word.
anchor - -
XyPoint to be used for pivot.text - -
text to be drawn.textStyle - -
text style to use for text.textPixelWidth - -
Pixel width of text to be drawn.
public RotateTextEphemeron(MapApp app,
MapSet mapset,
XyPoint anchor,
java.lang.String text,
java.lang.String textStyle)
This constructor attempts to calculate the text style's pixel width. If none can be found, 8 pixels per character is used.
app - -
MapApp, used to calculating text width.mapset - -
MapSet where these styles live.anchor - -
XyPoint to be used for pivot.text - -
text to be drawn.textStyle - -
text style to use for text.| Method Detail |
|---|
public void draw(DrawingSurface surface,
MapViewFrame frame,
XyPoint mousePosition)
Ephemeron
draw in interface Ephemeron
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||