public class Block extends FlowObjectWithElements implements BlockElement
.
EMPTY_ARRAY
MAP_TYPE_FLYWEIGHT, MAP_TYPE_HASH
Constructor and Description |
---|
Block()
Creates a new empty Block.
|
Block(BlockElement element)
Creates a new Block and adds the given element to content.
|
Block(BlockElement element,
Values.Alignment align)
Creates a new Block, adds the given element to content and
sets the alignment.
|
Block(InlineElement element)
Creates a new Block and adds the given element to content.
|
Block(InlineElement element,
Values.Alignment align)
Creates a new Block, adds the given element to content and
sets the alignment.
|
Block(java.lang.String pcData)
Creates a new Block and adds the given PCData to content.
|
Block(java.lang.String pcData,
Values.Alignment align)
Creates a new Block, adds the given PCData to content and
sets the alignment.
|
Modifier and Type | Method and Description |
---|---|
Block |
add(BlockElement element)
Adds an formatting object (that is a block-group-member) to this FO
at end.
|
Block |
add(Footnote footnote)
Adds an footnote to this block at end.
|
Block |
add(InlineElement element)
Adds an formatting object (that is an inline-group-member) to this FO
at end.
|
Block |
add(int idx,
BlockElement element)
Adds an formatting object (that is a block-group-member) to this FO
at the given index.
|
Block |
add(int idx,
InlineElement element)
Adds an formatting object (that is an inline-group-member) to this FO
at the given index.
|
Block |
add(int idx,
java.lang.String pcdata)
Adds PCdata (Text) to this FO at the given index.
|
Block |
add(java.lang.String pcdata)
Adds PCdata (Text) to this FO.
|
Accessibility |
getAccessibility()
Gets the accessibilty of this fo.
|
Background |
getBackground()
Gets the background of this fo.
|
Border |
getBorder()
Gets the border of this fo.
|
Values.Break |
getBreakAfter()
Gets the break after this formatting object.
|
Values.Break |
getBreakBefore()
Gets the break before this formatting object.
|
Values.LinefeedTreatment |
getLinefeedTreatment()
Gets the linefeed treatment.
|
Measure |
getLineHeight()
Gets the height of line.
|
boolean |
getLineHeightShiftAdjustment() |
Margin |
getMargin()
Gets the margin of this fo.
|
Padding |
getPadding()
Gets the padding of this fo.
|
RelativePosition |
getRelativePosition()
Gets the relative position of this fo.
|
Values.Alignment |
getTextAlignment()
Gets alignment (left, right, center...) of text.
|
Values.Alignment |
getTextAlignmentLast()
Gets last (right) alignment (left, right, center...) of text.
|
Measure |
getTextIndent()
Gets the text-indent (first-line-indent) of this block.
|
Values.WhiteSpaceTreatment |
getWhiteSpaceTreatment()
Get the white space treatment.
|
boolean |
hasBorder()
Returns true if at least one border attribute is set.
|
boolean |
isWhiteSpaceCollapse()
Gets white space collapsing.
|
Block |
newLine()
Starts a new line.
|
void |
setAccessibility(Accessibility access)
Sets the accessibility of this fo.
|
void |
setAlignment(Values.Alignment alignment)
Deprecated.
use setTextAlignment
|
void |
setBackground(Background bg)
Sets the background of this fo.
|
void |
setBorder(Border border)
Sets the border of this fo.
|
void |
setBreakAfter(Values.Break type)
Sets the break before this formatting object.
|
void |
setBreakBefore(Values.Break type)
Sets the break before this formatting object.
|
void |
setLinefeedTreatment(Values.LinefeedTreatment treatment)
Sets the linefeed treatment.
|
void |
setLineHeight(Measure lineHeight)
Sets the height of a line.
|
void |
setLineHeightShiftAdjustment(boolean considerShift) |
void |
setMargin(Margin margin)
Sets the margin of this fo.
|
void |
setPadding(Padding padding)
Sets the padding of this fo.
|
void |
setRelativePosition(RelativePosition pos)
Sets the relative position of this block
|
void |
setTextAlignment(Values.Alignment alignment)
Sets alignment (left, right, center...) of text.
|
void |
setTextAlignmentLast(Values.Alignment alignment)
Sets last (right) alignment (left, right, center...) of text.
|
void |
setTextIndent(Measure indent)
Sets the text-indent (first-line-indent) of this block.
|
void |
setWhiteSpaceCollapse(boolean b)
Sets white space collapsing.
|
void |
setWhiteSpaceTreatment(Values.WhiteSpaceTreatment treatment)
Sets the white space treatment.
|
add, add, add, add, addAllImpl, addAllUnsafe, addAllUnsafe, addElement, addElement, addElements, addElements, addUnsafe, addUnsafe, clone, firstElement, getElementCount, getElements, isEmpty, lastElement, remove, remove, removeAll, removeElement, removeElement, removeLast, replaceElement, setElement
cloned, clonedList, createUniqueID, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAttributeMap, getDefinedAttributes, getDocument, getFont, getID, getLanguage, getLogger, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getParentFO, getWidows, hasID, hasPadding, isHyphenation, setAbsolutePosition, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setFont, setHyphenation, setID, setLanguage, setLanguage, setOrphans, setWidows
getDefaultMapType, setDefaultMapType
addAttributeChangeListener, 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
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttributeChangeListener, addElement, addElement, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, fireSaxEvents, firstElement, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getDefinedAttributes, getElements, getElements, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getQName, getRoot, indexOf, isEmpty, lastElement, removeAttributeChangeListener, removeElement, removeElement, replaceElement, setAttribute, setAttributes, setElement, setNamespace
clone, getParent, setParent, writeTo
public Block()
public Block(BlockElement element)
element
- A BlockGroupMember.public Block(InlineElement element)
element
- An InlineElement.public Block(java.lang.String pcData)
pcData
- Text/PCdata.public Block(BlockElement element, Values.Alignment align)
element
- A BlockGroupMember.align
- Alignment.public Block(InlineElement element, Values.Alignment align)
element
- A BlockGroupMember.align
- Alignment.public Block(java.lang.String pcData, Values.Alignment align)
pcData
- Text/PCdata.align
- Alignment.public Block newLine()
public Block add(InlineElement element)
element
- FormattingObject.public Block add(BlockElement element)
element
- FormattingObject.public Block add(Footnote footnote)
footnote
- Footnote.public Block add(java.lang.String pcdata)
pcdata
- Text/PCdata.public Block add(int idx, InlineElement element)
idx
- Index.element
- FormattingObject.public Block add(int idx, BlockElement element)
idx
- Index.element
- FormattingObject.public Block add(int idx, java.lang.String pcdata)
idx
- Index.pcdata
- Text/PCdata.public void setAlignment(Values.Alignment alignment)
alignment
- Alignment.public void setTextAlignment(Values.Alignment alignment)
alignment
- Alignment.Attributes.TEXT_ALIGN
public Values.Alignment getTextAlignment()
Attributes.TEXT_ALIGN
public void setTextAlignmentLast(Values.Alignment alignment)
alignment
- Alignment.Attributes.TEXT_ALIGN_LAST
public Values.Alignment getTextAlignmentLast()
Attributes.TEXT_ALIGN_LAST
public Margin getMargin()
getMargin
in class FormattingObject
public void setMargin(Margin margin)
setMargin
in class FormattingObject
margin
- Margin.public Padding getPadding()
getPadding
in class FormattingObject
public void setPadding(Padding padding)
setPadding
in class FormattingObject
padding
- Padding.public boolean hasBorder()
hasBorder
in class FormattingObject
public Border getBorder()
getBorder
in class FormattingObject
public void setBorder(Border border)
setBorder
in class FormattingObject
border
- Border.public Background getBackground()
getBackground
in class FormattingObject
public void setBackground(Background bg)
setBackground
in class FormattingObject
bg
- Background.public Accessibility getAccessibility()
getAccessibility
in class FormattingObject
public void setAccessibility(Accessibility access)
setAccessibility
in class FormattingObject
access
- Accessibility.public RelativePosition getRelativePosition()
getRelativePosition
in class FormattingObject
public void setRelativePosition(RelativePosition pos)
setRelativePosition
in class FormattingObject
pos
- RelativePosition.public void setTextIndent(Measure indent)
indent
- Indent of text.Attributes.TEXT_INDENT
public Measure getTextIndent()
Attributes.TEXT_INDENT
public void setBreakBefore(Values.Break type)
type
- Type of break. (see Values.BREAK_*)public Values.Break getBreakBefore()
public void setBreakAfter(Values.Break type)
type
- Type of break. (see Values.BREAK_*)Attributes.BREAK_AFTER
public Values.Break getBreakAfter()
Attributes.BREAK_AFTER
public void setWhiteSpaceCollapse(boolean b)
b
- true, if white spaces should be collapse.Attributes.WHITE_SPACE_COLLAPSE
public boolean isWhiteSpaceCollapse()
Attributes.WHITE_SPACE_COLLAPSE
public void setLinefeedTreatment(Values.LinefeedTreatment treatment)
treatment
- New linefeed treatment.Attributes.LINEFEED_TREATMENT
public Values.LinefeedTreatment getLinefeedTreatment()
Attributes.LINEFEED_TREATMENT
public void setWhiteSpaceTreatment(Values.WhiteSpaceTreatment treatment)
treatment
- New white space treatment.Attributes.WHITE_SPACE_TREATMENT
public Values.WhiteSpaceTreatment getWhiteSpaceTreatment()
Attributes.WHITE_SPACE_TREATMENT
public Measure getLineHeight()
public void setLineHeight(Measure lineHeight)
lineHeight
- Hight of line.public void setLineHeightShiftAdjustment(boolean considerShift)
public boolean getLineHeightShiftAdjustment()
© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.