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 class Table
extends GroupShape

Represents the table on a slide.


Field Summary
 java.util.TreeMap m_bordersH
           
 java.util.TreeMap m_bordersV
           
 
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.
 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 isFlipHorizontal()
          Determines whether the group is flipped horizontally.
 boolean isFlipVertical()
          Determines whether the group 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 setFlipHorizontal(boolean value)
          Flips the group horizontally.
 void setFlipVertical(boolean value)
          Flips the group vertically.
 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.
 
Methods inherited from class com.aspose.slides.GroupShape
addTextFrame, getAlternativeText, getFillFormat, getLineFormat, getMasterShapeId, getName, getShapeId, getShapes, setAlternativeText, setName
 
Methods inherited from class com.aspose.slides.Shape
addLink, clearLink, createShapeElements, createShapeElements, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getHeight, getLink, getParent, getPlaceholder, getProtection, getShadowFormat, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isHidden, isMasterTextHolder, isTextHolder, serialize, setHeight, setHidden, setProtection, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_bordersH

public java.util.TreeMap m_bordersH

m_bordersV

public java.util.TreeMap m_bordersV
Method Detail

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.

getCell

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

Parameters:
column - Column index.
row - Row index.
Returns:
Cell object or null 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:
the height of the specified row in a table.

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()
            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 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)
                throws PptException
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:
PptException

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:
number of degrees the specified group is rotated around the z-axis.

setRotation

public void setRotation(int value)
Description copied from class: GroupShape
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 - new rotation angle.

isFlipHorizontal

public boolean isFlipHorizontal()
Description copied from class: GroupShape
Determines whether the group is flipped horizontally.

Overrides:
isFlipHorizontal in class GroupShape
Returns:
true if the group is flipped horizontally.

setFlipHorizontal

public void setFlipHorizontal(boolean value)
Description copied from class: GroupShape
Flips the group horizontally.

Overrides:
setFlipHorizontal in class GroupShape
Parameters:
value - true to flip the group horizontally.

isFlipVertical

public boolean isFlipVertical()
Description copied from class: GroupShape
Determines whether the group is flipped vertically.

Overrides:
isFlipVertical in class GroupShape
Returns:
true if the group is flipped vertically.

setFlipVertical

public void setFlipVertical(boolean value)
Description copied from class: GroupShape
Flips the group vertically.

Overrides:
setFlipVertical in class GroupShape
Parameters:
value - true to flip the group vertically.

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.