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

java.lang.Object
  extended by org.eclipse.swt.custom.ControlEditor
      extended by org.eclipse.swt.custom.TreeEditor
          extended by org.eclipse.emf.common.ui.celleditor.ExtendedTreeEditor
All Implemented Interfaces:
java.util.EventListener, KeyListener, MouseListener, SelectionListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
AdapterFactoryTreeEditor

public abstract class ExtendedTreeEditor
extends TreeEditor
implements SelectionListener, MouseListener, KeyListener

This base class for implementing a TreeEditor calls editItem(org.eclipse.swt.widgets.TreeItem) when the cell editor potentially needs to be activated. Activation is determined by checking for when a click happens on the single selection that was previously in effect, or when the user hits the space key when a single selection is in effect.


Field Summary
protected  TreeItem editTreeItem
           
protected  TreeItem selectedTreeItem
           
protected  Tree tree
           
 
Fields inherited from class org.eclipse.swt.custom.ControlEditor
grabHorizontal, grabVertical, horizontalAlignment, minimumHeight, minimumWidth, verticalAlignment
 
Constructor Summary
ExtendedTreeEditor(Tree tree)
           
 
Method Summary
protected abstract  void editItem(TreeItem treeItem)
           
 void keyPressed(KeyEvent event)
           
 void keyReleased(KeyEvent event)
           
 void mouseDoubleClick(MouseEvent event)
           
 void mouseDown(MouseEvent event)
           
 void mouseUp(MouseEvent event)
           
 void widgetDefaultSelected(SelectionEvent event)
           
 void widgetSelected(SelectionEvent event)
           
 
Methods inherited from class org.eclipse.swt.custom.TreeEditor
dispose, getColumn, getItem, layout, setColumn, setEditor, 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

tree

protected Tree tree

selectedTreeItem

protected TreeItem selectedTreeItem

editTreeItem

protected TreeItem editTreeItem
Constructor Detail

ExtendedTreeEditor

public ExtendedTreeEditor(Tree tree)
Method Detail

mouseDoubleClick

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

mouseDown

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

mouseUp

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

widgetDefaultSelected

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

widgetSelected

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

keyPressed

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

keyReleased

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

editItem

protected abstract void editItem(TreeItem treeItem)

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