Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.client.wm
Class TableUIDataSourceImpl

`java.lang.Object
oracle.jbo.client.wm.TableUIDataSourceImpl`

All Implemented Interfaces:
  TableUIDataSource, TwoDDataSource

public class TableUIDataSourceImpl
extends java.lang.Object
implements TableUIDataSource

Use this class to store values to be displayed in a table. Use the setter methods to specify data values and display attributes. The getter methods will be called by the table rendering routines.

Field Summary
`protected oracle.jbo.client.wm.Column[]` | `columns`
`protected int` | `indexOfFirstVisibleRow`
`protected java.util.Vector` | `rows`

Fields inherited from interface oracle.jbo.client.wm.TableUIDataSource
`ALIGN_AUTOMATIC, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, LAYOUT_HORIZONTAL, LAYOUT_VERTICAL, TYPE_BUTTON, TYPE_FORMVALUE, TYPE_IMAGE, TYPE_IMAGELINK, TYPE_LINK, TYPE_MULTIVALUE, TYPE_NUMBER_LINK`

Fields inherited from interface oracle.jbo.client.wm.TwoDDataSource
`NOT_SORTABLE, NOT_SORTED, SORTED_ASCENDING, SORTED_DESCENDING, TYPE_BOOLEAN, TYPE_DATE, TYPE_ENUM, TYPE_NUMBER, TYPE_TEXT`

Constructor Summary
`TableUIDataSourceImpl(int[] columnTypes)` Constructor declaration

Method Summary
`void` | `addRows(int howMany)` This method must be called before you can set cell values.
`protected oracle.jbo.client.wm.Cell[]` | `createRow()` Method declaration
`int` | `getColumnAlignment(int columnIndex)` Method declaration
`int` | `getColumnCount()` Method declaration
`java.lang.String[]` | `getColumnNames()` Method declaration
`int` | `getColumnSortingStatus(int columnIndex)` Method declaration
`int` | `getColumnType(int columnIndex)` Method declaration
`java.lang.Object` | `getDataAt(int rowIndex, int columnIndex)` Method declaration
`java.lang.Object` | `getDataAt(int rowIndex, int columnIndex, int itemIndex)` Method declaration
`java.text.DateFormat` | `getDateFormat(int columnIndex)` Method declaration
`java.lang.String[]` | `getEnumValues(int columnIndex)` Method declaration
`java.lang.String` | `getFormValueName(int columnIndex)` Method declaration
`java.lang.String` | `getImageAt(int rowIndex, int columnIndex)` Method declaration
`java.lang.String` | `getImageAt(int rowIndex, int columnIndex, int itemIndex)` Method declaration
`java.lang.String` | `getImageHeightAt(int rowIndex, int columnIndex)` Method declaration
`java.lang.String` | `getImageHeightAt(int rowIndex, int columnIndex, int itemIndex)` Method declaration
`java.lang.String` | `getImageWidthAt(int rowIndex, int columnIndex)` Method declaration
`java.lang.String` | `getImageWidthAt(int rowIndex, int columnIndex, int itemIndex)` Method declaration
`int` | `getIndexOfFirstVisibleRow()` Method declaration
`int` | `getItemCount(int columnIndex)` Method declaration
`int` | `getItemLayout(int columnIndex)` Method declaration
`int` | `getItemSpacing(int columnIndex)` Method declaration
`int` | `getItemType(int columnIndex, int itemIndex)` Method declaration
`int` | `getMaximumLength(int columnIndex)` Method declaration
`int` | `getRowCount()` Method declaration
`java.lang.String` | `getUrlAt(int rowIndex, int columnIndex)` Method declaration
`java.lang.String` | `getUrlAt(int rowIndex, int columnIndex, int itemIndex)` Method declaration
`void` | `insertRowAt(int index)` Method declaration
`boolean` | `isColumnHidden(int columnIndex)` Method declaration
`boolean` | `isReadOnly(int rowIndex, int columnIndex)` Method declaration
`void` | `moveRow(int oldIndex, int newIndex)` Method declaration
`void` | `removeAllRows()` Method declaration
`void` | `removeRowAt(int index)` Method declaration
`void` | `setColumnAlignment(int columnIndex, int alignment)` Call this method to override default alignment.
`void` | `setColumnHidden(int columnIndex, boolean hidden)` Call this method to hide a column.
`void` | `setColumnName(int columnIndex, java.lang.String columnName)` Note: if none of the column names are set then the table header will not be rendered.
`void` | `setColumnNames(java.lang.String[] columnNames)` Method declaration
`void` | `setColumnSortingStatus(int columnIndex, int sortingStatus)`
`void` | `setComparator(int columnIndex, java.util.Comparator comparator)`
`void` | `setDataAt(int rowIndex, int columnIndex, java.lang.Object data)`
`void` | `setDataAt(java.lang.Object data, int rowIndex, int columnIndex, int itemIndex)` For TYPE_MULTIVALUE columns, specify the item value.
`void` | `setDateFormat(int columnIndex, java.text.DateFormat dateFormat)` Method declaration
`void` | `setEnumValues(int columnIndex, java.lang.String[] enumValues)` For TYPE_ENUM columns, specify the list of possible values.
`void` | `setFormValueName(int columnIndex, java.lang.String formValueName)`
`void` | `setImageAt(java.lang.String image, int rowIndex, int columnIndex)` For TYPE_IMAGE cells, specify the image.
`void` | `setImageAt(java.lang.String image, int rowIndex, int columnIndex, int itemIndex)` For TYPE_MULTIVALUE columns, specify the item image source.
`void` | `setImageHeightAt(java.lang.String imageHeight, int rowIndex, int columnIndex)` For TYPE_IMAGE cells, specify the image height.
`void` | `setImageHeightAt(java.lang.String imageHeight, int rowIndex, int columnIndex, int itemIndex)` For TYPE_MULTIVALUE columns, specify the item image height.
`void` | `setImageWidthAt(java.lang.String imageWidth, int rowIndex, int columnIndex)` For TYPE_IMAGE cells, specify the image width.
`void` | `setImageWidthAt(java.lang.String imageWidth, int rowIndex, int columnIndex, int itemIndex)` For TYPE_MULTIVALUE columns, specify the item image width.
`void` | `setIndexOfFirstVisibleRow(int index)` Method declaration
`void` | `setItemCount(int columnIndex, int count)` For TYPE_MULTIVALUE columns, specify the number of items.
`void` | `setItemLayout(int columnIndex, int layout)` For TYPE_MULTIVALUE columns, should items be laid out horizontally or vertically?
`void` | `setItemSpacing(int columnIndex, int spacing)` For TYPE_MULTIVALUE columns specify the gap between items.
`void` | `setItemType(int columnIndex, int itemIndex, int itemType)` For TYPE_MULTIVALUE columns, specify the item type.
`void` | `setMaximumLength(int columnIndex, int maximumLength)` For TYPE_TEXT columns, specify the maximum length of text.
`void` | `setReadOnly(int rowIndex, int columnIndex, boolean readOnly)`
`void` | `setUrlAt(java.lang.String url, int rowIndex, int columnIndex)` For TYPE_LINK cells, specify the URL.
`void` | `setUrlAt(java.lang.String url, int rowIndex, int columnIndex, int itemIndex)` For TYPE_LINK columns, specify the URL.
`void` | `sort(int columnIndex, boolean ascending)` This method will be called by the controller.

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

Field Detail

### rows

    protected java.util.Vector rows

### columns

    protected oracle.jbo.client.wm.Column[] columns

### indexOfFirstVisibleRow

    protected int indexOfFirstVisibleRow

Constructor Detail

### TableUIDataSourceImpl

    public TableUIDataSourceImpl(int[] columnTypes)

  Constructor declaration
Parameters:
  `columnTypes` -

Method Detail

### getColumnCount

    public int getColumnCount()

  Method declaration
  Specified by:
    `getColumnCount` in interface `TwoDDataSource`
  Returns:
    column count

### getColumnType

    public int getColumnType(int columnIndex)

  Method declaration
  Specified by:
    `getColumnType` in interface `TwoDDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    column type

### setColumnName

    public void setColumnName(int columnIndex,
                              java.lang.String columnName)

  Note: if none of the column names are set then the table header will not be rendered.

### setColumnNames

    public void setColumnNames(java.lang.String[] columnNames)

  Method declaration
  Parameters:
    `columnNames` -

### getColumnNames

    public java.lang.String[] getColumnNames()

  Method declaration
  Specified by:
    `getColumnNames` in interface `TwoDDataSource`
  Returns:
    array of column names

### setComparator

    public void setComparator(int columnIndex,
                              java.util.Comparator comparator)

  Parameters:
    `comparator` - comparator to use to sort on specified column. If comparator is not set then sorting will not work.

### setColumnSortingStatus

    public void setColumnSortingStatus(int columnIndex,
                                       int sortingStatus)

  Parameters:
    `sortingStatus` - to enable sorting for a column, set sortingStatus to NOT_SORTED.

### getColumnSortingStatus

    public int getColumnSortingStatus(int columnIndex)

  Method declaration
  Specified by:
    `getColumnSortingStatus` in interface `TwoDDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    column sorting status

### getRowCount

    public int getRowCount()

  Method declaration
  Specified by:
    `getRowCount` in interface `TwoDDataSource`
  Returns:
    row count

### setDataAt

    public void setDataAt(int rowIndex,
                          int columnIndex,
                          java.lang.Object data)

  Specified by:
    `setDataAt` in interface `TwoDDataSource`
  Parameters:
    `data` - value of specified cell.

### getDataAt

    public java.lang.Object getDataAt(int rowIndex,
                                      int columnIndex)

  Method declaration
  Specified by:
    `getDataAt` in interface `TwoDDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
  Returns:
    the data at the given position

### setReadOnly

    public void setReadOnly(int rowIndex,
                            int columnIndex,
                            boolean readOnly)

  Parameters:
    `readOnly` - set readOnly = false in order to display edit field, choice etc instead of static text.

### isReadOnly

    public boolean isReadOnly(int rowIndex,
                              int columnIndex)

  Method declaration
  Specified by:
    `isReadOnly` in interface `TwoDDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
  Returns:
    true if the cell at the given position is read-only

### createRow

    protected oracle.jbo.client.wm.Cell[] createRow()

  Method declaration
  Returns:
    an array of cells representing an empty row

### addRows

    public void addRows(int howMany)

  This method must be called before you can set cell values.
  Specified by:
    `addRows` in interface `TwoDDataSource`

### insertRowAt

    public void insertRowAt(int index)

  Method declaration
  Specified by:
    `insertRowAt` in interface `TwoDDataSource`
  Parameters:
    `index` -

### removeRowAt

    public void removeRowAt(int index)

  Method declaration
  Specified by:
    `removeRowAt` in interface `TwoDDataSource`
  Parameters:
    `index` -

### removeAllRows

    public void removeAllRows()

  Method declaration
  Specified by:
    `removeAllRows` in interface `TwoDDataSource`

### moveRow

    public void moveRow(int oldIndex,
                        int newIndex)

  Method declaration
  Specified by:
    `moveRow` in interface `TwoDDataSource`
  Parameters:
    `oldIndex` -
    `newIndex` -

### sort

    public void sort(int columnIndex,
                     boolean ascending)

  This method will be called by the controller.
  Specified by:
    `sort` in interface `TwoDDataSource`

### setMaximumLength

    public void setMaximumLength(int columnIndex,
                                 int maximumLength)

  For TYPE_TEXT columns, specify the maximum length of text.

### getMaximumLength

    public int getMaximumLength(int columnIndex)

  Method declaration
  Specified by:
    `getMaximumLength` in interface `TwoDDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    maximum length

### setDateFormat

    public void setDateFormat(int columnIndex,
                              java.text.DateFormat dateFormat)

  Method declaration
  Parameters:
    `columnIndex` -
    `dateFormat` -

### getDateFormat

    public java.text.DateFormat getDateFormat(int columnIndex)

  Method declaration
  Specified by:
    `getDateFormat` in interface `TwoDDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    date format

### setEnumValues

    public void setEnumValues(int columnIndex,
                              java.lang.String[] enumValues)

  For TYPE_ENUM columns, specify the list of possible values.

### getEnumValues

    public java.lang.String[] getEnumValues(int columnIndex)

  Method declaration
  Specified by:
    `getEnumValues` in interface `TwoDDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    enum values

### setColumnAlignment

    public void setColumnAlignment(int columnIndex,
                                   int alignment)

  Call this method to override default alignment.

### getColumnAlignment

    public int getColumnAlignment(int columnIndex)

  Method declaration
  Specified by:
    `getColumnAlignment` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    column alignment

### setUrlAt

    public void setUrlAt(java.lang.String url,
                         int rowIndex,
                         int columnIndex)

  For TYPE_LINK cells, specify the URL.

### getUrlAt

    public java.lang.String getUrlAt(int rowIndex,
                                     int columnIndex)

  Method declaration
  Specified by:
    `getUrlAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
  Returns:
    url

### setImageAt

    public void setImageAt(java.lang.String image,
                           int rowIndex,
                           int columnIndex)

  For TYPE_IMAGE cells, specify the image.

### getImageAt

    public java.lang.String getImageAt(int rowIndex,
                                       int columnIndex)

  Method declaration
  Specified by:
    `getImageAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
  Returns:
    image

### setImageWidthAt

    public void setImageWidthAt(java.lang.String imageWidth,
                                int rowIndex,
                                int columnIndex)

  For TYPE_IMAGE cells, specify the image width.

### getImageWidthAt

    public java.lang.String getImageWidthAt(int rowIndex,
                                            int columnIndex)

  Method declaration
  Specified by:
    `getImageWidthAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
  Returns:
    image width

### setImageHeightAt

    public void setImageHeightAt(java.lang.String imageHeight,
                                 int rowIndex,
                                 int columnIndex)

  For TYPE_IMAGE cells, specify the image height.

