|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.typesetter.type.node.AbstractNode
public abstract class AbstractNode
This abstract class provides some methods common to all Nodes.
| Field Summary | |
|---|---|
protected static CharNode[] |
NO_CHARS
The constant NO_CHAR contains the empty array of CharNode. |
| Constructor Summary | |
|---|---|
AbstractNode()
Creates a new object. |
|
AbstractNode(FixedDimen aWidth)
Creates a new object. |
|
AbstractNode(FixedDimen aWidth,
FixedDimen aHeight,
FixedDimen aDepth)
Creates a new object. |
|
| 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. |
void |
advanceNaturalDepth(FixedDimen x)
Advance the depth by some length. |
void |
advanceNaturalHeight(FixedDimen x)
Advance the height by some length. |
void |
advanceNaturalWidth(FixedDimen x)
Advance the width by some length. |
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. |
protected java.lang.Object |
clone()
|
protected long |
computeAdjustment(long size,
FixedGlue glue,
FixedGlueComponent sum)
Compute the amount of adjustment needed to achieve a certain size. |
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. |
protected Localizer |
getLocalizer()
Getter for localizer. |
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 |
maxDepth(FixedDimen x)
Assign the maximum of the current value and a comparison value to the depth. |
void |
maxHeight(FixedDimen x)
Assign the maximum of the current value and a comparison value to the height. |
void |
maxWidth(FixedDimen x)
Assign the maximum of the current value and a comparison value to the width. |
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 h,
FixedGlueComponent sum)
Adjust the height of a flexible node. |
void |
spreadWidth(FixedDimen w,
FixedGlueComponent sum)
Adjust the width of a flexible node. |
java.lang.String |
toString()
This method returns the printable representation. |
void |
toString(java.lang.StringBuffer sb,
java.lang.String prefix,
int breadth,
int d)
This method puts the printable representation into the string buffer. |
protected java.lang.String |
toText(java.lang.String prefix)
Compute a text representation of this object. |
void |
toText(java.lang.StringBuffer sb,
java.lang.String prefix)
Puts a text representation of the object into a string buffer. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.extex.typesetter.type.Node |
|---|
visit |
| Field Detail |
|---|
protected static final CharNode[] NO_CHARS
| Constructor Detail |
|---|
public AbstractNode()
public AbstractNode(FixedDimen aWidth)
aWidth - the width of the node
public AbstractNode(FixedDimen aWidth,
FixedDimen aHeight,
FixedDimen aDepth)
aWidth - the width of the nodeaHeight - the height of the nodeaDepth - the depth of the node| Method Detail |
|---|
public void addDepthTo(WideGlue glue)
addDepthTo in interface Nodeglue - the glue to add to.Node.addDepthTo(
org.extex.core.glue.WideGlue)public void addHeightTo(WideGlue glue)
addHeightTo in interface Nodeglue - the glue to add to.Node.addHeightTo(
org.extex.core.glue.WideGlue)public void addWidthTo(WideGlue glue)
addWidthTo in interface Nodeglue - the glue to add to.Node.addWidthTo(
org.extex.core.glue.WideGlue)public void advanceNaturalDepth(FixedDimen x)
x - the length to addpublic void advanceNaturalHeight(FixedDimen x)
x - the length to addpublic void advanceNaturalWidth(FixedDimen x)
x - the length to add
public Node atShipping(PageContext context,
Typesetter typesetter,
FixedDimen posX,
FixedDimen posY)
throws GeneralException
atShipping in interface Nodecontext - 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 errorNode.atShipping(
org.extex.typesetter.PageContext, org.extex.typesetter.Typesetter,
org.extex.core.dimen.FixedDimen, org.extex.core.dimen.FixedDimen)
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionObject.clone()
protected long computeAdjustment(long size,
FixedGlue glue,
FixedGlueComponent sum)
size - the current size in scaled pointsglue - the gluesum - the total stretchability or shrinkability
public int countChars()
countChars in interface NodeNode.countChars()public CharNode[] getChars()
getChars in interface NodeNode.getChars()public FixedDimen getDepth()
getDepth in interface NodeNode.getDepth()public FixedDimen getHeight()
getHeight in interface NodeNode.getHeight()protected Localizer getLocalizer()
public FixedDimen getNaturalDepth()
getNaturalDepth in interface NodeNode.getNaturalDepth()public FixedDimen getNaturalHeight()
getNaturalHeight in interface NodeNode.getNaturalHeight()public FixedDimen getNaturalWidth()
getNaturalWidth in interface NodegetWidth()public FixedDimen getVerticalSize()
getVerticalSize in interface NodeNode.getVerticalSize()public FixedDimen getWidth()
getWidth in interface NodeNode.getWidth()public void maxDepth(FixedDimen x)
x - the length to compare topublic void maxHeight(FixedDimen x)
x - the length to compare topublic void maxWidth(FixedDimen x)
x - the length to compare topublic void setDepth(FixedDimen depth)
setDepth in interface Nodedepth - the node depthNode.setDepth(
org.extex.core.dimen.FixedDimen)public void setHeight(FixedDimen height)
setHeight in interface Nodeheight - the new heightNode.setHeight(
org.extex.core.dimen.FixedDimen)public void setWidth(FixedDimen width)
setWidth in interface Nodewidth - the new widthNode.setWidth(
org.extex.core.dimen.FixedDimen)
public void spreadHeight(FixedDimen h,
FixedGlueComponent sum)
spreadHeight in interface Nodeh - the desired heightsum - the total sum of the gluesNode.spreadHeight(
org.extex.core.dimen.FixedDimen, FixedGlueComponent)
public void spreadWidth(FixedDimen w,
FixedGlueComponent sum)
spreadWidth in interface Nodew - the desired widthsum - the total sum of the gluesNode.spreadWidth(
org.extex.core.dimen.FixedDimen,
org.extex.core.glue.FixedGlueComponent)public java.lang.String toString()
toString in class java.lang.Object
public void toString(java.lang.StringBuffer sb,
java.lang.String prefix,
int breadth,
int d)
toString in interface Nodesb - the output string bufferprefix - the prefix string inserted at the beginning of each linebreadth - the breadth of the nodes to displayd - the depth of the nodes to displayNode.toString(java.lang.StringBuffer,
java.lang.String, int, int)protected java.lang.String toText(java.lang.String prefix)
prefix - the string prepended to each line of the resulting text
public void toText(java.lang.StringBuffer sb,
java.lang.String prefix)
toText in interface Nodesb - the output string bufferprefix - the string prepended to each line of the resulting textNode.toText(java.lang.StringBuffer,
java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||