|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo2.app.Component
nextapp.echo2.app.Table
echopointng.LiveTable
public class LiveTable
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.
| 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 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 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 |
|---|
public static final Style DEFAULT_STYLE
public static final java.lang.String PROPERTY_PAGE_FETCH_SIZE
public static final java.lang.String PROPERTY_RENDERER
public static final java.lang.String PROPERTY_ROW_HEIGHT
public static final java.lang.String PROPERTY_ROWS_PER_PAGE
| Constructor Detail |
|---|
public LiveTable()
LiveTable with an empty
DefaultTableModel.
public LiveTable(int columns,
int rows)
LiveTable with a new
DefaultTableModel with the specified dimensions.
columns - the initial column countrows - the initial row countpublic LiveTable(TableModel model)
LiveTable using the supplied
TableModel.
model - the initial model
public LiveTable(TableModel model,
TableColumnModel columnModel)
LiveTable with the supplied
TableModel and the specified TableColumnModel.
model - the initial modelcolumnModel - the initial column model| Method Detail |
|---|
public void dispose()
ComponentComponent is removed
from a registered hierarchy. Implementations should always invoke
super.dispose().
Modifications to the component hierarchy are not allowed within this
method.
dispose in class ComponentComponent.dispose()protected void doRender()
doRender in class Tablepublic java.lang.Object getAttribute(java.lang.String attributeName)
Attributeable
getAttribute in interface AttributeableattributeName - - the name of the attribute to return
Attributeable.getAttribute(java.lang.String)public java.lang.String[] getAttributeNames()
Attributeable
getAttributeNames in interface AttributeableAttributeable.getAttributeNames()public Extent getHeight()
HeightableHeightable.
getHeight in interface HeightableHeightable.Heightable.getHeight()public int getMouseCursor()
MouseCursorable
getMouseCursor in interface MouseCursorableMouseCursorable.getMouseCursor()public java.lang.String getMouseCursorURI()
getMouseCursorURI in interface MouseCursorableMouseCursorable.getMouseCursorURI()public Insets getOutsets()
getOutsets in interface InsetableInsetable.getOutsets()public int getPageFetchSize()
public LiveTableRenderer getRenderer()
public Extent getRowHeight()
public int getRowsPerPage()
public Color getScrollBarBaseColor()
ScrollableScrollable
getScrollBarBaseColor in interface ScrollableScrollableScrollable.getScrollBarBaseColor()public int getScrollBarPolicy()
Scrollable
getScrollBarPolicy in interface ScrollableScrollable.getScrollBarPolicy()public ScrollBarProperties getScrollBarProperties()
ScrollableScrollable
getScrollBarProperties in interface ScrollableScrollableScrollable.getScrollBarProperties()public java.lang.String getToolTipText()
ToolTipable
getToolTipText in interface ToolTipableToolTipable.getToolTipText()public void init()
ComponentComponent is added
to a registered hierarchy. Implementations should always invoke
super.init().
Modifications to the component hierarchy are not allowed within this
method.
init in class ComponentComponent.init()
public void processInput(java.lang.String name,
java.lang.Object value)
ComponentComponent
received from the UpdateManager.
Derivative implementations should take care to invoke
super.processInput().
processInput in class Tablename - the name of the inputvalue - the value of the inputComponent.processInput(java.lang.String,
java.lang.Object)
public void setAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Attributeable
setAttribute in interface AttributeableattributeName - - the name of the attribute to setattributeValue - - the value for the attributeAttributeable.setAttribute(java.lang.String,
java.lang.Object)public void setHeight(Extent newValue)
LiveTable must have a height value set.
setHeight in interface HeightablenewValue - - the new height extent of the HeightableHeightable.setHeight(nextapp.echo2.app.Extent)public void setMouseCursor(int mouseCursor)
MouseCursorable
setMouseCursor in interface MouseCursorablemouseCursor - - the mouse cursor to useMouseCursorable.setMouseCursor(int)public void setMouseCursorURI(java.lang.String mouseCursorURI)
MouseCursorable
setMouseCursorURI in interface MouseCursorablemouseCursorURI - the URI to a custom platform mouse cursor.MouseCursorable.setMouseCursorURI(java.lang.String)public void setOutsets(Insets newValue)
Insetable
setOutsets in interface InsetablenewValue - -
the Ousets to useInsetable.setOutsets(nextapp.echo2.app.Insets)public void setPageFetchSize(int newValue)
newValue - -
the new pageFetchSize valuepublic void setRenderer(LiveTableRenderer newValue)
public void setRowHeight(Extent newValue)
public void setRowsPerPage(int newValue)
public void setScrollBarBaseColor(Color newValue)
ScrollableScrollable.
If no ScrollBarProperties is available, then a new one should be created.
setScrollBarBaseColor in interface ScrollablenewValue - - the new base color of ScrollBarProperties to useScrollable.setScrollBarBaseColor(nextapp.echo2.app.Color)public void setScrollBarPolicy(int newScrollBarPolicy)
Scrollable
setScrollBarPolicy in interface ScrollableScrollable.setScrollBarPolicy(int)public void setScrollBarProperties(ScrollBarProperties newValue)
ScrollableScrollable
setScrollBarProperties in interface ScrollablenewValue - - the new ScrollBarProperties to useScrollable.setScrollBarProperties(echopointng.able.ScrollBarProperties)public void setToolTipText(java.lang.String newValue)
ToolTipable
setToolTipText in interface ToolTipablenewValue - the new tool tip textToolTipable.setToolTipText(java.lang.String)public void validate()
Componentsuper.validate()
out of convention.
validate in class TableTable.validate()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||