|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jimmc.treepar.Box | +--jimmc.roots.RootsBox
RootsBox is a version of Box specialized for use with the roots package.
Field Summary | |
protected int |
currentY
The current connector location. |
protected java.lang.String |
fatherKey
The key of our father. |
protected java.lang.String |
motherKey
The key of our mother. |
int |
parentConnOffset
The offset of the parent connectors from the top/bottom |
protected java.lang.StringBuffer |
textBuffer
Our text. |
Fields inherited from class jimmc.treepar.Box |
connectors, connectorVector, layout, name, orderSet, origin, positionSet, row, rowNumber, rowNumberSet, rowOrder, size, text, textLines, textPosition |
Constructor Summary | |
RootsBox(Layout layout,
java.lang.String name)
Create a new box. |
Method Summary | |
protected void |
addConnector(java.lang.String text,
java.lang.String childKey)
Add a connector. |
void |
addSection(java.lang.String text,
java.lang.String childKey)
Add a section of text, optionally with a child connector. |
protected int |
countLines(java.lang.String s)
Count the number of newlines found in the string. |
protected int |
countWidth(java.lang.String s)
Count the length of the longest line. |
void |
done()
|
protected int |
firstLineLength(java.lang.String s)
Return the number of characters in the first line. |
void |
setParentKeys(java.lang.String fatherKey,
java.lang.String motherKey)
Add parent connectors. |
Methods inherited from class jimmc.treepar.Box |
addConnector, addNetForce, addToBounds, clearRowNumber, clearRowOrder, connectorsDone, contains, dump, dump, getHitText, getLength, getR, getThickness, isPositionSet, isRowOrderSet, moveR, paint, setConnectorsRowOrder, setPositionSet, setR, setRow, setRowNumber, setRowOrder, setS, setSize, setText, setTextPosition, setupDone, textDone |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.StringBuffer textBuffer
protected java.lang.String fatherKey
protected java.lang.String motherKey
protected int currentY
public int parentConnOffset
Constructor Detail |
public RootsBox(Layout layout, java.lang.String name)
Method Detail |
public void addSection(java.lang.String text, java.lang.String childKey)
text
- The text for this section. This text gets appended
to the text in the Box.childKey
- The key of the child for the east-side connector
for this section, or null if no connector.protected void addConnector(java.lang.String text, java.lang.String childKey)
public void setParentKeys(java.lang.String fatherKey, java.lang.String motherKey)
fatherKey
- Key for the father, used for a west connector
near the top of the box. Null means no connector.motherKey
- Key for the mother, used for a west connector
near the bottom of the box.public void done()
protected int countLines(java.lang.String s)
countLines
in class Box
protected int countWidth(java.lang.String s)
countWidth
in class Box
jimmc.treepar.Box
protected int firstLineLength(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |