|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.gvt.AbstractGraphicsNode | +--org.apache.batik.gvt.TextNode
A graphics node that represents text.
Inner Class Summary | |
static class |
TextNode.Anchor
Defines where the text of a TextNode can be anchored relative to its location. |
Field Summary | |
protected java.text.AttributedCharacterIterator |
aci
Attributed Character Iterator describing the text |
protected java.awt.geom.Point2D |
location
Location of this text node (inherited, independent of explicit X and Y attributes applied to children). |
protected java.lang.String |
text
The text of this TextNode. |
protected java.util.List |
textRuns
|
Fields inherited from class org.apache.batik.gvt.AbstractGraphicsNode |
clip, composite, filter, gnr, hints, hitDetector, inverseTransform, isVisible, listeners, mask, parent, root, transform |
Fields inherited from interface org.apache.batik.gvt.GraphicsNode |
IDENTITY |
Constructor Summary | |
TextNode()
Constructs a new empty TextNode. |
Method Summary | |
boolean |
contains(java.awt.geom.Point2D p,
GraphicsNodeRenderContext rc)
Returns whether a given point is enclosed by the text node's bounds. |
java.text.AttributedCharacterIterator |
getAttributedCharacterIterator()
Returns the attributed character iterator of this text node. |
java.awt.geom.Rectangle2D |
getGeometryBounds(GraphicsNodeRenderContext rc)
Returns the geometric bounds in user space of this text node. |
java.awt.Shape |
getHighlightShape(GraphicsNodeRenderContext rc)
Return a shape in user coords which encloses the current selection. |
java.awt.geom.Point2D |
getLocation()
Returns the location of this raster image node. |
java.awt.Shape |
getOutline(GraphicsNodeRenderContext rc)
Returns a shape which matches the text's geometry. |
java.awt.geom.Rectangle2D |
getPrimitiveBounds(GraphicsNodeRenderContext rc)
Returns the primitive bounds in user space of this text node. |
java.lang.Object |
getSelection(GraphicsNodeRenderContext rc)
Gets the current text selection. |
java.lang.String |
getText()
Returns the text of this TextNode as a string. |
java.util.List |
getTextRuns()
|
protected void |
invalidateGeometryCache()
Invalidates this TextNode. |
void |
paint(java.awt.Graphics2D g2d,
GraphicsNodeRenderContext rc)
Paints this node if visible. |
void |
primitivePaint(java.awt.Graphics2D g2d,
GraphicsNodeRenderContext rc)
Paints this node without applying Filter, Mask, Composite and clip. |
boolean |
selectAll(double x,
double y,
GraphicsNodeRenderContext rc)
Extends the current selection to the character at (x, y).. |
boolean |
selectAt(double x,
double y,
GraphicsNodeRenderContext rc)
Initializes the current selection to begin with the character at (x, y). |
boolean |
selectTo(double x,
double y,
GraphicsNodeRenderContext rc)
Extends the current selection to the character at (x, y).. |
void |
setAttributedCharacterIterator(java.text.AttributedCharacterIterator newAci)
Sets the attributed character iterator of this text node. |
void |
setLocation(java.awt.geom.Point2D newLocation)
Sets the location of this raster text node. |
void |
setTextRuns(java.util.List textRuns)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.awt.geom.Point2D location
protected java.text.AttributedCharacterIterator aci
protected java.lang.String text
protected java.util.List textRuns
Constructor Detail |
public TextNode()
Method Detail |
public java.util.List getTextRuns()
public void setTextRuns(java.util.List textRuns)
public java.lang.String getText()
public void setLocation(java.awt.geom.Point2D newLocation)
newLocation
- the new location of this raster image nodepublic java.awt.geom.Point2D getLocation()
public void setAttributedCharacterIterator(java.text.AttributedCharacterIterator newAci)
newAci
- the new attributed character iteratorpublic java.text.AttributedCharacterIterator getAttributedCharacterIterator()
protected void invalidateGeometryCache()
invalidateGeometryCache
in class AbstractGraphicsNode
public java.awt.geom.Rectangle2D getPrimitiveBounds(GraphicsNodeRenderContext rc)
org.apache.batik.gvt.GraphicsNode
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic java.awt.geom.Rectangle2D getGeometryBounds(GraphicsNodeRenderContext rc)
org.apache.batik.gvt.GraphicsNode
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic boolean contains(java.awt.geom.Point2D p, GraphicsNodeRenderContext rc)
contains
in class AbstractGraphicsNode
org.apache.batik.gvt.AbstractGraphicsNode
p
- the specified Point2D in the user spacerc
- the GraphicsNodeRenderContext for which this dimension appliespublic java.awt.Shape getOutline(GraphicsNodeRenderContext rc)
org.apache.batik.gvt.GraphicsNode
rc
- the GraphicsNodeRenderContext for which this dimension appliespublic boolean selectAt(double x, double y, GraphicsNodeRenderContext rc)
selectAt
in interface Selectable
the
- anchor of this nodepublic boolean selectTo(double x, double y, GraphicsNodeRenderContext rc)
selectTo
in interface Selectable
the
- anchor of this nodepublic boolean selectAll(double x, double y, GraphicsNodeRenderContext rc)
selectAll
in interface Selectable
the
- anchor of this nodepublic java.lang.Object getSelection(GraphicsNodeRenderContext rc)
getSelection
in interface Selectable
public java.awt.Shape getHighlightShape(GraphicsNodeRenderContext rc)
Selectable
getHighlightShape
in interface Selectable
public void paint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext rc)
paint
in class AbstractGraphicsNode
g2d
- the Graphics2D to userc
- the GraphicsNodeRenderContext to usepublic void primitivePaint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext rc)
GraphicsNode
org.apache.batik.gvt.GraphicsNode
g2d
- the Graphics2D to userc
- the GraphicsNodeRenderContext to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |