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

## echopointng
Class LiveTable

    java.lang.Object
      nextapp.echo2.app.Component
          nextapp.echo2.app.Table
              echopointng.LiveTable

All Implemented Interfaces:
  Attributeable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Scrollable, Sizeable, ToolTipable, Widthable, java.io.Serializable, RenderIdSupport

    public class LiveTable

extends Table
implements Sizeable, Scrollable, Borderable, Insetable, MouseCursorable, ToolTipable, Attributeable

THIS CLASS IS CURRENTLY EXPIRMENTAL AND HENCE IT AND ALL ASSOCIATED CLASS AND INTERFACES SHOULD BE CONSIDERED NOT IN THEIR FINAL form

`LiveTable` is a specialised form of Table that provides support for only loading "some of the data" in a large TableModel. It does this by dividing the TableModel rows into a series of "virtual pages" which can be asked for at any time. `LiveTable` assumes that the height of each row is the same. This allows it to know what rows have been scrolled into the viewport and hence what rows to ask for from the TableModel dynamically. It is therefore impertive that the rowHeight property have a value in order for the LiveTable to scroll correctly.

See Also:
  Serialized Form

Field Summary
`static Style` | `DEFAULT_STYLE` This DEFAULT_STYLE is applied to the LiveTable to give it a series of borders and background colors
`static java.lang.String` | `PROPERTY_PAGE_FETCH_SIZE`
`static java.lang.String` | `PROPERTY_RENDERER`
`static java.lang.String` | `PROPERTY_ROW_HEIGHT`
`static java.lang.String` | `PROPERTY_ROWS_PER_PAGE`

Fields inherited from class nextapp.echo2.app.Table
`ACTION_LISTENERS_CHANGED_PROPERTY, AUTO_CREATE_COLUMNS_FROM_MODEL_CHANGED_PROPERTY, COLUMN_MODEL_CHANGED_PROPERTY, DEFAULT_HEADER_RENDERER_CHANGED_PROPERTY, DEFAULT_RENDERER_CHANGED_PROPERTY, DEFAULT_TABLE_CELL_RENDERER, HEADER_ROW, HEADER_VISIBLE_CHANGED_PROPERTY, INPUT_ACTION, MODEL_CHANGED_PROPERTY, PROPERTY_ACTION_COMMAND, PROPERTY_BORDER, PROPERTY_INSETS, PROPERTY_ROLLOVER_BACKGROUND, PROPERTY_ROLLOVER_BACKGROUND_IMAGE, PROPERTY_ROLLOVER_ENABLED, PROPERTY_ROLLOVER_FONT, PROPERTY_ROLLOVER_FOREGROUND, PROPERTY_SELECTION_BACKGROUND, PROPERTY_SELECTION_BACKGROUND_IMAGE, PROPERTY_SELECTION_ENABLED, PROPERTY_SELECTION_FONT, PROPERTY_SELECTION_FOREGROUND, PROPERTY_WIDTH, SELECTION_CHANGED_PROPERTY, SELECTION_MODEL_CHANGED_PROPERTY`

Fields inherited from class nextapp.echo2.app.Component
`CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY`

Fields inherited from interface echopointng.able.Scrollable
`ALWAYS, AUTO, CLIPHIDE, NEVER, PROPERTY_SCROLL_BAR_BASE_COLOR, PROPERTY_SCROLL_BAR_POLICY, PROPERTY_SCROLL_BAR_PROPERTIES, UNDEFINED`

Fields inherited from interface echopointng.able.Borderable
`PROPERTY_BORDER`

Fields inherited from interface echopointng.able.Insetable
`DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS`

Fields inherited from interface echopointng.able.MouseCursorable
`CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI`

Fields inherited from interface echopointng.able.ToolTipable
`PROPERTY_TOOL_TIP_TEXT`

Constructor Summary
`LiveTable()` Creates a new `LiveTable` with an empty `DefaultTableModel`.
`LiveTable(int columns, int rows)` Creates a new `LiveTable` with a new `DefaultTableModel` with the specified dimensions.
`LiveTable(TableModel model)` Creates a `LiveTable` using the supplied `TableModel`.
`LiveTable(TableModel model, TableColumnModel columnModel)` Creates a `LiveTable` with the supplied `TableModel` and the specified `TableColumnModel`.

