|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectComposite
org.csstudio.ui.util.swt.stringtable.StringTableEditor
public class StringTableEditor
Editor for table (list) of String or String[] entries, allows up/down ordering, add and delete
Constructor Summary | |
---|---|
StringTableEditor(Composite parent,
java.util.List<java.lang.String> items)
Create a string list editor which is a table with only one column. |
|
StringTableEditor(Composite parent,
java.lang.String[] headers,
boolean[] editable,
java.util.List<java.lang.String[]> items,
RowEditDialog rowEditDialog,
int[] columnsMinWidth)
Creates an editable table. |
Method Summary | |
---|---|
TableViewer |
getTableViewer()
|
void |
refresh()
Refresh the editor after the list of items was changed |
void |
setEnabled(boolean enabled)
|
void |
updateInput(java.util.List<?> new_items)
Update the input to the table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringTableEditor(Composite parent, java.lang.String[] headers, boolean[] editable, java.util.List<java.lang.String[]> items, RowEditDialog rowEditDialog, int[] columnsMinWidth)
parent
- The composite which the table resides in. Cannot be null.headers
- Contains the header for each column. Cannot be null.editable
- Whether it is editable for each column. The size must be same as headers.
If it's null, all columns will be editable.items
- The items to be displayed and manipulated in the table. Cannot be null.
Each element in the list, which is an array of string, represents the data in a row.
In turn, each element in the string array represents the data in a cell.
So it is required that every string array in the list must has the same size as headers.rowEditDialog
- The dialog to edit a row. If it is null, there will be no edit button.columnsMinWidth
- The minimum width for each column. Cannot be null.public StringTableEditor(Composite parent, java.util.List<java.lang.String> items)
parent
- Parent widgetitems
- List of strings, will be changed in-placeMethod Detail |
---|
public void updateInput(java.util.List<?> new_items)
new_items
- New items. Must be either List of String or String[],
and type must match whatever was used to construct
the StringTableEditor.public void refresh()
public void setEnabled(boolean enabled)
public TableViewer getTableViewer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |