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

public class Table
extends GroupShape

Represents a 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 columnIndex)
           Deletes column from a table.
 void deleteRow(int rowIndex)
           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.
 boolean getFlipHorizontal()
           <b>True</b> if a group was flipped horizontally.
 boolean getFlipVertical()
           <b>True</b> if a group was flipped vertically.
 int getMinimalRowHeight(int row)
           Returns user set row height.
 int getRotation()
           Returns or sets 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.
 Cell mergeCells(Cell cell1, Cell cell2)
           Merges two cells or throws exception if cells can't be merged.
 void setBorders(double width, java.awt.Color color)
           
 void setColumnWidth(int column, int width)
           Sets new width for the specified column in a table.
 void setFlipHorizontal(boolean value)
           
 void setFlipVertical(boolean value)
           
 void setRotation(int value)
           
 void setRowHeight(int row, int height)
           Sets new height for the specified row in a table.
 
Methods inherited from class com.aspose.slides.GroupShape
addTextFrame, getAlternativeText, getFillFormat, getHidden, getLineFormat, getMasterShapeId, getName, getProtection, getShapeId, getShapes, setAlternativeText, setHidden, setName, setProtection
 
Methods inherited from class com.aspose.slides.Shape
addLink, clearLink, createShapeElements, createShapeElements, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getFlipH, getFlipV, getHeight, getLink, getParent, getParentSlide, getPlaceholder, getShadowFormat, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isMasterTextHolder, isTextHolder, serialize, setFlipH, setFlipV, setHeight, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColumnsNumber

public int getColumnsNumber()

Returns number of columns in the table. Read-only int.


getRowsNumber

public int getRowsNumber()

Returns number of rows in the table. Read-only int.


getCell

public Cell getCell(int column,
                    int row)

Returns the cell of a table.

Parameters:
column - column
row - row
Returns:
Cell object or <b>null</b> if cell not found.

getRowHeight

public int getRowHeight(int row)

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.

setRowHeight

public void setRowHeight(int row,
                         int height)

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.

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)

Returns the width of the specified column in a table.

Parameters:
column - Column index.
Returns:
Column width.

setColumnWidth

public void setColumnWidth(int column,
                           int width)

Sets new width for the specified column in a table.

Parameters:
column - Column index.
width - New column width.

addRow

public void addRow()

Clones last row of a table and adds new row at the end of the table.


addColumn

public void addColumn()

Clones last column of a table and adds new column at the end of the table.


deleteRow

public void deleteRow(int rowIndex)

Deletes row from a table.

Parameters:
rowIndex - Index of a row to delete.

deleteColumn

public void deleteColumn(int columnIndex)

Deletes column from a table.

Parameters:
columnIndex - Index of a column to delete.

mergeCells

public Cell mergeCells(Cell cell1,
                       Cell cell2)

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.

getRotation

public int getRotation()

Returns or 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. Read/write int.

Overrides:
getRotation in class GroupShape

setRotation

public void setRotation(int value)
Overrides:
setRotation in class GroupShape

getFlipHorizontal

public boolean getFlipHorizontal()

<b>True</b> if a group was flipped horizontally. Read/write bool.

Overrides:
getFlipHorizontal in class GroupShape

setFlipHorizontal

public void setFlipHorizontal(boolean value)
Overrides:
setFlipHorizontal in class GroupShape

getFlipVertical

public boolean getFlipVertical()

<b>True</b> if a group was flipped vertically. Read/write bool.

Overrides:
getFlipVertical in class GroupShape

setFlipVertical

public void setFlipVertical(boolean value)
Overrides:
setFlipVertical in class GroupShape

setBorders

public void setBorders(double width,
                       java.awt.Color color)