Method Summary
`void` | `dispose()` Life-cycle method invoked when the `Component` is removed from a registered hierarchy.
`protected void` | `doRender()` LiveTable implementation only handles headers cells as child components not the main TableModel data rows.
`java.lang.Object` | `getAttribute(java.lang.String attributeName)` Returns a value for the given attribute name or null if one cannot be found.
`java.lang.String[]` | `getAttributeNames()` Returns a String array with the names of the the attributes that have neen set.
`Extent` | `getHeight()` Retutns the height extent of the `Heightable`.
`int` | `getMouseCursor()` Returns the current mouse cursor in use.
`java.lang.String` | `getMouseCursorURI()`
`Insets` | `getOutsets()`
`int` | `getPageFetchSize()` The pageFetchSize property controls how many pages (and hence rows) are "fetched" when a TableModel interaction is performed.
`LiveTableRenderer` | `getRenderer()`
`Extent` | `getRowHeight()`
`int` | `getRowsPerPage()`
`Color` | `getScrollBarBaseColor()` Returns the base color of the ScrollBarProperties associated with this `Scrollable`
`int` | `getScrollBarPolicy()` Returns the ScrollBarPolicy in place This can be one of : NONE ALWAYS AUTO CLIPHIDE
`ScrollBarProperties` | `getScrollBarProperties()` Returns the ScrollBarProperties associated with this `Scrollable`
`java.lang.String` | `getToolTipText()` Returns the tool tip text (displayed when the mouse cursor is hovered over the ToolTipable).
`void` | `init()` Life-cycle method invoked when the `Component` is added to a registered hierarchy.
`void` | `processInput(java.lang.String name, java.lang.Object value)` Processes client input specific to the `Component` received from the `UpdateManager`.
`void` | `setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)` Sets a value for a given attribute name.
`void` | `setHeight(Extent newValue)` The `LiveTable` must have a height value set.
`void` | `setMouseCursor(int mouseCursor)` Sets the mouse cursor to use.
`void` | `setMouseCursorURI(java.lang.String mouseCursorURI)` Sets the URI to a custom platform mouse cursor.
`void` | `setOutsets(Insets newValue)` Sets the Outsets in play.
`void` | `setPageFetchSize(int newValue)` The pageFetchSize property controls how many pages (and hence rows) are "fetched" when a TableModel interaction is performed.
`void` | `setRenderer(LiveTableRenderer newValue)`
`void` | `setRowHeight(Extent newValue)`
`void` | `setRowsPerPage(int newValue)`
`void` | `setScrollBarBaseColor(Color newValue)` Sets the base color of the ScrollBarProperties associated with this `Scrollable`.
`void` | `setScrollBarPolicy(int newScrollBarPolicy)` Sets the scroll bar policy of the component This can be one of : SCOLLBARS_NONE SCOLLBARS_ALWAYS SCOLLBARS_AUTO CLIPHIDE
`void` | `setScrollBarProperties(ScrollBarProperties newValue)` Sets the ScrollBarProperties associated with this `Scrollable`
`void` | `setToolTipText(java.lang.String newValue)` Sets the tool tip text (displayed when the mouse cursor is hovered over the ToolTipable).
`void` | `validate()` A life-cycle method invoked before the component is rendered to ensure it is in a valid state.

Methods inherited from class nextapp.echo2.app.Table
`addActionListener, createDefaultColumnsFromModel, getActionCommand, getBorder, getCellComponent, getColumnModel, getDefaultHeaderRenderer, getDefaultRenderer, getInsets, getModel, getRolloverBackground, getRolloverBackgroundImage, getRolloverFont, getRolloverForeground, getSelectionBackground, getSelectionBackgroundImage, getSelectionFont, getSelectionForeground, getSelectionModel, getWidth, hasActionListeners, invalidate, isAutoCreateColumnsFromModel, isHeaderVisible, isRolloverEnabled, isSelectionEnabled, removeActionListener, setActionCommand, setAutoCreateColumnsFromModel, setBorder, setColumnModel, setDefaultHeaderRenderer, setDefaultRenderer, setHeaderVisible, setInsets, setModel, setRolloverBackground, setRolloverBackgroundImage, setRolloverEnabled, setRolloverFont, setRolloverForeground, setSelectionBackground, setSelectionBackgroundImage, setSelectionEnabled, setSelectionFont, setSelectionForeground, setSelectionModel, setWidth`

Methods inherited from class nextapp.echo2.app.Component
`add, add, addPropertyChangeListener, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setStyle, setStyleName, setVisible, verifyInput, visibleIndexOf`

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

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Delegateable
`getRenderProperty, getRenderProperty`

