|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatt.grappa.GrappaNexus
public class GrappaNexus
This class brings together shape, text and attribute information related to bounding and drawing an element.
Field Summary | |
---|---|
static double |
arcHeightFactor
RoundRectangle arc height factor |
static double |
arcWidthFactor
RoundRectangle arc width factor |
(package private) java.awt.geom.Rectangle2D |
bbox
|
boolean |
boundText
Indicates if element text should be included in the element bounding box. |
boolean |
clearText
Indicates if the area bounding the element text should be filled/outlined along with the element when being drawn. |
(package private) java.awt.Color |
color
|
private java.lang.Object |
custom_shape
|
(package private) boolean |
dirty
|
boolean |
drawText
Indicates if element text should be drawn when drawing the element. |
(package private) Element |
element
|
(package private) java.awt.Color |
fillcolor
|
(package private) java.awt.Font |
font
|
(package private) java.awt.Color |
font_color
|
(package private) java.awt.Image |
image
|
(package private) boolean |
imageLoading
|
private long |
lastDecorationUpdate
|
private long |
lastImageUpdate
|
private long |
lastShapeUpdate
|
private long |
lastStyleUpdate
|
private long |
lastTextUpdate
|
(package private) long |
lastUpdate
|
(package private) GrappaPoint[] |
lpos
|
(package private) java.lang.String[] |
lstr
|
private java.lang.Object[] |
objs
|
(package private) java.awt.Shape |
shape
|
(package private) int |
shapeType
|
(package private) java.awt.Stroke |
stroke
|
(package private) GrappaStyle |
style
|
(package private) java.awt.geom.Area |
textArea
|
private int |
windingRule
|
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
GrappaNexus(Element elem)
Constructs a new GrappaNexus object from an element. |
Method Summary | |
---|---|
private void |
bboxCheckSet()
|
java.lang.Object |
clone()
Creates a new object of the same class as this object. |
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double width,
double height)
|
boolean |
contains(java.awt.geom.Point2D p)
|
boolean |
contains(java.awt.geom.Rectangle2D r)
|
(package private) void |
draw(java.awt.Graphics2D g2d)
Draw the element using the supplied Graphics2D context. |
(package private) void |
drawImage(java.awt.Graphics2D g2d)
Draw the image associated with the IMAGE_ATTR using the supplied Graphics2D context. |
(package private) void |
fill(java.awt.Graphics2D g2d)
Fill the element using the supplied Graphics2D context. |
java.awt.Rectangle |
getBounds()
|
java.awt.geom.Rectangle2D |
getBounds2D()
|
Element |
getElement()
Get the underlying element. |
java.awt.Image |
getImage()
Return the image, if any, loaded for this element |
java.awt.geom.PathIterator |
getPathIterator()
Equivalent to getPathIterator(null). |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
|
int |
getWindingRule()
Return the winding rule for this line. |
boolean |
imageUpdate(java.awt.Image image,
int flags,
int x,
int y,
int width,
int height)
|
boolean |
intersects(double x,
double y,
double width,
double height)
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
|
boolean |
isImageLoading()
Return status of image loading. |
(package private) java.awt.geom.Rectangle2D |
rawBounds2D()
|
void |
rebuild()
Recompute the components of this GrappaNexus. |
void |
update(java.util.Observable obs,
java.lang.Object arg)
This method is called whenever the observed object is changed. |
void |
updateDecoration()
Update the decoration information for the underlying element. |
void |
updateImage()
Update the image information for the underlying element. |
void |
updateShape()
Update the shape information for the underlying element. |
void |
updateStyle()
Update the shape information for the underlying element. |
void |
updateText()
Update the text information for the underlying element. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double arcHeightFactor
public static double arcWidthFactor
java.awt.geom.Area textArea
java.awt.Shape shape
int shapeType
java.awt.geom.Rectangle2D bbox
GrappaStyle style
java.awt.Color fillcolor
java.awt.Color color
java.awt.Image image
boolean imageLoading
boolean dirty
java.awt.Stroke stroke
private java.lang.Object[] objs
private java.lang.Object custom_shape
public boolean boundText
Grappa.shapeBoundText
public boolean clearText
Grappa.shapeClearText
public boolean drawText
Grappa.shapeDrawText
Element element
long lastUpdate
private long lastShapeUpdate
private long lastTextUpdate
private long lastStyleUpdate
private long lastDecorationUpdate
private long lastImageUpdate
java.awt.Font font
java.lang.String[] lstr
GrappaPoint[] lpos
java.awt.Color font_color
private int windingRule
Constructor Detail |
---|
public GrappaNexus(Element elem)
GrappaNexus
object from an element.
elem
- the Element
needing a GrappaNexus
object.Method Detail |
---|
public Element getElement()
public java.awt.Image getImage()
public boolean isImageLoading()
public int getWindingRule()
public void rebuild()
updateStyle
,
updateDecoration
,
updateShape
,
updateText
,
updateImage
public void updateShape()
public void updateStyle()
public void updateText()
public void updateDecoration()
public void updateImage()
public final boolean imageUpdate(java.awt.Image image, int flags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
private void bboxCheckSet()
public java.lang.Object clone()
clone
in class java.lang.Object
java.lang.OutOfMemoryError
- if there is not enough memory.Cloneable
public boolean contains(double x, double y)
contains
in interface java.awt.Shape
public boolean contains(double x, double y, double width, double height)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Point2D p)
contains
in interface java.awt.Shape
public boolean contains(java.awt.geom.Rectangle2D r)
contains
in interface java.awt.Shape
public java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
java.awt.geom.Rectangle2D rawBounds2D()
public java.awt.geom.PathIterator getPathIterator()
getPathIterator(AffineTransform)
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
public boolean intersects(double x, double y, double width, double height)
intersects
in interface java.awt.Shape
public boolean intersects(java.awt.geom.Rectangle2D r)
intersects
in interface java.awt.Shape
public void update(java.util.Observable obs, java.lang.Object arg)
update
in interface java.util.Observer
obs
- the Observable must be an Attributearg
- either a Long giving the update time of the Attribute as returned by System.getTimeInMillis() or it is a two element Object array, where the first element is a new Attribute to be observed in place of that passed via obs and the second element is the update time of this new Attribute.void draw(java.awt.Graphics2D g2d)
g2d
- the Graphics2D context to be used for drawingvoid fill(java.awt.Graphics2D g2d)
g2d
- the Graphics2D context to be used for drawingvoid drawImage(java.awt.Graphics2D g2d)
g2d
- the Graphics2D context to be used for drawing
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |