ru.novosoft.dc.rtf.dom
Class RowContext

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.ShadingContext
        |
        +--ru.novosoft.dc.rtf.dom.RowContext

public class RowContext
extends ShadingContext

Row formatting context (draft version). It contains row formatting properties and a vector of cell contexts.


Constructor Summary
RowContext()
          Construct a row formatting context.
 
Method Summary
 void addCell(CellContext cell)
          Add a new cell context to the internal vector of cells.
 BorderSet borders()
          Return the set of borders or null if borders are not specified.
 CellContext cell(int index)
          Return a context of cell of the specified zero-based index.
 int cellCount()
          Return a number of cell contexts in this row context.
 java.lang.Object clone()
          Create a deep copy of this context.
 Border defineBorder(int index)
          Define a new border of the specified index and return it.
 void defineInvisibleCellType(int index, int value)
          Define a type of the invisible cell of the specified index.
 void defineInvisibleCellWidth(int index, int value)
          Define a width of the invisible cell of the specified index.
 void definePadding(int index, int value)
          Define a padding value of the specified index.
 void definePagination(int index, boolean value)
          Define a row pagination flag value of the specified index.
 Position definePosition()
          Define an absolute position if it is not defined yet and return it.
 void defineSpacing(int index, int value)
          Define a cell spacing value of the specified index.
 boolean equals(java.lang.Object obj)
          Compare this context with another context and return true if contexts coinside.
 void exportTo(org.w3c.dom.Element elem)
          Export the contents of this object to the specified DOM element.
 int getAlignment()
          Return the current horizontal alignment of the table row.
 int getHalfGap()
          Return the half the space between the cells of a table row in twips.
 int getLeftEdge()
          Return the position of the leftmost edge of the table.
 int getRowHeight()
          Return the required height of the table row.
 InvisibleCells invisibleCells()
          Return the invisible cells or null if they are not specified.
 Padding padding()
          Return the default cell padding or null if it is not specified.
 RowPagination pagination()
          Return the row pagination or null if it is not specified.
 Position position()
          Return the absolute position or null if it is not specified.
 void reset()
          Restore the row formatting properties to defaults.
 void setAlignment(int value)
          Set a horizontal alignment, namely LEFT, RIGHT, or CENTER, for the table row (see HorizontalAlignment).
 void setHalfGap(int value)
          Set the half the space between the cells of a table row in twips.
 void setLeftEdge(int value)
          Set a position in twips of the leftmost edge of the table with respect to the left edge of its column.
 void setRowHeight(int value)
          Set a height of the table row in twips.
 CellSpacing spacing()
          Return the cell spacing or null if it is not specified.
 
Methods inherited from class ru.novosoft.dc.rtf.dom.ShadingContext
defineShadingBackground, defineShadingFill, defineShadingStyle, exportTo, shading
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowContext

public RowContext()
Construct a row formatting context.
Method Detail

cellCount

public final int cellCount()
Return a number of cell contexts in this row context.

addCell

public final void addCell(CellContext cell)
Add a new cell context to the internal vector of cells.

cell

public final CellContext cell(int index)
Return a context of cell of the specified zero-based index.

setAlignment

public final void setAlignment(int value)
Set a horizontal alignment, namely LEFT, RIGHT, or CENTER, for the table row (see HorizontalAlignment).

getAlignment

public final int getAlignment()
Return the current horizontal alignment of the table row.

definePosition

public final Position definePosition()
Define an absolute position if it is not defined yet and return it.

position

public final Position position()
Return the absolute position or null if it is not specified.

setLeftEdge

public final void setLeftEdge(int value)
Set a position in twips of the leftmost edge of the table with respect to the left edge of its column.

getLeftEdge

public final int getLeftEdge()
Return the position of the leftmost edge of the table.

setRowHeight

public final void setRowHeight(int value)
Set a height of the table row in twips. When 0, the height is sufficient for all the text in the line; when positive, the height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line.

getRowHeight

public final int getRowHeight()
Return the required height of the table row.

setHalfGap

public final void setHalfGap(int value)
Set the half the space between the cells of a table row in twips.

getHalfGap

public final int getHalfGap()
Return the half the space between the cells of a table row in twips.

defineBorder

public final Border defineBorder(int index)
Define a new border of the specified index and return it.

borders

public final BorderSet borders()
Return the set of borders or null if borders are not specified.

definePadding

public final void definePadding(int index,
                                int value)
Define a padding value of the specified index.

padding

public final Padding padding()
Return the default cell padding or null if it is not specified.

defineSpacing

public final void defineSpacing(int index,
                                int value)
Define a cell spacing value of the specified index.

spacing

public final CellSpacing spacing()
Return the cell spacing or null if it is not specified.

definePagination

public final void definePagination(int index,
                                   boolean value)
Define a row pagination flag value of the specified index.

pagination

public final RowPagination pagination()
Return the row pagination or null if it is not specified.

defineInvisibleCellWidth

public final void defineInvisibleCellWidth(int index,
                                           int value)
Define a width of the invisible cell of the specified index.

defineInvisibleCellType

public final void defineInvisibleCellType(int index,
                                          int value)
Define a type of the invisible cell of the specified index.

invisibleCells

public final InvisibleCells invisibleCells()
Return the invisible cells or null if they are not specified.

reset

public void reset()
Restore the row formatting properties to defaults.
Overrides:
reset in class ShadingContext

clone

public java.lang.Object clone()
Create a deep copy of this context.
Overrides:
clone in class ShadingContext

equals

public boolean equals(java.lang.Object obj)
Compare this context with another context and return true if contexts coinside.
Overrides:
equals in class ShadingContext

exportTo

public void exportTo(org.w3c.dom.Element elem)
Export the contents of this object to the specified DOM element.