public class ExternalGraphic extends FlowObject implements InlineElement
EMPTY_ARRAY
MAP_TYPE_FLYWEIGHT, MAP_TYPE_HASH
Constructor and Description |
---|
ExternalGraphic() |
ExternalGraphic(java.lang.String src) |
Modifier and Type | Method and Description |
---|---|
boolean |
addUnsafe(java.lang.Object child)
Adds a NodeElement to this FormattingObject.
|
Accessibility |
getAccessibility()
Gets the accessibilty of this fo.
|
Background |
getBackground()
Gets the background of this fo.
|
Border |
getBorder()
Gets the border of this fo.
|
Measure |
getContentHeight()
Gets the height of graphic content, is NULL, if not defined.
|
Measure |
getContentWidth()
Gets the width of graphic content, is NULL, if not defined.
|
Values.DisplayAlignment |
getDisplayAlign()
Gets the display-alignment.
|
java.util.List |
getElements()
Gets childreen of this node.
|
Measure |
getHeight()
Gets the height of this graphic container, is NULL, if not defined.
|
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.Scaling |
getScaling()
Gets the scaling typ of this graphic.
|
java.lang.String |
getSource()
Gets the source URL of this external graphic.
|
Values.Alignment |
getTextAlignment()
Gets the alignment of text.
|
Measure |
getWidth()
Gets the width of this graphic container, is NULL, if not defined.
|
boolean |
hasBorder()
Returns true if at least one border attribute is set.
|
void |
setAccessibility(Accessibility access)
Sets the accessibility of this fo.
|
void |
setBackground(Background bg)
Sets the background of this fo.
|
void |
setBorder(Border border)
Sets the border of this fo.
|
void |
setContentHeight(Measure height)
Sets the height of graphic content.
|
void |
setContentSize(Measure width,
Measure height)
Sets width and height of graphic content.
|
void |
setContentWidth(Measure width)
Sets the width of graphic content.
|
void |
setDisplayAlign(Values.DisplayAlignment align)
Sets the display-alignment.
|
void |
setHeight(Measure height)
Sets the height of this graphic container.
|
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 fo.
|
void |
setScaling(Values.Scaling scaling)
Sets the scaling type of this graphic.
|
void |
setSize(Measure width,
Measure height)
Sets width and height of this graphic container.
|
void |
setSource(java.lang.String source)
Sets the source of this external graphic.
|
void |
setSourceAsBase64Data(byte[] image,
java.lang.String mediaType)
Sets the source as instream data using the URL-data scheme (RFC 2397).
|
void |
setSourceAsUrl(java.lang.String url)
Set the source URL of this graphic.
|
void |
setTextAlignment(Values.Alignment alignment)
Sets the alignment of text.
|
void |
setWidth(Measure width)
Sets the width of this graphic container.
|
addElement, addElement, addUnsafe, clone, cloned, clonedList, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAttributeMap, getDefinedAttributes, getDocument, getFont, getID, getLanguage, getLogger, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getParentFO, getWidows, hasID, hasPadding, isEmpty, isHyphenation, removeElement, removeElement, replaceElement, setAbsolutePosition, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setElement, setFont, setHyphenation, setID, setLanguage, setLanguage, setOrphans, setWidows
getDefaultMapType, setDefaultMapType
addAttributeChangeListener, addElements, addElements, clearEqualAttributes, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, contains, copyAttributes, createID, findFirstNodeWithText, findNode, findNodesWithText, fire, fireSaxEvents, firstElement, 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, lastElement, 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, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getQName, getRoot, indexOf, isEmpty, lastElement, removeAttributeChangeListener, removeElement, removeElement, replaceElement, setAttribute, setAttributes, setElement, setNamespace
clone, getParent, setParent, writeTo
public ExternalGraphic()
public ExternalGraphic(java.lang.String src)
public java.util.List getElements()
AbstractNode
NodeElement
or String
.getElements
in interface Node
getElements
in class AbstractNode
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 setTextAlignment(Values.Alignment alignment)
alignment
- Alignment of text.public Values.Alignment getTextAlignment()
public java.lang.String getSource()
public void setSource(java.lang.String source)
source
- Source of graphic.public void setSourceAsUrl(java.lang.String url)
url
is wrapped
in URL-function: url(url
).url
- URL of graphic.public void setSourceAsBase64Data(byte[] image, java.lang.String mediaType)
image
- byte[] Image datamediaType
- Optionally media type of image (e.g. image/gif) or null if unknown.public void setDisplayAlign(Values.DisplayAlignment align)
align
- Alignment.public Values.DisplayAlignment getDisplayAlign()
public Measure getHeight()
public Measure getContentHeight()
public Measure getWidth()
public void setWidth(Measure width)
width
- Width.public void setHeight(Measure height)
height
- Height.public void setSize(Measure width, Measure height)
width
- Width.height
- Height.public void setContentHeight(Measure height)
height
- Height.public Measure getContentWidth()
public void setContentWidth(Measure width)
width
- Width.public void setContentSize(Measure width, Measure height)
width
- Width.height
- Height.public void setScaling(Values.Scaling scaling)
scaling
- Scaling type.public Values.Scaling getScaling()
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.