Methods inherited from interface echopointng.able.Borderable
`getBorder, setBorder`

Methods inherited from interface echopointng.able.Insetable
`getInsets, setInsets`

Field Detail

### DEFAULT_STYLE

    public static final Style DEFAULT_STYLE

  This DEFAULT_STYLE is applied to the LiveTable to give it a series of borders and background colors

### PROPERTY_PAGE_FETCH_SIZE

    public static final java.lang.String PROPERTY_PAGE_FETCH_SIZE

See Also:
  Constant Field Values

### PROPERTY_RENDERER

    public static final java.lang.String PROPERTY_RENDERER

See Also:
  Constant Field Values

### PROPERTY_ROW_HEIGHT

    public static final java.lang.String PROPERTY_ROW_HEIGHT

See Also:
  Constant Field Values

### PROPERTY_ROWS_PER_PAGE

    public static final java.lang.String PROPERTY_ROWS_PER_PAGE

See Also:
  Constant Field Values

Constructor Detail

### LiveTable

    public LiveTable()

  Creates a new `LiveTable` with an empty `DefaultTableModel`.

### LiveTable

    public LiveTable(int columns,
                     int rows)

  Creates a new `LiveTable` with a new `DefaultTableModel` with the specified dimensions.

  Parameters:
    `columns` - the initial column count
    `rows` - the initial row count

### LiveTable

    public LiveTable(TableModel model)

  Creates a `LiveTable` using the supplied `TableModel`.

  Parameters:
    `model` - the initial model

### LiveTable

    public LiveTable(TableModel model,
                     TableColumnModel columnModel)

  Creates a `LiveTable` with the supplied `TableModel` and the specified `TableColumnModel`.

  Parameters:
    `model` - the initial model
    `columnModel` - the initial column model

Method Detail

### dispose

    public void dispose()

  Description copied from class: `Component`
  Life-cycle method invoked when the `Component` is removed from a registered hierarchy. Implementations should always invoke `super.dispose()`. Modifications to the component hierarchy are not allowed within this method.

  Overrides:
    `dispose` in class `Component`
  See Also:
    `Component.dispose()`

### doRender

    protected void doRender()

  LiveTable implementation only handles headers cells as child components not the main TableModel data rows. This allows it much bigger data sets.

  Overrides:
    `doRender` in class `Table`

### getAttribute

    public java.lang.Object getAttribute(java.lang.String attributeName)

  Description copied from interface: `Attributeable`
  Returns a value for the given attribute name or null if one cannot be found.

  Specified by:
    `getAttribute` in interface `Attributeable`
  Parameters:
    `attributeName` - - the name of the attribute to return
  Returns:
    a value for the given attribute name or null if one cannot be found.
  See Also:
    `Attributeable.getAttribute(java.lang.String)`

### getAttributeNames

    public java.lang.String[] getAttributeNames()

  Description copied from interface: `Attributeable`
  Returns a String array with the names of the the attributes that have neen set.

  Specified by:
    `getAttributeNames` in interface `Attributeable`
  Returns:
    a String array with the names of the the attributes that have neen set.
  See Also:
    `Attributeable.getAttributeNames()`

### getHeight

    public Extent getHeight()

  Description copied from interface: `Heightable`
  Retutns the height extent of the `Heightable`.

  Specified by:
    `getHeight` in interface `Heightable`
  Returns:
    the height extent of the `Heightable`.
  See Also:
    `Heightable.getHeight()`

### getMouseCursor

    public int getMouseCursor()

  Description copied from interface: `MouseCursorable`
  Returns the current mouse cursor in use. This will be one of the following values.
  - CURSOR_DEFAULT
  - CURSOR_AUTO
  - CURSOR_CROSSHAIR
  - CURSOR_POINTER
  - CURSOR_MOVE
  - CURSOR_E_RESIZE
  - CURSOR_NE_RESIZE
  - CURSOR_NW_RESIZE
  - CURSOR_N_RESIZE
  - CURSOR_SE_RESIZE
  - CURSOR_SW_RESIZE
  - CURSOR_S_RESIZE
  - CURSOR_W_RESIZE
  - CURSOR_TEXT
  - CURSOR_WAIT
  - CURSOR_HELP
  - CURSOR_CUSTOM

  Specified by:
    `getMouseCursor` in interface `MouseCursorable`
  Returns:
    The current mouse cursor in use.
  See Also:
    `MouseCursorable.getMouseCursor()`

