public class XMLMessageBox extends XMLBlock implements org.docgene.model.TodoElement, org.docgene.model.ImageReference
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 short |
DEFAULT
The default messageBox type.
|
static short |
ERROR
The Error messageBox type.
|
static java.lang.String |
IN_WORK_NAME
The name of the in work background for the Progress messageBox type.
|
static short |
INFO
The Info messageBox type.
|
static short |
PROGRESS
The Progress messageBox type.
|
static short |
SUCCESS
The Success messageBox type.
|
static short |
WARNING
The Warning messageBox type.
|
TYPE_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, setCustomStyles
addElement, getElements, removeLastElement, setElements
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setInlinedStyle
countElements, getElement, getFirstElement, getLastElement, hasElements, isEmpty
public static final short DEFAULT
public static final short INFO
public static final short SUCCESS
public static final short WARNING
public static final short ERROR
public static final short PROGRESS
public 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 org.docgene.model.ElementReference
public java.lang.String getDeclaration()
getDeclaration
in interface StyledElement
getDeclaration
in class XMLBlock
public 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 org.docgene.model.TodoElement
public java.lang.String getReason()
getReason
in interface org.docgene.model.TodoElement
public void setIndex(int index)
index
- the todo indexpublic int getIndex()
getIndex
in interface org.docgene.model.ReviewElement
public java.lang.String getRef()
getRef
in interface org.docgene.model.ReviewElement
public void bind(org.docgene.model.globals.ImageDefinition image)
bind
in interface org.docgene.model.ImageReference
image
- the imageDef definitionpublic org.docgene.model.globals.ImageDefinition getImage()
getImage
in interface org.docgene.model.ImageReference
public boolean hasImageDefinition()
hasImageDefinition
in interface org.docgene.model.ImageReference
public java.lang.String getImageID()
getImageID
in interface org.docgene.model.ImageReference
public boolean hasID()
hasID
in interface org.docgene.model.ImageReference
public java.io.File getHRef()
getHRef
in interface org.docgene.model.ImageReference
public boolean hasHRef()
hasHRef
in interface org.docgene.model.ImageReference
public boolean hasImageReference()
hasImageReference
in interface org.docgene.model.ImageReference
public 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 org.docgene.model.ImageReference
public 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 org.docgene.model.TodoElement
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence