Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hslf.model
Class Table

    java.lang.Object
      org.apache.poi.hslf.model.Shape
          org.apache.poi.hslf.model.ShapeGroup
              org.apache.poi.hslf.model.Table

    public final class Table

extends ShapeGroup

Represents a table in a PowerPoint presentation

Author:
  Yegor Kozlov

Field Summary
`protected static int` | `BORDER_BOTTOM`
`protected static int` | `BORDER_LEFT`
`protected static int` | `BORDER_RIGHT`
`protected static int` | `BORDER_TOP`
`protected static int` | `BORDERS_ALL`
`protected static int` | `BORDERS_INSIDE`
`protected static int` | `BORDERS_NONE`
`protected static int` | `BORDERS_OUTSIDE`
`protected TableCell[][]` | `cells`

Fields inherited from class org.apache.poi.hslf.model.Shape
`_escherContainer, _fill, _parent, _sheet, EMU_PER_CENTIMETER, EMU_PER_INCH, EMU_PER_POINT, logger, MASTER_DPI, PIXEL_DPI, POINT_DPI`

Constructor Summary
`Table(EscherContainerRecord escherRecord, Shape parent)` Create a Table object and initilize it from the supplied Record container.
`Table(int numrows, int numcols)` Create a new Table of the given number of rows and columns

Method Summary
`protected void` | `afterInsert(Sheet sh)` Event which fires when a shape is inserted in the sheet.
`Line` | `createBorder()` Create a border to format this table
`TableCell` | `getCell(int row, int col)` Gets a cell
`int` | `getNumberOfColumns()`
`int` | `getNumberOfRows()`
`protected void` | `initTable()`
`void` | `setAllBorders(Line line)` Format the table and apply the specified Line to all cell boundaries, both outside and inside
`void` | `setColumnWidth(int col, int width)` Sets the column width.
`void` | `setInsideBorders(Line line)` Format the inside border using the specified Line object
`void` | `setOutsideBorders(Line line)` Format the outside border using the specified Line object
`void` | `setRowHeight(int row, int height)` Sets the row height.
`void` | `setSheet(Sheet sheet)` Assign the `SlideShow` this shape belongs to

Methods inherited from class org.apache.poi.hslf.model.ShapeGroup
`addShape, createSpContainer, draw, getAnchor2D, getCoordinates, getHyperlink, getShapes, getShapeType, moveTo, setAnchor, setCoordinates`

Methods inherited from class org.apache.poi.hslf.model.Shape
`getAnchor, getColor, getEscherChild, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getLogicalAnchor2D, getOutline, getParent, getShapeId, getShapeName, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setShapeId, setShapeType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BORDER_TOP

    protected static final int BORDER_TOP

See Also:
  Constant Field Values

### BORDER_RIGHT

    protected static final int BORDER_RIGHT

See Also:
  Constant Field Values

### BORDER_BOTTOM

    protected static final int BORDER_BOTTOM

See Also:
  Constant Field Values

### BORDER_LEFT

    protected static final int BORDER_LEFT

See Also:
  Constant Field Values

### BORDERS_ALL

    protected static final int BORDERS_ALL

See Also:
  Constant Field Values

### BORDERS_OUTSIDE

    protected static final int BORDERS_OUTSIDE

See Also:
  Constant Field Values

### BORDERS_INSIDE

    protected static final int BORDERS_INSIDE

See Also:
  Constant Field Values

### BORDERS_NONE

    protected static final int BORDERS_NONE

See Also:
  Constant Field Values

### cells

    protected TableCell[][] cells

Constructor Detail

### Table

    public Table(int numrows,
                 int numcols)

  Create a new Table of the given number of rows and columns

  Parameters:
    `numrows` - the number of rows
    `numcols` - the number of columns

### Table

    public Table(EscherContainerRecord escherRecord,
                 Shape parent)

  Create a Table object and initilize it from the supplied Record container.

  Parameters:
    `escherRecord` - `EscherSpContainer` container which holds information about this shape
    `parent` - the parent of the shape

Method Detail

### getCell

    public TableCell getCell(int row,
                             int col)

  Gets a cell

  Parameters:
    `row` - the row index (0-based)
    `col` - the column index (0-based)
  Returns:
    the cell

### getNumberOfColumns

    public int getNumberOfColumns()

### getNumberOfRows

    public int getNumberOfRows()

### afterInsert

    protected void afterInsert(Sheet sh)

  Description copied from class: `Shape`
  Event which fires when a shape is inserted in the sheet. In some cases we need to propagate changes to upper level containers.
  Default implementation does nothing.

  Overrides:
    `afterInsert` in class `Shape`
  Parameters:
    `sh` - - owning shape

### initTable

    protected void initTable()

### setSheet

    public void setSheet(Sheet sheet)

  Assign the `SlideShow` this shape belongs to

  Overrides:
    `setSheet` in class `Shape`
  Parameters:
    `sheet` - owner of this shape

### setRowHeight

    public void setRowHeight(int row,
                             int height)

  Sets the row height.

  Parameters:
    `row` - the row index (0-based)
    `height` - the height to set (in pixels)

### setColumnWidth

    public void setColumnWidth(int col,
                               int width)

  Sets the column width.

  Parameters:
    `col` - the column index (0-based)
    `width` - the width to set (in pixels)

### setAllBorders

    public void setAllBorders(Line line)

  Format the table and apply the specified Line to all cell boundaries, both outside and inside

  Parameters:
    `line` - the border line

### setOutsideBorders

    public void setOutsideBorders(Line line)

  Format the outside border using the specified Line object

  Parameters:
    `line` - the border line

### setInsideBorders

    public void setInsideBorders(Line line)

  Format the inside border using the specified Line object

  Parameters:
    `line` - the border line

### createBorder

    public Line createBorder()

  Create a border to format this table

  Returns:
    the created border

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2010 The Apache Software Foundation or its licensors, as applicable.