|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Node
A node is the basic data structure for the typesetter. It has a reference
point and three dimensions, namely width, height, and depth (see figure).
Note that those dimensions are sometimes used for different purposes. For instance a KernNode does use the width to denote the actual size which can be applied in horizontal or in vertical direction, depending on the context.
| Method Summary | |
|---|---|
void |
addDepthTo(WideGlue glue)
Add the flexible depth of the current node to the given glue. |
void |
addHeightTo(WideGlue glue)
Add the flexible height of the current node to the given glue. |
void |
addWidthTo(WideGlue glue)
Add the flexible width of the current node to the given glue. |
Node |
atShipping(PageContext context,
Typesetter typesetter,
FixedDimen posX,
FixedDimen posY)
This method performs any action which are required to executed at the time of shipping the node to the DocumentWriter. |
int |
countChars()
This method determines the number of characters contained in a node. |
CharNode[] |
getChars()
Getter for the array of characters enclosed in this node. |
FixedDimen |
getDepth()
Getter for the depth of the node. |
FixedDimen |
getHeight()
Getter for the height of the node. |
FixedDimen |
getNaturalDepth()
Getter for the natural depth of the node. |
FixedDimen |
getNaturalHeight()
Getter for the natural height of the node. |
FixedDimen |
getNaturalWidth()
Getter for the natural width of the node. |
FixedDimen |
getVerticalSize()
Compute the vertical size of a node. |
FixedDimen |
getWidth()
Getter for the width of the node. |
void |
setDepth(FixedDimen depth)
Setter for the depth of the node. |
void |
setHeight(FixedDimen height)
Setter for the height of the node. |
void |
setWidth(FixedDimen width)
Setter for the width of the node. |
void |
spreadHeight(FixedDimen height,
FixedGlueComponent sum)
Adjust the height of a flexible node. |
void |
spreadWidth(FixedDimen width,
FixedGlueComponent sum)
Adjust the width of a flexible node. |
void |
toString(java.lang.StringBuffer sb,
java.lang.String prefix,
int breadth,
int depth)
This method puts the printable representation into the string buffer. |
void |
toText(java.lang.StringBuffer sb,
java.lang.String prefix)
This method puts the printable representation into the string buffer. |
java.lang.Object |
visit(NodeVisitor visitor,
java.lang.Object value)
This method provides an entry point for the visitor pattern. |
| Method Detail |
|---|
void addDepthTo(WideGlue glue)
glue - the glue to add to.void addHeightTo(WideGlue glue)
glue - the glue to add to.void addWidthTo(WideGlue glue)
glue - the glue to add to.
Node atShipping(PageContext context,
Typesetter typesetter,
FixedDimen posX,
FixedDimen posY)
throws GeneralException
context - the interpreter context encapsulated as page contexttypesetter - the typesetterposX - the horizontal position on the pageposY - the vertical position on the page
null then the node is
deleted. If the value is the node itself then it is preserved.
GeneralException - in case of an errorint countChars()
CharNode[] getChars()
FixedDimen getDepth()
FixedDimen getHeight()
FixedDimen getNaturalDepth()
FixedDimen getNaturalHeight()
FixedDimen getNaturalWidth()
FixedDimen getVerticalSize()
FixedDimen getWidth()
void setDepth(FixedDimen depth)
depth - the node depthvoid setHeight(FixedDimen height)
height - the new heightvoid setWidth(FixedDimen width)
width - the new width
void spreadHeight(FixedDimen height,
FixedGlueComponent sum)
height - the desired heightsum - the total sum of the glues
void spreadWidth(FixedDimen width,
FixedGlueComponent sum)
width - the desired widthsum - the total sum of the glues
void toString(java.lang.StringBuffer sb,
java.lang.String prefix,
int breadth,
int depth)
sb - the output string bufferprefix - the prefix string inserted at the beginning of each linebreadth - the breadth of the nodes to displaydepth - the depth of the nodes to display
void toText(java.lang.StringBuffer sb,
java.lang.String prefix)
sb - the output string bufferprefix - the prefix string inserted at the beginning of each line
java.lang.Object visit(NodeVisitor visitor,
java.lang.Object value)
throws GeneralException
visitor - the visitor to applyvalue - the argument for the visitor
GeneralException - in case of an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||