public class XMLPre extends org.docgene.model.AbstractJustifiedElement implements org.docgene.model.BorderedElement, ParagraphElementParent
TYPE_NONE
Constructor and Description |
---|
XMLPre(boolean isSource)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(ParagraphElement element)
Add an element.
|
boolean |
allowInvisibleChars()
Return true if the invisible char character is supported.
|
short |
getBorderType()
Return the pre block border type.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.util.List<ParagraphElement> |
getElements()
Return the list of elements.
|
java.io.File |
getPreFile()
Return the File associated with the pre element.
|
char |
getScrollingType()
Return the scrolling type.
|
java.lang.String |
getSyntax()
Return the pre syntax.
|
int |
getTrimmedLeftLength()
Return the length of the spaces before the pre on the same line.
|
boolean |
hasBackground()
Return true if the pre element has a background.
|
boolean |
hasColor()
Return true if the pre has a specified background color.
|
boolean |
hasSpecificStyle()
Return true if the pre elemetn has a specified background color or a border.
|
boolean |
hasSyntax()
Return true if the pre has a syntax.
|
boolean |
hasTrimmedLeftLength()
Return true the length of the spaces before the pre on the same line if not 0.
|
boolean |
isSource()
Return true for a source tag.
|
boolean |
isTrimmedLeft()
Return true if the text must be trimmed to the left.
|
void |
setBorderType(short borderType)
Set if the pre block border type.
|
void |
setElements(java.util.List<ParagraphElement> elements)
Set the pre elements.
|
void |
setHasBackground(boolean hasBackground)
Set if the pre element has a background.
|
void |
setHasColor(boolean hasColor)
Set if the pre has a specified background color.
|
void |
setInvisibleChars(boolean invisibleChars)
Set if the invisible char character is supported.
|
void |
setPreFile(java.io.File preFile)
Set the File associated with the pre element.
|
void |
setScrollingType(char scrollingType)
Set the scrolling type.
|
void |
setSyntax(java.lang.String syntax)
Set the pre syntax.
|
void |
setTrimLeft(boolean trimLeft)
Set if the text must be trimmed to the left.
|
void |
setTrimmedLeftLength(int trimmedLeft)
Set the length of the spaces before the pre on the same line.
|
boolean |
useFile()
Return true if there is a File associated with the pre element.
|
isFirstInLine, setFirstInLine
getCustomStyles, getInlinedStyle, setCustomStyles, setInlinedStyle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countElements, getElement, getFirstElement, getLastElement, hasElements, isEmpty
getStyle, hasInlinedStyle, setCustomStyles
public XMLPre(boolean isSource)
isSource
- true for a "source tag"public void setPreFile(java.io.File preFile)
preFile
- the Filepublic java.io.File getPreFile()
public boolean useFile()
public void setTrimmedLeftLength(int trimmedLeft)
trimmedLeft
- the length of the spaces before the pre on the same linepublic int getTrimmedLeftLength()
public boolean hasTrimmedLeftLength()
public void setHasBackground(boolean hasBackground)
hasBackground
- true if the pre element has a backgroundpublic boolean hasBackground()
public void setScrollingType(char scrollingType)
scrollingType
- the typePreScrollingType
public char getScrollingType()
PreScrollingType
public void setTrimLeft(boolean trimLeft)
trimLeft
- true if the text must be trimmed to the leftpublic boolean isTrimmedLeft()
public void setInvisibleChars(boolean invisibleChars)
invisibleChars
- if the invisible char character is supportedpublic void setHasColor(boolean hasColor)
hasColor
- true if the pre has a specified background colorpublic boolean hasColor()
public boolean hasSpecificStyle()
public java.lang.String getDeclaration()
getDeclaration
in interface StyledElement
public boolean allowInvisibleChars()
public boolean isSource()
public void setBorderType(short borderType)
borderType
- the pre block border typeBorderType
public short getBorderType()
getBorderType
in interface org.docgene.model.BorderedElement
BorderType
public void setSyntax(java.lang.String syntax)
syntax
- the pre syntaxpublic boolean hasSyntax()
public java.lang.String getSyntax()
public void addElement(ParagraphElement element)
addElement
in interface ParagraphElementParent
element
- the elementpublic void setElements(java.util.List<ParagraphElement> elements)
setElements
in interface ParagraphElementParent
elements
- the pre elementspublic java.util.List<ParagraphElement> getElements()
getElements
in interface ParagraphElementParent
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence