|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nexttext.TextObject net.nexttext.TextObjectGroup
public class TextObjectGroup
TextObjectGroup is a TextObject which is made up of other TextObjects.
The meaning of the grouping can be defined by the application, but it is typically something like glyphs being grouped into a word. It is a non-terminal node in the TextObject tree. It differs from a regular TextObject only in that it has children.
Constructor Summary | |
---|---|
TextObjectGroup()
Default Constructor. |
|
TextObjectGroup(java.util.Map<java.lang.String,Property> props,
processing.core.PVector pos)
Creates a new TextObjectGroup at the specified position, and with extra properties. |
|
TextObjectGroup(processing.core.PVector pos)
Creates a new TextObjectGroup at the specified position. |
Method Summary | |
---|---|
void |
attachChild(TextObject newChild)
Attach a child to the end of the list of children. |
void |
attachChild(TextObject newChild,
int location)
Attach a child at the given location. |
int |
getHeight()
Get the greatest number of layers between this TextObject and the leaves of the tree. |
TextObject |
getLeftMostChild()
Get the left most Child, or null if there isn't one. |
java.awt.Polygon |
getLocalBoundingPolygon()
See TextObject's getLocalBoundingPolygon() description for details. |
int |
getNumChildren()
Get the number of children. |
TextObject |
getRightMostChild()
Get the right most Child, or null if there isn't one. |
java.lang.String |
getString()
Returns the string representation of a group |
TextObjectGlyphIterator |
glyphIterator()
Get an iterator over all the descendant glyphs of this group. |
TextObjectIterator |
iterator()
Get an iterator over this group and all of its descendants. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextObjectGroup()
public TextObjectGroup(processing.core.PVector pos)
public TextObjectGroup(java.util.Map<java.lang.String,Property> props, processing.core.PVector pos)
Method Detail |
---|
public TextObject getLeftMostChild()
public TextObject getRightMostChild()
public int getNumChildren()
public void attachChild(TextObject newChild)
public void attachChild(TextObject newChild, int location)
public TextObjectIterator iterator()
public TextObjectGlyphIterator glyphIterator()
public int getHeight()
getHeight
in class TextObject
public java.lang.String getString()
public java.awt.Polygon getLocalBoundingPolygon()
Do not modify the returned Polygon, because it may be cached.
XXXBUG: This method always returns a rectangle unless we write some convex hull calculations.
getLocalBoundingPolygon
in class TextObject
TextObject.getLocalBoundingPolygon()
public java.lang.String toString()
toString
in class TextObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |