|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.objects.FillWrapper
draw filled polygons via AWT 1.1 or Java2D (if available).
FillWrapper provides a wrapper for drawing of filled polygons for use by other FigObject objects.
Additionally, FillWrapper uses the timestamp information from the current viewport transformation and the last internal modification to decide whether a new world-coordinate -> screen-coordinate transformation is necessary.
If the FillWrapper constructor is called with 2 points only, then a rectangle with (left top) and (right bottom) coords is assumed. Otherwise a standard polygon is constructed.
Field Summary | |
(package private) boolean |
debug
|
(package private) java.awt.Color |
extraColor
|
(package private) int |
np
|
(package private) FigObject |
parent
|
(package private) int |
radius
|
(package private) java.awt.Point[] |
scp
|
(package private) long |
timestamp
|
(package private) FigTrafo2D |
trafo
|
(package private) java.awt.Point[] |
wcp
|
(package private) int[] |
xp
|
(package private) int[] |
yp
|
Constructor Summary | |
FillWrapper(FigObject parent,
FigTrafo2D trafo,
java.awt.Point[] wcp)
basic FillWrapper constructor. |
|
FillWrapper(FigObject parent,
FigTrafo2D trafo,
java.awt.Point[] wcp,
java.awt.Color extraColor)
special FillWrapper constructor used by FigArrow. |
Method Summary | |
void |
buildSCP()
the transformation has changed. |
java.awt.Point[] |
get_scp()
return the (up to date) screen coordinates. |
long |
getTimestamp()
|
void |
paint(java.awt.Graphics g)
paint(): Check whether we the viewport transformation has changed. |
void |
paintAWT11(java.awt.Graphics g)
|
void |
set_debug()
activate debug output |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.awt.Point[] wcp
java.awt.Point[] scp
int[] xp
int[] yp
int np
int radius
FigObject parent
FigTrafo2D trafo
long timestamp
boolean debug
java.awt.Color extraColor
Constructor Detail |
public FillWrapper(FigObject parent, FigTrafo2D trafo, java.awt.Point[] wcp)
parent
- The FigObject that uses this FillWrapper rectangletrafo
- The current editor viewport transformation,
needed for the wc->sc coordinate transformationwcp
- The Point array with the (top left) and the
(bottom right) corner for this rectangle
in world coordinatespublic FillWrapper(FigObject parent, FigTrafo2D trafo, java.awt.Point[] wcp, java.awt.Color extraColor)
This allows us to draw the arrowheads in the lineColor without need for an extra FigAttribs object.
Method Detail |
public long getTimestamp()
public void set_debug()
public java.awt.Point[] get_scp()
public void buildSCP()
public void paint(java.awt.Graphics g)
public void paintAWT11(java.awt.Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |