Package org.eclipse.nebula.widgets.grid
Class GridEditor
- java.lang.Object
-
- org.eclipse.swt.custom.ControlEditor
-
- org.eclipse.nebula.widgets.grid.GridEditor
-
public class GridEditor extends org.eclipse.swt.custom.ControlEditorNOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
A GridEditor is a manager for a Control that appears above a cell in a Grid and tracks with the moving and resizing of that cell. It can be used to display a text widget above a cell in a Grid so that the user can edit the contents of that cell. It can also be used to display a button that can launch a dialog for modifying the contents of the associated cell.- See Also:
TableEditor
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intcolumnprivate org.eclipse.swt.widgets.ListenercolumnGroupListener(package private) org.eclipse.swt.events.ControlListenercolumnListenerprivate org.eclipse.swt.widgets.ListenercolumnVisibleListener(package private) GridItemitem(package private) org.eclipse.swt.widgets.ListenerresizeListenerprivate org.eclipse.swt.events.SelectionListenerscrollListener(package private) Gridtableprivate org.eclipse.swt.events.TreeListenertreeListener
-
Constructor Summary
Constructors Constructor Description GridEditor(Grid table)Creates a TableEditor for the specified Table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.swt.graphics.RectanglecomputeEditorBounds()Returns the bounds of the editor.voiddispose()Removes all associations between the TableEditor and the cell in the table.intgetColumn()Returns the zero based index of the column of the cell being tracked by this editor.GridItemgetItem()Returns the TableItem for the row of the cell being tracked by this editor.voidlayout()voidsetColumn(int column)Sets the zero based index of the column of the cell being tracked by this editor.voidsetEditor(org.eclipse.swt.widgets.Control editor, GridItem item, int column)Specify the Control that is to be displayed and the cell in the table that it is to be positioned above.voidsetItem(GridItem item)Sets the item that this editor will function over.
-
-
-
Field Detail
-
table
Grid table
-
item
GridItem item
-
column
int column
-
columnListener
org.eclipse.swt.events.ControlListener columnListener
-
resizeListener
org.eclipse.swt.widgets.Listener resizeListener
-
columnVisibleListener
private org.eclipse.swt.widgets.Listener columnVisibleListener
-
columnGroupListener
private org.eclipse.swt.widgets.Listener columnGroupListener
-
scrollListener
private org.eclipse.swt.events.SelectionListener scrollListener
-
treeListener
private org.eclipse.swt.events.TreeListener treeListener
-
-
Constructor Detail
-
GridEditor
public GridEditor(Grid table)
Creates a TableEditor for the specified Table.- Parameters:
table- the Table Control above which this editor will be displayed
-
-
Method Detail
-
computeEditorBounds
protected org.eclipse.swt.graphics.Rectangle computeEditorBounds()
Returns the bounds of the editor.- Returns:
- bounds of the editor.
-
dispose
public void dispose()
Removes all associations between the TableEditor and the cell in the table. The Table and the editor Control are not disposed.- Overrides:
disposein classorg.eclipse.swt.custom.ControlEditor
-
getColumn
public int getColumn()
Returns the zero based index of the column of the cell being tracked by this editor.- Returns:
- the zero based index of the column of the cell being tracked by this editor
-
getItem
public GridItem getItem()
Returns the TableItem for the row of the cell being tracked by this editor.- Returns:
- the TableItem for the row of the cell being tracked by this editor
-
setColumn
public void setColumn(int column)
Sets the zero based index of the column of the cell being tracked by this editor.- Parameters:
column- the zero based index of the column of the cell being tracked by this editor
-
setItem
public void setItem(GridItem item)
Sets the item that this editor will function over.- Parameters:
item- editing item.
-
setEditor
public void setEditor(org.eclipse.swt.widgets.Control editor, GridItem item, int column)Specify the Control that is to be displayed and the cell in the table that it is to be positioned above.Note: The Control provided as the editor must be created with its parent being the Table control specified in the TableEditor constructor.
- Parameters:
editor- the Control that is displayed above the cell being editeditem- the TableItem for the row of the cell being tracked by this editorcolumn- the zero based index of the column of the cell being tracked by this editor
-
layout
public void layout()
- Overrides:
layoutin classorg.eclipse.swt.custom.ControlEditor
-
-