public class LayoutMasterSet extends FormattingObject
EMPTY_ARRAY
MAP_TYPE_FLYWEIGHT, MAP_TYPE_HASH
Constructor and Description |
---|
LayoutMasterSet()
Only for XMLFOFactory!
|
LayoutMasterSet(Document doc) |
Modifier and Type | Method and Description |
---|---|
void |
add(PageMaster pm)
Adds a PageMaster to this LayoutMasterSet.
|
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.
|
void |
addUnsafe(NodeElement element)
Adds a NodeElement to this FormattingObject.
|
boolean |
addUnsafe(java.lang.Object child)
Adds a NodeElement to this FormattingObject.
|
java.lang.Object |
clone()
Deep copy.
|
boolean |
containsMaster(java.lang.String masterName)
Determinates, if this LayoutMasterSet contains a PageMaster.
|
java.lang.Object |
firstElement()
Gets the first element of the content.
|
Document |
getDocument()
Returns the parent Document.
|
java.util.List |
getElements()
Gets childreen of this node.
|
PageMaster |
getMaster(java.lang.String masterName)
Gets a PageMaster.
|
java.util.List |
getPageMasters()
Returns all PageMasters that are contained by this LayoutMasterSet.
|
boolean |
isEmpty()
Tests, if the content is empty (has no 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.
|
boolean |
replaceElement(java.lang.Object oldElement,
java.lang.Object newElement)
Replaces an element.
|
java.lang.Object |
setElement(int index,
java.lang.Object e)
Replaces a node element at
index of this node. |
addUnsafe, cloned, clonedList, createUniqueID, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAccessibility, getAttributeMap, getBackground, getBorder, getDefinedAttributes, getFont, getID, getLanguage, getLogger, getMargin, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getPadding, getParentFO, getRelativePosition, getWidows, hasBorder, hasID, hasPadding, isHyphenation, 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 LayoutMasterSet(Document doc)
public LayoutMasterSet()
public Document getDocument()
getDocument
in class FormattingObject
public void add(PageMaster pm)
pm
- PageMaster.public java.util.List getPageMasters()
public boolean containsMaster(java.lang.String masterName)
masterName
- master-name.public PageMaster getMaster(java.lang.String masterName)
masterName
- master-name of PageMaster.public java.util.List getElements()
AbstractNode
NodeElement
or String
.getElements
in interface Node
getElements
in class AbstractNode
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(NodeElement element)
element
- Element.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()
FormattingObject
isEmpty
in interface Node
isEmpty
in class FormattingObject
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 replaceElement(java.lang.Object oldElement, java.lang.Object newElement)
replaceElement
in interface Node
replaceElement
in class FormattingObject
oldElement
- Old element.newElement
- New element.true
if this node contained oldElementpublic 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.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.