### getMouseCursorURI

    public java.lang.String getMouseCursorURI()

  Specified by:
    `getMouseCursorURI` in interface `MouseCursorable`
  Returns:
    The custom URI for the mouse cursor or null
  See Also:
    `MouseCursorable.getMouseCursorURI()`

### getOutsets

    public Insets getOutsets()

  Specified by:
    `getOutsets` in interface `Insetable`
  Returns:
    the Outsets in use or null if here are none
  See Also:
    `Insetable.getOutsets()`

### getPageFetchSize

    public int getPageFetchSize()

  The pageFetchSize property controls how many pages (and hence rows) are "fetched" when a TableModel interaction is performed. A higher pageFetchSize will mean less server interactions but more network bandwidth.

  Returns:
    - the pageFetchSize

### getRenderer

    public LiveTableRenderer getRenderer()

### getRowHeight

    public Extent getRowHeight()

### getRowsPerPage

    public int getRowsPerPage()

### getScrollBarBaseColor

    public Color getScrollBarBaseColor()

  Description copied from interface: `Scrollable`
  Returns the base color of the ScrollBarProperties associated with this `Scrollable`

  Specified by:
    `getScrollBarBaseColor` in interface `Scrollable`
  Returns:
    the base color of the ScrollBarProperties associated with this `Scrollable`
  See Also:
    `Scrollable.getScrollBarBaseColor()`

### getScrollBarPolicy

    public int getScrollBarPolicy()

  Description copied from interface: `Scrollable`
  Returns the ScrollBarPolicy in place This can be one of :
  - NONE
  - ALWAYS
  - AUTO
  - CLIPHIDE

  Specified by:
    `getScrollBarPolicy` in interface `Scrollable`
  See Also:
    `Scrollable.getScrollBarPolicy()`

### getScrollBarProperties

    public ScrollBarProperties getScrollBarProperties()

  Description copied from interface: `Scrollable`
  Returns the ScrollBarProperties associated with this `Scrollable`

  Specified by:
    `getScrollBarProperties` in interface `Scrollable`
  Returns:
    the ScrollBarProperties associated with this `Scrollable`
  See Also:
    `Scrollable.getScrollBarProperties()`

### getToolTipText

    public java.lang.String getToolTipText()

  Description copied from interface: `ToolTipable`
  Returns the tool tip text (displayed when the mouse cursor is hovered over the ToolTipable).

  Specified by:
    `getToolTipText` in interface `ToolTipable`
  Returns:
    the tool tip text
  See Also:
    `ToolTipable.getToolTipText()`

### init

    public void init()

  Description copied from class: `Component`
  Life-cycle method invoked when the `Component` is added to a registered hierarchy. Implementations should always invoke `super.init()`. Modifications to the component hierarchy are not allowed within this method.

  Overrides:
    `init` in class `Component`
  See Also:
    `Component.init()`

### processInput

    public void processInput(java.lang.String name,
                             java.lang.Object value)

  Description copied from class: `Component`
  Processes client input specific to the `Component` received from the `UpdateManager`. Derivative implementations should take care to invoke `super.processInput()`.

  Overrides:
    `processInput` in class `Table`
  Parameters:
    `name` - the name of the input
    `value` - the value of the input
  See Also:
    `Component.processInput(java.lang.String, java.lang.Object)`

### setAttribute

    public void setAttribute(java.lang.String attributeName,
                             java.lang.Object attributeValue)

  Description copied from interface: `Attributeable`
  Sets a value for a given attribute name.

  Specified by:
    `setAttribute` in interface `Attributeable`
  Parameters:
    `attributeName` - - the name of the attribute to set
    `attributeValue` - - the value for the attribute
  See Also:
    `Attributeable.setAttribute(java.lang.String, java.lang.Object)`

### setHeight

    public void setHeight(Extent newValue)

  The `LiveTable` must have a height value set.

  Specified by:
    `setHeight` in interface `Heightable`
  Parameters:
    `newValue` - - the new height extent of the `Heightable`
  See Also:
    `Heightable.setHeight(nextapp.echo2.app.Extent)`

