com.aspose.slides
Class Table

java.lang.Object
  extended by com.aspose.slides.Shape
      extended by com.aspose.slides.GroupShape
          extended by com.aspose.slides.Table
All Implemented Interfaces:
IShape, IShapeFormat

public final class Table
extends GroupShape

Represents the table on a slide.


Method Summary
 void addColumn()
          Clones last column of a table and adds new column at the end of the table.
 void addRow()
          Clones last row of a table and adds new row at the end of the table.
 void deleteColumn(int column)
          Deletes column from a table.
 void deleteRow(int row)
          Deletes row from a table.
 Cell getCell(int column, int row)
          Returns the cell of a table.
 int getColumnsNumber()
          Returns number of columns in the table.
 int getColumnWidth(int column)
          Returns the width of the specified column in a table.
 int getMinimalRowHeight(int row)
          Returns user set row height.
 int getRotation()
          Returns the number of degrees the specified group is rotated around the z-axis.
 int getRowHeight(int row)
          Returns the height of the specified row in a table.
 int getRowsNumber()
          Returns number of rows in the table.
 boolean isFlipH()
          Determines whether the table is flipped horizontally.
 boolean isFlipV()
          Determines whether the table is flipped vertically.
 Cell mergeCells(Cell cell1, Cell cell2)
          Merges two cells or throws exception if cells can't be merged.
 void setBorders(float width, java.awt.Color color)
          Shows or hides all borders and sets width and color of all borders in a table.
 void setColumnWidth(int column, int width)
          Sets new width for the specified column in a table.
 void setFlipH(boolean value)
          Do nothing.
 void setFlipV(boolean value)
          Do nothing.
 void setRotation(int value)
          Sets the number of degrees the specified group is rotated around the z-axis.
 void setRowHeight(int row, int height)
          Sets new height for the specified row in a table.
 void splitCellH(Cell cell)
          Splits cell of a table horizontally on two parts.
 void splitCellV(Cell cell)
          Splits cell of a table vertically on two parts.
 
Methods inherited from class com.aspose.slides.GroupShape
addTextFrame, getAlternativeText, getFillFormat, getLineFormat, getShapes, setAlternativeText
 
Methods inherited from class com.aspose.slides.Shape
addLink, clearLink, createShapeElements, createShapeElements, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getHeight, getLink, getName, getParent, getPlaceholder, getShadowFormat, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, isHidden, isMasterTextHolder, isTextHolder, serialize, setHeight, setHidden, setName, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCell

public Cell getCell(int column,
                    int row)
Returns the cell of a table.

Parameters:
column -
row -
Returns:
Cell object or null if cell not found.

getColumnsNumber

public int getColumnsNumber()
Returns number of columns in the table.

Returns:
number of columns in the table.

getRowsNumber

public int getRowsNumber()
Returns number of rows in the table.

Returns:
number of rows in the table.

getRowHeight

public int getRowHeight(int row)
                 throws java.lang.IndexOutOfBoundsException
Returns the height of the specified row in a table. Note: returned value can differ from value, set by SetRowHeight method.

Parameters:
row - Row index.
Returns:
Row height.
Throws:
java.lang.IndexOutOfBoundsException

setRowHeight

public void setRowHeight(int row,
                         int height)
                  throws java.lang.IndexOutOfBoundsException
Sets new height for the specified row in a table. Note: real height of a row can differ from this value if text doesn't fit. Guaranteed that row's height won't be less than the specified value. To obtain value, previously set by this method, use GetMinimalRowHeight method.

Parameters:
row - Row index.
height - New row minimal height.
Throws:
java.lang.IndexOutOfBoundsException

getMinimalRowHeight

public int getMinimalRowHeight(int row)
Returns user set row height. Actual row height will be always greater or equal to this value and can differ if text doesn't fit to a cell.

Parameters:
row - Row index.
Returns:
Minimal height of the row.

getColumnWidth

public int getColumnWidth(int column)
                   throws java.lang.IndexOutOfBoundsException
Returns the width of the specified column in a table.

Parameters:
column - Column index.
Returns:
Column width.
Throws:
java.lang.IndexOutOfBoundsException

setColumnWidth

public void setColumnWidth(int column,
                           int width)
                    throws java.lang.IndexOutOfBoundsException
Sets new width for the specified column in a table.

Parameters:
column - Column index.
width - New column width.
Throws:
java.lang.IndexOutOfBoundsException

addRow

public void addRow()
            throws PptEditException
Clones last row of a table and adds new row at the end of the table.

Throws:
PptEditException

addColumn

public void addColumn()
               throws PptEditException
Clones last column of a table and adds new column at the end of the table.

Throws:
PptEditException

deleteRow

public void deleteRow(int row)
               throws java.lang.IndexOutOfBoundsException
Deletes row from a table.

Parameters:
row - the index of a row to delete.
Throws:
java.lang.IndexOutOfBoundsException

deleteColumn

public void deleteColumn(int column)
                  throws java.lang.IndexOutOfBoundsException
Deletes column from a table.

Parameters:
column - the index of a column to delete.
Throws:
java.lang.IndexOutOfBoundsException

mergeCells

public Cell mergeCells(Cell cell1,
                       Cell cell2)
                throws PptEditException
Merges two cells or throws exception if cells can't be merged.

Parameters:
cell1 - First cell to merge.
cell2 - Second cell to merge.
Returns:
Merged cell.
Throws:
PptEditException

splitCellH

public void splitCellH(Cell cell)
                throws PptEditException
Splits cell of a table horizontally on two parts.

Parameters:
cell - Cell to split.
Throws:
PptEditException

splitCellV

public void splitCellV(Cell cell)
                throws PptEditException
Splits cell of a table vertically on two parts.

Parameters:
cell - Cell to split.
Throws:
PptEditException

getRotation

public int getRotation()
Returns the number of degrees the specified group is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation.

Overrides:
getRotation in class GroupShape
Returns:
the number of degrees the specified group is rotated around the z-axis.

setRotation

public void setRotation(int value)
                 throws PptEditException
Sets the number of degrees the specified group is rotated around the z-axis. A positive value indicates clockwise rotation; a negative value indicates counterclockwise rotation.

Overrides:
setRotation in class GroupShape
Parameters:
value - the number of degrees the specified group is rotated around the z-axis.
Throws:
PptEditException

isFlipH

public boolean isFlipH()
Determines whether the table is flipped horizontally.

Overrides:
isFlipH in class GroupShape
Returns:
true if the table is flipped horizontally.

setFlipH

public void setFlipH(boolean value)
Do nothing.

Overrides:
setFlipH in class GroupShape
Parameters:
value -
Throws:
PptEditException

isFlipV

public boolean isFlipV()
Determines whether the table is flipped vertically.

Overrides:
isFlipV in class GroupShape
Returns:
true if the table is flipped vertically.

setFlipV

public void setFlipV(boolean value)
Do nothing.

Overrides:
setFlipV in class GroupShape
Parameters:
value -
Throws:
PptEditException

setBorders

public void setBorders(float width,
                       java.awt.Color color)
Shows or hides all borders and sets width and color of all borders in a table.

Parameters:
width - New width of all borders in a table. 0 to hide borders.
color - New color of all borders in a table.