public class XMLTable extends java.lang.Object implements ParagraphElementParent, org.docgene.model.conditions.ConditionElementsContainer<XMLTableRow>, ParagraphElement, Alignment
TYPE_NONE
Constructor and Description |
---|
XMLTable() |
Modifier and Type | Method and Description |
---|---|
void |
addConditionElement(org.docgene.model.conditions.ConditionElement<XMLTableRow> elt)
Add a condition element to the list.
|
void |
addElement(ParagraphElement element)
Add an element.
|
void |
addRow(XMLTableRow row)
Add a row to the table.
|
char |
getAlignment()
Return the alignment of the table.
|
char |
getAlignment(XMLTableCell cell)
Return the alignment of the cell in the table.
|
java.util.List<org.docgene.model.conditions.ConditionElement<XMLTableRow>> |
getAllElements() |
java.lang.String |
getCaption()
Return the table caption.
|
XMLTableColumn |
getColumn(XMLTableCell cell)
Return the column associated with a cell.
|
java.util.Set<java.lang.String> |
getCustomStyles()
Return the element custom classes.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.util.List<ParagraphElement> |
getElements()
Return the list of children elements.
|
XMLTableRow |
getFirstRow(ArticlesModel model)
Return the first row.
|
java.lang.String |
getInlinedStyle()
Return the element custom inline style.
|
char |
getPadding()
Return the padding of the table rows.
|
java.util.List<XMLTableRow> |
getRows(ArticlesModel model)
Return the rows in the table.
|
XMLTableHeader |
getTableHeader()
Return the table header.
|
int |
getWidth()
Return the table width.
|
boolean |
hasBorders()
Return true if the table has borders.
|
boolean |
hasCaption()
Return true if the table has a caption.
|
boolean |
hasCustomRows()
Return true if the table has rows with custom widths.
|
boolean |
hasWidth()
Return true if the table has a specified width.
|
boolean |
isFixedLayout()
Return true if the table has a fixed layout.
|
boolean |
isFloat()
Return true if the table element should have the "float" attribute.
|
boolean |
isRelativeWidth()
Return true if the table width is relative (in %).
|
boolean |
isSortable()
Return true if the table has arrows to sort columns by their content.
|
boolean |
isVertical()
Return true if the table is vertical.
|
void |
setAlignment(char align)
Set the alignment of the table.
|
void |
setBorders(boolean hasBorders)
Set if the table has borders.
|
void |
setCaption(java.lang.String caption)
Set the table caption.
|
void |
setCustomStyles(java.util.Set<java.lang.String> classes)
Set the element custom classes.
|
void |
setElements(java.util.List<ParagraphElement> elements)
Set the list of elements.
|
void |
setFixedLayout(boolean fixedLayout)
Set if the table has a fixed layout.
|
void |
setFloat(boolean isFloat)
Set if the table element should have the "float" attribute.
|
void |
setInlinedStyle(java.lang.String style)
Set the element custom inline style.
|
void |
setPadding(char padding)
Set the padding of the table rows.
|
void |
setSortable(boolean isSortable)
Set if the table has arrows to sort columns by their content.
|
void |
setTableHeader(XMLTableHeader header)
Set the table header.
|
void |
setVertical(boolean isVertical)
Set if the table is horizontal or vertical.
|
void |
setWidth(int width,
boolean relWidth)
Set the table width.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countElements, getElement, getFirstElement, getLastElement, hasElements, isEmpty
getFilteredElements
getStyle, hasInlinedStyle, setCustomStyles
public java.lang.String getDeclaration()
getDeclaration
in interface StyledElement
public void setFloat(boolean isFloat)
isFloat
- true if the table element should have the "float" attributepublic boolean isFloat()
public void setAlignment(char align)
setAlignment
in interface Alignment
align
- the alignmentAlignment
public char getAlignment()
getAlignment
in interface Alignment
Alignment
public void setPadding(char padding)
padding
- the paddingpublic char getPadding()
public void setTableHeader(XMLTableHeader header)
header
- the table headerpublic XMLTableHeader getTableHeader()
public char getAlignment(XMLTableCell cell)
cell
- the cellpublic XMLTableColumn getColumn(XMLTableCell cell)
cell
- the cellpublic void setFixedLayout(boolean fixedLayout)
fixedLayout
- true if the table has a fixed layoutpublic boolean isFixedLayout()
public void setSortable(boolean isSortable)
isSortable
- true if the table has arrows to sort columns by their contentpublic boolean isSortable()
public boolean hasCustomRows()
public void setBorders(boolean hasBorders)
hasBorders
- true if the table has borderspublic boolean hasBorders()
public void setWidth(int width, boolean relWidth)
width
- the table widthrelWidth
- true if the width is relative (in percent)public boolean isRelativeWidth()
public int getWidth()
public boolean hasWidth()
public boolean isVertical()
public void setVertical(boolean isVertical)
isVertical
- true if the table is verticalpublic void setInlinedStyle(java.lang.String style)
setInlinedStyle
in interface StyledElement
style
- the element custom inline stylepublic java.lang.String getInlinedStyle()
getInlinedStyle
in interface StyledElement
public void setCustomStyles(java.util.Set<java.lang.String> classes)
setCustomStyles
in interface StyledElement
classes
- the custom element classespublic java.util.Set<java.lang.String> getCustomStyles()
getCustomStyles
in interface StyledElement
public void addRow(XMLTableRow row)
row
- the rowpublic XMLTableRow getFirstRow(ArticlesModel model)
model
- the articles modelpublic java.util.List<XMLTableRow> getRows(ArticlesModel model)
model
- the articles modelpublic java.util.List<org.docgene.model.conditions.ConditionElement<XMLTableRow>> getAllElements()
getAllElements
in interface org.docgene.model.conditions.ConditionElementsContainer<XMLTableRow>
public void setCaption(java.lang.String caption)
caption
- the captionpublic java.lang.String getCaption()
public boolean hasCaption()
public void addConditionElement(org.docgene.model.conditions.ConditionElement<XMLTableRow> elt)
addConditionElement
in interface org.docgene.model.conditions.ConditionElementsContainer<XMLTableRow>
elt
- the condition elementpublic void addElement(ParagraphElement element)
ParagraphElementParent
addElement
in interface ParagraphElementParent
element
- the elementpublic java.util.List<ParagraphElement> getElements()
ParagraphElementParent
getElements
in interface ParagraphElementParent
public void setElements(java.util.List<ParagraphElement> elements)
ParagraphElementParent
setElements
in interface ParagraphElementParent
elements
- the list of elementsCopyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence