|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.Table
org.formaria.swt.Table
public class Table
Provides a simple read-only tables/grid component.
Copyright (c) Formaria Ltd.,
License: see license.txt $Revision: 2.7 $
| Field Summary | |
|---|---|
protected org.eclipse.swt.graphics.Color |
colorSWTBg
|
protected org.eclipse.swt.graphics.Color |
colorSWTFg
|
protected HandlerInvoker |
invoker
|
protected DataModel |
model
|
protected boolean |
updateModelSelection
|
protected boolean |
usesDatabase
|
| Constructor Summary | |
|---|---|
Table(java.lang.Object parent)
Create a new table |
|
| Method Summary | |
|---|---|
void |
addHandler(java.lang.Object page,
java.lang.String handlerType,
java.lang.String methodName)
Add an event handler response method to a component such that the page's response method is invoked when the event occurs |
void |
addListener()
Add a listener |
static int |
charLength(java.lang.String text)
Get the width of a string |
protected void |
checkSubclass()
Suppress the subclassing exception |
void |
databaseRefill()
Refill from the database |
DataModel |
getModel()
Get the underlying model. |
int |
getSelectedRow()
Get the row selection index |
java.lang.String |
getToolTip()
Get the tooltip text |
java.lang.String |
getValueAt(int rowIndex,
int columnIndex)
Get the value of the indexes |
void |
refill()
Refill the table |
void |
setBorderStyle(java.lang.String style)
Set the style of the border |
void |
setDataModel(DataModel xmodel)
Set the DataModel which we will be generating the table from |
void |
setDisplayAttributes()
Set the display attributes |
void |
setInteractiveTable(boolean state)
Set the user interaction state |
void |
setSelectedRow(int idx)
Sets the indexof the selected row |
void |
setSelectedStyle(java.lang.String style)
Set the style of the selected row |
void |
setSelectionMode(java.lang.String value)
|
void |
setStyle(java.lang.String style)
Set the style of the header data |
void |
setToolTip(java.lang.String text)
Set the tooltip text |
void |
setUpdateModelSelection(boolean doUpdate)
Tie the model selection to this table's selection |
void |
staticRefill()
Refill from static elements |
void |
update()
implemented from ModelHolder interface |
void |
updateWidthColumn(int index)
Update the width of a column |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataModel model
protected boolean updateModelSelection
protected HandlerInvoker invoker
protected org.eclipse.swt.graphics.Color colorSWTFg
protected org.eclipse.swt.graphics.Color colorSWTBg
protected boolean usesDatabase
| Constructor Detail |
|---|
public Table(java.lang.Object parent)
parent - parent object| Method Detail |
|---|
protected void checkSubclass()
public void addListener()
public static int charLength(java.lang.String text)
text - the text
public void setDisplayAttributes()
public void setToolTip(java.lang.String text)
text - the new textpublic java.lang.String getToolTip()
public void setSelectedStyle(java.lang.String style)
style - Stylepublic void setBorderStyle(java.lang.String style)
style - Stylepublic void setInteractiveTable(boolean state)
state - true for an user interactive table.public void setUpdateModelSelection(boolean doUpdate)
doUpdate - true to tie the selections together, false to ignorepublic void setSelectionMode(java.lang.String value)
public void setStyle(java.lang.String style)
setStyle in interface StyleComponentstyle - Stylepublic void setSelectedRow(int idx)
setSelectedRow in interface RowSelectoridx - the new selected rowpublic int getSelectedRow()
getSelectedRow in interface RowSelector
public void addHandler(java.lang.Object page,
java.lang.String handlerType,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
addHandler in interface ListenerHelperpage - the page containing the methodhandlerType - the type of event handlermethodName - the method to invoke
java.lang.NoSuchMethodException - cannot add the handlerpublic void setDataModel(DataModel xmodel)
setDataModel in interface ModelHolderxmodel - The DataModel of datapublic void update()
update in interface ModelHolderpublic DataModel getModel()
public void refill()
public void databaseRefill()
public java.lang.String getValueAt(int rowIndex,
int columnIndex)
rowIndex - row indexcolumnIndex - column index
public void staticRefill()
public void updateWidthColumn(int index)
index - index of the column
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||