public class XMLMessageBox extends XMLBlock implements TodoElement, ImageReference, MessageBoxType
| Modifier and Type | Field and Description |
|---|---|
static short |
CAPTION_BORDER
The type to put the caption on the border of the box.
|
static short |
CAPTION_INSIDE
The type to put the caption inside the box.
|
static java.lang.String |
IN_WORK_NAME
The name of the in work background for the Progress messageBox type.
|
elementsDEFAULT, ERROR, INFO, PROGRESS, SUCCESS, WARNINGTYPE_NONE| Constructor and Description |
|---|
XMLMessageBox(XMLParentArticle article)
Constructor.
|
XMLMessageBox(XMLParentArticle article,
java.io.File href)
Constructor.
|
XMLMessageBox(XMLParentArticle article,
java.lang.String id,
java.lang.String pack)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(org.docgene.model.globals.ImageDefinition image)
Bind this imageDef reference to its associated imageDef definition.
|
void |
bindBackgroundImage(org.docgene.model.globals.ImageDefinition image)
Bind the optional background imageDef.
|
XMLParentArticle |
getArticle()
Return the article in which this message box is used.
|
org.docgene.model.globals.ImageDefinition |
getBackgroundImage()
Return the optional background imageDef.
|
java.lang.String |
getCaption()
Return the caption of the box (may be null if there is no caption).
|
short |
getCaptionPositionType()
Return the type of the positioning for the box caption.
|
java.lang.String |
getColor()
Return the message box background color.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.io.File |
getHRef()
Return the image path.
|
org.docgene.model.globals.ImageDefinition |
getImage()
Return the associated imageDef definition.
|
java.lang.String |
getImageID()
Return the imageDef reference ID.
|
int |
getIndex()
Return the todo index.
|
int |
getLineNumber()
Return the line where the reference appear.
|
java.lang.String |
getPackage()
Return the imageDef reference package.
|
java.lang.String |
getReason()
Return the reason of the TODO.
|
java.lang.String |
getRef()
Return the todo reference composed using the todo index.
|
short |
getType()
Return the message box type.
|
boolean |
hasBackgroundImage()
Return true if there is a background imageDef.
|
boolean |
hasCaption()
Return true if the box has a caption.
|
boolean |
hasHRef()
Return true if this messageBox references an imageDef path.
|
boolean |
hasID()
Return true if this messageBox references an imageDef ID
|
boolean |
hasImageDefinition()
Return true if this message box reference an image definition
|
boolean |
hasImageReference()
Return true if this messageBox reference an imageDef definition or path
|
boolean |
hasReason()
Return true if the TODO has a reason.
|
void |
setCaption(java.lang.String caption,
short captionPosType)
Set the message box caption.
|
void |
setColor(java.lang.String color)
Set the message box background color.
|
void |
setIndex(int index)
Set the todo index.
|
void |
setLineNumber(int lineNumber)
Set the line number where the reference appear.
|
void |
setReason(java.lang.String reason)
Set the reason of the TODO.
|
void |
setType(short type)
Set the message box type.
|
getBorderType, getCustomStyles, hasShadow, setBorderType, setCustomStylesaddElement, getElements, removeLastElement, setElementsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTODOText, hasTODOTexthasLineNumberhasBordergetInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setInlinedStylecountElements, getElement, getFirstElement, getLastElement, hasElements, isEmptypublic static final short CAPTION_INSIDE
public static final short CAPTION_BORDER
public static final java.lang.String IN_WORK_NAME
public XMLMessageBox(XMLParentArticle article)
article - the articlepublic XMLMessageBox(XMLParentArticle article, java.lang.String id, java.lang.String pack)
article - the articleid - the imageDef reference idpack - the imageDef reference packagepublic XMLMessageBox(XMLParentArticle article, java.io.File href)
article - the articlehref - the href Filepublic void setLineNumber(int lineNumber)
lineNumber - the line numberpublic int getLineNumber()
getLineNumber in interface ElementReferencepublic java.lang.String getDeclaration()
getDeclaration in interface StyledElementgetDeclaration in class XMLBlockpublic XMLParentArticle getArticle()
public void setCaption(java.lang.String caption,
short captionPosType)
caption - the captioncaptionPosType - the caption type, specifying where the caption will appearpublic boolean hasCaption()
public java.lang.String getCaption()
public short getCaptionPositionType()
public void setReason(java.lang.String reason)
reason - the reasonpublic boolean hasReason()
hasReason in interface TodoElementpublic java.lang.String getReason()
getReason in interface TodoElementpublic void setIndex(int index)
index - the todo indexpublic int getIndex()
getIndex in interface ReviewElementpublic java.lang.String getRef()
getRef in interface ReviewElementpublic void bind(org.docgene.model.globals.ImageDefinition image)
bind in interface ImageReferenceimage - the imageDef definitionpublic org.docgene.model.globals.ImageDefinition getImage()
getImage in interface ImageReferencepublic boolean hasImageDefinition()
hasImageDefinition in interface ImageReferencepublic java.lang.String getImageID()
getImageID in interface ImageReferencepublic boolean hasID()
hasID in interface ImageReferencepublic java.io.File getHRef()
getHRef in interface ImageReferencepublic boolean hasHRef()
hasHRef in interface ImageReferencepublic boolean hasImageReference()
hasImageReference in interface ImageReferencepublic void bindBackgroundImage(org.docgene.model.globals.ImageDefinition image)
image - the imageDefpublic org.docgene.model.globals.ImageDefinition getBackgroundImage()
public boolean hasBackgroundImage()
public java.lang.String getPackage()
getPackage in interface ImageReferencepublic void setColor(java.lang.String color)
color - the background colorpublic java.lang.String getColor()
public void setType(short type)
type - the typepublic short getType()
getType in interface TodoElementCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence