public abstract class SwappingFObj extends FormattingObject
EMPTY_ARRAY
MAP_TYPE_FLYWEIGHT, MAP_TYPE_HASH
Constructor and Description |
---|
SwappingFObj(java.lang.String xmlName) |
SwappingFObj(java.lang.String xmlName,
FormattingObject parent) |
Modifier and Type | Method and Description |
---|---|
void |
add(int idx,
MultiSwitch element)
Adds a MultiSwitch at the given index.
|
void |
add(MultiSwitch element)
Adds a MultiSwitch.
|
void |
addElement(int index,
java.lang.Object e)
Adds a node element at
index to this node. |
void |
addElement(java.lang.Object e)
Adds a node element to this node.
|
void |
addUnsafe(int idx,
NodeElement element)
Adds a NodeElement to this FormattingObject at a given index.
|
boolean |
addUnsafe(java.lang.Object child)
Adds a NodeElement to this FormattingObject.
|
java.lang.Object |
clone()
Deep copy.
|
void |
disableAutoSwapping()
Disables auto-swapping of elements.
|
java.lang.Object |
firstElement()
Gets the first element of the content.
|
protected SwappingList |
getElementList() |
java.util.List |
getElements()
Gets childreen of this node.
|
boolean |
isEmpty()
Test if this fo contains any elements.
|
java.lang.Object |
lastElement()
Gets the last element of the content.
|
boolean |
remove(int idx)
Removes an object from the content.
|
boolean |
remove(java.lang.Object obj)
Removes an object from the content.
|
void |
removeAll()
Removes all objects from content.
|
java.lang.Object |
removeElement(int i)
Removes an element from this node.
|
boolean |
removeElement(java.lang.Object e)
Removes an element from this node.
|
boolean |
removeLast()
Removes the last object from content.
|
void |
setAutoSwapping(int maxMemElements,
int keepMemElements)
Enables or disabled swapping of elements.
|
java.lang.Object |
setElement(int index,
java.lang.Object e)
Replaces a node element at
index of this node. |
void |
swapAll()
Swaps all elements to a temporary file on disc.
|
addUnsafe, cloned, clonedList, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAccessibility, getAttributeMap, getBackground, getBorder, getDefinedAttributes, getDocument, getFont, getID, getLanguage, getLogger, getMargin, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getPadding, getParentFO, getRelativePosition, getWidows, hasBorder, hasID, hasPadding, isHyphenation, replaceElement, setAbsolutePosition, setAccessibility, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBackground, setBorder, setFont, setHyphenation, setID, setLanguage, setLanguage, setMargin, setOrphans, setPadding, setRelativePosition, setWidows
getDefaultMapType, setDefaultMapType
addAttributeChangeListener, addElements, addElements, clearEqualAttributes, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, contains, copyAttributes, createID, findFirstNodeWithText, findNode, findNodesWithText, fire, fireSaxEvents, getAttrAsBoolean, getAttrAsInteger, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getContentText, getDefinedAttributes, getElements, getElements, getElements, getFirstElement, getIndex, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getParent, getParent, getParent, getParentOrThis, getQName, getRoot, hasEqualAttrs, indexOf, liftInheritedAttribute, removeAttributeChangeListener, setAttribute, setAttributes, setAttrIfNotNull, setEnableAttributeChangeEvent, setNamespace, setParent, setQName, setUndefinedAttributes, writeTo, writeTo, writeTo, writeTo
public SwappingFObj(java.lang.String xmlName)
public SwappingFObj(java.lang.String xmlName, FormattingObject parent)
public void add(MultiSwitch element)
element
- MultiSwitch.public void add(int idx, MultiSwitch element)
idx
- Index.element
- MultiSwitch.public java.lang.Object lastElement()
lastElement
in interface Node
lastElement
in class AbstractNode
public java.lang.Object firstElement()
firstElement
in interface Node
firstElement
in class AbstractNode
public boolean remove(int idx)
idx
- Index of object.public boolean remove(java.lang.Object obj)
obj
- Object to be removed from the content, if present.public boolean removeLast()
public void removeAll()
public void addUnsafe(int idx, NodeElement element)
idx
- Index.element
- Element.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface NodeElement
clone
in class FormattingObject
java.lang.CloneNotSupportedException
public boolean isEmpty()
isEmpty
in interface Node
isEmpty
in class FormattingObject
public java.util.List getElements()
AbstractNode
NodeElement
or String
.getElements
in interface Node
getElements
in class AbstractNode
public void setAutoSwapping(int maxMemElements, int keepMemElements)
maxMemElements
- Maximum number of elements in memory.keepMemElements
- Number of elements that are keeped in memory
after swapping. To swap all elements when
exceeding maximum the keepMemElements to 0.public void disableAutoSwapping()
public void swapAll()
public void addElement(java.lang.Object e)
addElement
in interface Node
addElement
in class FormattingObject
e
- Node element.java.lang.UnsupportedOperationException
- is throws if no childreen are allowed.java.lang.NullPointerException
- is thrown if e==null
public void addElement(int index, java.lang.Object e)
index
to this node.addElement
in interface Node
addElement
in class FormattingObject
index
- Index of element.e
- Node element.java.lang.IndexOutOfBoundsException
- is thrown if index
is out of bounds.java.lang.UnsupportedOperationException
- is throws if no childreen are allowed.java.lang.NullPointerException
- is thrown if e==null
public java.lang.Object setElement(int index, java.lang.Object e)
index
of this node.setElement
in interface Node
setElement
in class FormattingObject
index
- Index of element.e
- Node element.java.lang.IndexOutOfBoundsException
- is thrown if index
is out of bounds.java.lang.UnsupportedOperationException
- is throws if no childreen are allowed.java.lang.NullPointerException
- is thrown if e==null
public boolean removeElement(java.lang.Object e)
removeElement
in interface Node
removeElement
in class FormattingObject
e
- NodeElementpublic java.lang.Object removeElement(int i)
removeElement
in interface Node
removeElement
in class FormattingObject
i
- Index of element.java.lang.IndexOutOfBoundsException
- is thrown if index
is out of bounds.protected SwappingList getElementList()
public boolean addUnsafe(java.lang.Object child)
FormattingObject
addUnsafe
in class FormattingObject
child
- Element.false
if this FO is unable to add object.© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.