### setMouseCursor

    public void setMouseCursor(int mouseCursor)

  Description copied from interface: `MouseCursorable`
  Sets the mouse cursor to use. This will be one of the following values.
  - CURSOR_DEFAULT
  - CURSOR_AUTO
  - CURSOR_CROSSHAIR
  - CURSOR_POINTER
  - CURSOR_MOVE
  - CURSOR_E_RESIZE
  - CURSOR_NE_RESIZE
  - CURSOR_NW_RESIZE
  - CURSOR_N_RESIZE
  - CURSOR_SE_RESIZE
  - CURSOR_SW_RESIZE
  - CURSOR_S_RESIZE
  - CURSOR_W_RESIZE
  - CURSOR_TEXT
  - CURSOR_WAIT
  - CURSOR_HELP
  - CURSOR_CUSTOM

  Specified by:
    `setMouseCursor` in interface `MouseCursorable`
  Parameters:
    `mouseCursor` - - the mouse cursor to use
  See Also:
    `MouseCursorable.setMouseCursor(int)`

### setMouseCursorURI

    public void setMouseCursorURI(java.lang.String mouseCursorURI)

  Description copied from interface: `MouseCursorable`
  Sets the URI to a custom platform mouse cursor. This will only be used if the mosue cusor is set to CURSOR_CUSTOM.

  Specified by:
    `setMouseCursorURI` in interface `MouseCursorable`
  Parameters:
    `mouseCursorURI` - the URI to a custom platform mouse cursor.
  See Also:
    `MouseCursorable.setMouseCursorURI(java.lang.String)`

### setOutsets

    public void setOutsets(Insets newValue)

  Description copied from interface: `Insetable`
  Sets the Outsets in play. The Outsets control the extra space around the outside of a container.

  Specified by:
    `setOutsets` in interface `Insetable`
  Parameters:
    `newValue` - - the Ousets to use
  See Also:
    `Insetable.setOutsets(nextapp.echo2.app.Insets)`

### setPageFetchSize

    public void setPageFetchSize(int newValue)

  The pageFetchSize property controls how many pages (and hence rows) are "fetched" when a TableModel interaction is performed. A higher pageFetchSize will mean less server interactions but more network bandwidth.

  Parameters:
    `newValue` - - the new pageFetchSize value

### setRenderer

    public void setRenderer(LiveTableRenderer newValue)

### setRowHeight

    public void setRowHeight(Extent newValue)

### setRowsPerPage

    public void setRowsPerPage(int newValue)

### setScrollBarBaseColor

    public void setScrollBarBaseColor(Color newValue)

  Description copied from interface: `Scrollable`
  Sets the base color of the ScrollBarProperties associated with this `Scrollable`. If no ScrollBarProperties is available, then a new one should be created.

  Specified by:
    `setScrollBarBaseColor` in interface `Scrollable`
  Parameters:
    `newValue` - - the new base color of ScrollBarProperties to use
  See Also:
    `Scrollable.setScrollBarBaseColor(nextapp.echo2.app.Color)`

### setScrollBarPolicy

    public void setScrollBarPolicy(int newScrollBarPolicy)

  Description copied from interface: `Scrollable`
  Sets the scroll bar policy of the component This can be one of :
  - SCOLLBARS_NONE
  - SCOLLBARS_ALWAYS
  - SCOLLBARS_AUTO
  - CLIPHIDE

  Specified by:
    `setScrollBarPolicy` in interface `Scrollable`
  See Also:
    `Scrollable.setScrollBarPolicy(int)`

### setScrollBarProperties

    public void setScrollBarProperties(ScrollBarProperties newValue)

  Description copied from interface: `Scrollable`
  Sets the ScrollBarProperties associated with this `Scrollable`

  Specified by:
    `setScrollBarProperties` in interface `Scrollable`
  Parameters:
    `newValue` - - the new ScrollBarProperties to use
  See Also:
    `Scrollable.setScrollBarProperties(echopointng.able.ScrollBarProperties)`

### setToolTipText

    public void setToolTipText(java.lang.String newValue)

  Description copied from interface: `ToolTipable`
  Sets the tool tip text (displayed when the mouse cursor is hovered over the ToolTipable).

  Specified by:
    `setToolTipText` in interface `ToolTipable`
  Parameters:
    `newValue` - the new tool tip text
  See Also:
    `ToolTipable.setToolTipText(java.lang.String)`

### validate

    public void validate()

  Description copied from class: `Component`
  A life-cycle method invoked before the component is rendered to ensure it is in a valid state. Default implementation is empty. Overriding implementations should ensure to invoke `super.validate()` out of convention.

  Overrides:
    `validate` in class `Table`
  See Also:
    `Table.validate()`

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