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

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.MultiColumnTableEditor
All Implemented Interfaces:
java.util.EventListener, KeyListener, MouseListener, SelectionListener, org.eclipse.swt.internal.SWTEventListener

public abstract class MultiColumnTableEditor
extends BasicTableEditor
implements KeyListener, MouseListener, SelectionListener

An abstract base class for implementing table editing where multiple columns (all by default) are editable. A table cursor is used to provide keyboard navigation over the table.

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

Since:
2.5

Field Summary
protected  TableCursor cursor
           
protected  int editableColumns
           
 
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
MultiColumnTableEditor(Table table)
           
MultiColumnTableEditor(Table table, int editableColumns)
           
 
Method Summary
protected  boolean canEdit(TableItem item, int column)
           
 void dispose()
           
protected  void edit(TableItem item, int column)
           
protected  void endEditing(TableItem item, int column, Control editor, boolean accept)
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent 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, createTextEditor, 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

cursor

protected TableCursor cursor

editableColumns

protected int editableColumns
Constructor Detail

MultiColumnTableEditor

public MultiColumnTableEditor(Table table)

MultiColumnTableEditor

public MultiColumnTableEditor(Table table,
                              int editableColumns)
Method Detail

dispose

public void dispose()
Overrides:
dispose in class TableEditor

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener

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

widgetSelected

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

widgetDefaultSelected

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

edit

protected void edit(TableItem item,
                    int column)
Overrides:
edit in class BasicTableEditor

canEdit

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

endEditing

protected void endEditing(TableItem item,
                          int column,
                          Control editor,
                          boolean accept)
Overrides:
endEditing in class BasicTableEditor

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