de.dante.extex.typesetter.type.node
Class AbstractExpandableNode

java.lang.Object
  extended byde.dante.extex.typesetter.type.node.AbstractNode
      extended byde.dante.extex.typesetter.type.node.AbstractExpandableNode
All Implemented Interfaces:
Node, java.io.Serializable
Direct Known Subclasses:
AlignedLeadersNode, CenteredLeadersNode, ExpandedLeadersNode, GlueNode

public abstract class AbstractExpandableNode
extends AbstractNode

This node represents a TeX "glue" node.

For the document writer it acts like a kern node. The width contains the distance to add.

The stretchability is adjusted by the typesetter and the width is adjusted accordingly.

Version:
$Revision: 1.5 $
Author:
Gerd Neugebauer, Michael Niedermair
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Fields inherited from class de.dante.extex.typesetter.type.node.AbstractNode
NO_CHARS
 
Constructor Summary
AbstractExpandableNode(FixedDimen size, boolean horizontal)
          Creates a new object.
AbstractExpandableNode(FixedGlue size, boolean horizontal)
          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.
 FixedGlue getSize()
          Getter for size.
 void setSize(FixedGlue skip)
          Setter for the size
 void spreadHeight(FixedDimen height, FixedGlueComponent sum)
          Adjust the height of a flexible node.
 void spreadWidth(FixedDimen width, FixedGlueComponent sum)
          Adjust the width of the flexible node.
 
Methods inherited from class de.dante.extex.typesetter.type.node.AbstractNode
advanceDepth, advanceHeight, advanceWidth, atShipping, computeAdjustment, countChars, getChars, getDepth, getHeight, getLocalizer, getVerticalSize, getWidth, maxDepth, maxHeight, maxWidth, setDepth, setHeight, setWidth, toString, toString, toText, toText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.dante.extex.typesetter.type.Node
visit
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

AbstractExpandableNode

public AbstractExpandableNode(FixedDimen size,
                              boolean horizontal)
Creates a new object. The size is used to determine the width in horizontal mode and the height in vertical mode.

Parameters:
size - the actual size
horizontal - indicator that the glue is used in horizontal mode

AbstractExpandableNode

public AbstractExpandableNode(FixedGlue size,
                              boolean horizontal)
Creates a new object. The size is used to determine the width in horizontal mode and the height in vertical mode.

Parameters:
size - the actual size
horizontal - indicator that the glue is used in horizontal mode
Method Detail

addDepthTo

public void addDepthTo(WideGlue glue)
Description copied from interface: Node
Add the flexible depth of the current node to the given glue.

Specified by:
addDepthTo in interface Node
Overrides:
addDepthTo in class AbstractNode
See Also:
Node.addDepthTo( de.dante.extex.interpreter.type.glue.WideGlue)

addHeightTo

public void addHeightTo(WideGlue glue)
Description copied from interface: Node
Add the flexible height of the current node to the given glue.

Specified by:
addHeightTo in interface Node
Overrides:
addHeightTo in class AbstractNode
See Also:
Node.addHeightTo( de.dante.extex.interpreter.type.glue.WideGlue)

addWidthTo

public void addWidthTo(WideGlue glue)
Description copied from interface: Node
Add the flexible width of the current node to the given glue.

Specified by:
addWidthTo in interface Node
Overrides:
addWidthTo in class AbstractNode
See Also:
Node.addWidthTo( de.dante.extex.interpreter.type.glue.WideGlue)

getSize

public FixedGlue getSize()
Getter for size.

Returns:
the size

setSize

public void setSize(FixedGlue skip)
Setter for the size

Parameters:
skip - the new value

spreadHeight

public void spreadHeight(FixedDimen height,
                         FixedGlueComponent sum)
Description copied from class: AbstractNode
Adjust the height of a flexible node. This method is a noop for any but the flexible nodes.

Specified by:
spreadHeight in interface Node
Overrides:
spreadHeight in class AbstractNode
Parameters:
height - the desired height
sum - the total sum of the glues
See Also:
AbstractNode.spreadHeight( de.dante.extex.interpreter.type.dimen.FixedDimen, de.dante.extex.interpreter.type.glue.FixedGlueComponent)

spreadWidth

public void spreadWidth(FixedDimen width,
                        FixedGlueComponent sum)
Adjust the width of the flexible node.

Specified by:
spreadWidth in interface Node
Overrides:
spreadWidth in class AbstractNode
Parameters:
width - the desired with
sum - the total sum of the glues
See Also:
Node.spreadWidth( de.dante.extex.interpreter.type.dimen.FixedDimen, de.dante.extex.interpreter.type.glue.FixedGlueComponent)