org.eclipse.emf.common.ui.celleditor
Class SingleColumnTableEditor

java.lang.Object
  extended by org.eclipse.swt.custom.ControlEditor
      extended by org.eclipse.swt.custom.TableEditor
          extended by org.eclipse.emf.common.ui.celleditor.BasicTableEditor
              extended by org.eclipse.emf.common.ui.celleditor.SingleColumnTableEditor
All Implemented Interfaces:
java.util.EventListener, MouseListener, SelectionListener, TraverseListener, org.eclipse.swt.internal.SWTEventListener

public abstract class SingleColumnTableEditor
extends BasicTableEditor
implements MouseListener, SelectionListener, TraverseListener

An abstract base class for implementing table editing where only a single column is editable. Clicking anywhere on a row or pressing enter when a row is selected edits the editable column.

Provisional API. Please do not use it for anything more than experimentation.

Since:
2.5

Field Summary
protected  int editableColumn
           
protected  TableItem editorFocusLostItem
           
protected  int editorFocusLostTime
           
 
Fields inherited from class org.eclipse.emf.common.ui.celleditor.BasicTableEditor
table
 
Fields inherited from class org.eclipse.swt.custom.ControlEditor
grabHorizontal, grabVertical, horizontalAlignment, minimumHeight, minimumWidth, verticalAlignment
 
Constructor Summary
SingleColumnTableEditor(Table table)
           
SingleColumnTableEditor(Table table, int editableColumn)
           
 
Method Summary
protected  boolean canEdit(TableItem item, int column)
           
protected  Text createTextEditor(TableItem item, int column)
           
 void dispose()
           
protected  TableItem getItem(int x, int y)
           
 void keyTraversed(TraverseEvent e)
           
 void mouseDoubleClick(MouseEvent e)
           
 void mouseDown(MouseEvent e)
           
 void mouseUp(MouseEvent e)
           
 void widgetDefaultSelected(SelectionEvent e)
           
 void widgetSelected(SelectionEvent e)
           
 
Methods inherited from class org.eclipse.emf.common.ui.celleditor.BasicTableEditor
createEditor, edit, endEditing, getSelection, update
 
Methods inherited from class org.eclipse.swt.custom.TableEditor
getColumn, getItem, layout, setColumn, setEditor, setEditor, setItem
 
Methods inherited from class org.eclipse.swt.custom.ControlEditor
getEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editableColumn

protected int editableColumn

editorFocusLostTime

protected int editorFocusLostTime

editorFocusLostItem

protected TableItem editorFocusLostItem
Constructor Detail

SingleColumnTableEditor

public SingleColumnTableEditor(Table table)

SingleColumnTableEditor

public SingleColumnTableEditor(Table table,
                               int editableColumn)
Method Detail

dispose

public void dispose()
Overrides:
dispose in class TableEditor

widgetSelected

public void widgetSelected(SelectionEvent e)
Specified by:
widgetSelected in interface SelectionListener

widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent e)
Specified by:
widgetDefaultSelected in interface SelectionListener

mouseDoubleClick

public void mouseDoubleClick(MouseEvent e)
Specified by:
mouseDoubleClick in interface MouseListener

mouseDown

public void mouseDown(MouseEvent e)
Specified by:
mouseDown in interface MouseListener

mouseUp

public void mouseUp(MouseEvent e)
Specified by:
mouseUp in interface MouseListener

getItem

protected TableItem getItem(int x,
                            int y)

keyTraversed

public void keyTraversed(TraverseEvent e)
Specified by:
keyTraversed in interface TraverseListener

canEdit

protected boolean canEdit(TableItem item,
                          int column)
Overrides:
canEdit in class BasicTableEditor

createTextEditor

protected Text createTextEditor(TableItem item,
                                int column)
Overrides:
createTextEditor in class BasicTableEditor

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.