### getImageHeightAt

    public java.lang.String getImageHeightAt(int rowIndex,
                                             int columnIndex)

  Method declaration
  Specified by:
    `getImageHeightAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
  Returns:
    image height

### getIndexOfFirstVisibleRow

    public int getIndexOfFirstVisibleRow()

  Method declaration
  Specified by:
    `getIndexOfFirstVisibleRow` in interface `TableUIDataSource`
  Returns:
    index of first visible row

### setIndexOfFirstVisibleRow

    public void setIndexOfFirstVisibleRow(int index)

  Description copied from interface: `TableUIDataSource`
  Method declaration
  Specified by:
    `setIndexOfFirstVisibleRow` in interface `TableUIDataSource`
  Parameters:
    `index` - to enable table navigation set index to 0.

### setFormValueName

    public void setFormValueName(int columnIndex,
                                 java.lang.String formValueName)

  Parameters:
    `formValueName` - name attribute of formValue

### getFormValueName

    public java.lang.String getFormValueName(int columnIndex)

  Method declaration
  Specified by:
    `getFormValueName` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    form value name

### setColumnHidden

    public void setColumnHidden(int columnIndex,
                                boolean hidden)

  Call this method to hide a column.

### isColumnHidden

    public boolean isColumnHidden(int columnIndex)

  Method declaration
  Specified by:
    `isColumnHidden` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    true if the column is hidden

### setItemCount

    public void setItemCount(int columnIndex,
                             int count)

  For TYPE_MULTIVALUE columns, specify the number of items.

### getItemCount

    public int getItemCount(int columnIndex)

  Method declaration
  Specified by:
    `getItemCount` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    item count

### setItemLayout

    public void setItemLayout(int columnIndex,
                              int layout)

  For TYPE_MULTIVALUE columns, should items be laid out horizontally or vertically?

### getItemLayout

    public int getItemLayout(int columnIndex)

  Method declaration
  Specified by:
    `getItemLayout` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    item layout

### setItemSpacing

    public void setItemSpacing(int columnIndex,
                               int spacing)

  For TYPE_MULTIVALUE columns specify the gap between items.

### getItemSpacing

    public int getItemSpacing(int columnIndex)

  Method declaration
  Specified by:
    `getItemSpacing` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
  Returns:
    item spacing

### setItemType

    public void setItemType(int columnIndex,
                            int itemIndex,
                            int itemType)

  For TYPE_MULTIVALUE columns, specify the item type.

### getItemType

    public int getItemType(int columnIndex,
                           int itemIndex)

  Method declaration
  Specified by:
    `getItemType` in interface `TableUIDataSource`
  Parameters:
    `columnIndex` -
    `itemIndex` -
  Returns:
    item type

### setDataAt

    public void setDataAt(java.lang.Object data,
                          int rowIndex,
                          int columnIndex,
                          int itemIndex)

  For TYPE_MULTIVALUE columns, specify the item value.

### getDataAt

    public java.lang.Object getDataAt(int rowIndex,
                                      int columnIndex,
                                      int itemIndex)

  Method declaration
  Specified by:
    `getDataAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
    `itemIndex` -
  Returns:
    data at the given position

### setImageAt

    public void setImageAt(java.lang.String image,
                           int rowIndex,
                           int columnIndex,
                           int itemIndex)

  For TYPE_MULTIVALUE columns, specify the item image source.

### getImageAt

    public java.lang.String getImageAt(int rowIndex,
                                       int columnIndex,
                                       int itemIndex)

  Method declaration
  Specified by:
    `getImageAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
    `itemIndex` -
  Returns:
    image

### setImageWidthAt

    public void setImageWidthAt(java.lang.String imageWidth,
                                int rowIndex,
                                int columnIndex,
                                int itemIndex)

  For TYPE_MULTIVALUE columns, specify the item image width.

### getImageWidthAt

    public java.lang.String getImageWidthAt(int rowIndex,
                                            int columnIndex,
                                            int itemIndex)

  Method declaration
  Specified by:
    `getImageWidthAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
    `itemIndex` -
  Returns:
    image width

### setImageHeightAt

    public void setImageHeightAt(java.lang.String imageHeight,
                                 int rowIndex,
                                 int columnIndex,
                                 int itemIndex)

  For TYPE_MULTIVALUE columns, specify the item image height.

### getImageHeightAt

    public java.lang.String getImageHeightAt(int rowIndex,
                                             int columnIndex,
                                             int itemIndex)

  Method declaration
  Specified by:
    `getImageHeightAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
    `itemIndex` -
  Returns:
    image height

### setUrlAt

    public void setUrlAt(java.lang.String url,
                         int rowIndex,
                         int columnIndex,
                         int itemIndex)

  For TYPE_LINK columns, specify the URL.

### getUrlAt

    public java.lang.String getUrlAt(int rowIndex,
                                     int columnIndex,
                                     int itemIndex)

  Method declaration
  Specified by:
    `getUrlAt` in interface `TableUIDataSource`
  Parameters:
    `rowIndex` -
    `columnIndex` -
    `itemIndex` -
  Returns:
    url

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.