|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Table
net.xoetrope.swt.XTable
public class XTable
Provides a simple read-only tables/grid component.
Copyright (c) Xoetrope Ltd., 1998-2004
License: see license.txt $Revision: 2.7 $
| Field Summary | |
|---|---|
protected org.eclipse.swt.graphics.Color |
colorSWTBg
|
protected org.eclipse.swt.graphics.Color |
colorSWTFg
|
protected XHandlerInvoker |
invoker
|
protected XModel |
model
|
protected boolean |
updateModelSelection
|
protected boolean |
usesDatabase
|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
XTable(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 |
XModel |
getModel()
Get the underlying model. |
int |
getSelectedRow()
Get the row selection index |
java.lang.String |
getValueAt(int rowIndex,
int columnIndex)
Get the value of the indexes |
void |
refill()
Refill the table |
int |
setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
Set one or more attributes of the component. |
void |
setBorderStyle(java.lang.String style)
Set the style of the border |
void |
setDisplayAttributes()
Set the display attributes |
void |
setInteractiveTable(boolean state)
Set the user interaction state |
void |
setModel(XModel xmodel)
Set the XModel which we will be generating the table from |
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 |
setUpdateModelSelection(boolean doUpdate)
Tie the model selection to this table's selection |
void |
staticRefill()
Refill from static elements |
void |
update()
implemented from XModelHolder interface |
void |
updateWidthColumn(int index)
Update the width of a column |
| Methods inherited from class org.eclipse.swt.widgets.Table |
|---|
addSelectionListener, clear, clear, clear, clearAll, computeSize, deselect, deselect, deselect, deselectAll, getColumn, getColumnCount, getColumnOrder, getColumns, getGridLineWidth, getHeaderHeight, getHeaderVisible, getItem, getItem, getItemCount, getItemHeight, getItems, getLinesVisible, getSelection, getSelectionCount, getSelectionIndex, getSelectionIndices, getSortColumn, getSortDirection, getTopIndex, indexOf, indexOf, isSelected, remove, remove, remove, removeAll, removeSelectionListener, select, select, select, selectAll, setColumnOrder, setFont, setHeaderVisible, setItemCount, setLinesVisible, setRedraw, setSelection, setSelection, setSelection, setSelection, setSelection, setSortColumn, setSortDirection, setTopIndex, showColumn, showItem, showSelection |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected XModel model
protected boolean updateModelSelection
protected XHandlerInvoker invoker
protected org.eclipse.swt.graphics.Color colorSWTFg
protected org.eclipse.swt.graphics.Color colorSWTBg
protected boolean usesDatabase
| Constructor Detail |
|---|
public XTable(java.lang.Object parent)
parent - parent object| Method Detail |
|---|
protected void checkSubclass()
checkSubclass in class org.eclipse.swt.widgets.Tablepublic void addListener()
public static int charLength(java.lang.String text)
text - the text
public void setDisplayAttributes()
public int setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
setAttribute in interface XAttributedComponentattribName - the name of the attributeattribValue - the value of the attribute
public void setSelectedStyle(java.lang.String style)
style - XStylepublic void setBorderStyle(java.lang.String style)
style - XStylepublic 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 XStyleComponentstyle - XStylepublic void setSelectedRow(int idx)
setSelectedRow in interface XRowSelectoridx - the new selected rowpublic int getSelectedRow()
getSelectedRow in interface XRowSelector
public void addHandler(java.lang.Object page,
java.lang.String handlerType,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
addHandler in interface XListenerHelperpage - the page containing the methodhandlerType - the type of event handlermethodName - the method to invoke
java.lang.NoSuchMethodException - cannot add the handlerpublic void setModel(XModel xmodel)
setModel in interface XModelHolderxmodel - The XModel of datapublic void update()
update in interface XModelHolderupdate in class org.eclipse.swt.widgets.Controlpublic XModel 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 | |||||||||