Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Wiki  API  Corporate

com.aspose.powerpoint
Class Table

java.lang.Object
  extended by com.aspose.powerpoint.Shape
      extended by com.aspose.powerpoint.GroupShape
          extended by com.aspose.powerpoint.Table

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 getHeight()
          Returns the height of a table.
 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.
 int getWidth()
          Returns or sets the width of a table.
 int getX()
          Returns the x-coordinate of the upper-left corner of the shape.
 int getY()
          Returns the y-coordinate of the upper-left corner of the shape.
 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 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 setHeight(int value)
          Sets the height of a table.
 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 setWidth(int value)
          Sets the width of a table.
 void setX(int value)
          Sets the x-coordinate of the upper-left corner of the shape.
 void setY(int value)
          Sets the y-coordinate of the upper-left corner of the shape.
 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.powerpoint.GroupShape
addTextFrame, getAlternativeText, getFillFormat, getLineFormat, getShapes, setAlternativeText
 
Methods inherited from class com.aspose.powerpoint.Shape
addLink, clearLink, getAnimationSettings, getLink, getParent, getTags, getTextFrame, getZOrderPosition, isTextHolder, 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.

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.

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

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,
                       AsposeLicenseException
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
AsposeLicenseException

splitCellH

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

Parameters:
cell - Cell to split.
Throws:
PptEditException
AsposeLicenseException

splitCellV

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

Parameters:
cell - Cell to split.
Throws:
PptEditException
AsposeLicenseException

getX

public int getX()
Returns the x-coordinate of the upper-left corner of the shape.

Overrides:
getX in class Shape
Returns:
the x-coordinate of the upper-left corner of the shape.

setX

public void setX(int value)
Sets the x-coordinate of the upper-left corner of the shape.

Overrides:
setX in class Shape
Parameters:
value - the x-coordinate of the upper-left corner of the shape.

getY

public int getY()
Returns the y-coordinate of the upper-left corner of the shape.

Overrides:
getY in class Shape
Returns:
the y-coordinate of the upper-left corner of the shape.

setY

public void setY(int value)
Sets the y-coordinate of the upper-left corner of the shape.

Overrides:
setY in class Shape
Parameters:
value - the y-coordinate of the upper-left corner of the shape.

getWidth

public int getWidth()
Returns or sets the width of a table.

Overrides:
getWidth in class Shape
Returns:
the width of a table.

setWidth

public void setWidth(int value)
Sets the width of a table.

Overrides:
setWidth in class Shape
Parameters:
value - the width of a table.

getHeight

public int getHeight()
Returns the height of a table.

Overrides:
getHeight in class Shape
Returns:
the height of a table.

setHeight

public void setHeight(int value)
Sets the height of a table.

Overrides:
setHeight in class Shape
Parameters:
value - the height of a table.

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)
              throws PptEditException
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)
              throws PptEditException
Do nothing.

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