UML

org.topcased.modeler.uml.sequencediagram.editingsupport
Class DelegatingEditingSupport

java.lang.Object
  extended by org.eclipse.jface.viewers.EditingSupport
      extended by org.topcased.modeler.uml.sequencediagram.editingsupport.DelegatingEditingSupport

public class DelegatingEditingSupport
extends org.eclipse.jface.viewers.EditingSupport

Editing support used for editing a ValueSpecification value. Uses an internal switch to delegate to the appropriate EditingSupport since we can't have multiple inheritance. Because of the lack of multiple inheritance, since we need access to the corresponding methods in the delegated editing support, we use a cast to TextEditingSupport or ComboBoxEditingSupport in order to access the methods made public (eg canEdit is protected in EditingSupport, but TextEditingSupport overrides it and makes it public).


Constructor Summary
DelegatingEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer)
           
 
Method Summary
protected  boolean canEdit(java.lang.Object element)
          Delegates to the right EditingSupport.
protected  org.eclipse.jface.viewers.CellEditor getCellEditor(java.lang.Object element)
          Delegates to the right EditingSupport.
protected  java.lang.Object getValue(java.lang.Object element)
          Delegates to the right EditingSupport.
 void setEditDomain(MixedEditDomain editDomain)
          Called from the ArgumentsComposite to set the EditDomain.
protected  void setValue(java.lang.Object element, java.lang.Object value)
          Delegates to the right EditingSupport.
 
Methods inherited from class org.eclipse.jface.viewers.EditingSupport
getViewer, initializeCellEditorValue, saveCellEditorValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingEditingSupport

public DelegatingEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer)
Method Detail

setEditDomain

public void setEditDomain(MixedEditDomain editDomain)
Called from the ArgumentsComposite to set the EditDomain.

Parameters:
editDomain -

canEdit

protected boolean canEdit(java.lang.Object element)
Delegates to the right EditingSupport.

Specified by:
canEdit in class org.eclipse.jface.viewers.EditingSupport
See Also:
EditingSupport.canEdit(java.lang.Object)

getCellEditor

protected org.eclipse.jface.viewers.CellEditor getCellEditor(java.lang.Object element)
Delegates to the right EditingSupport.

Specified by:
getCellEditor in class org.eclipse.jface.viewers.EditingSupport
See Also:
EditingSupport.getCellEditor(java.lang.Object)

getValue

protected java.lang.Object getValue(java.lang.Object element)
Delegates to the right EditingSupport.

Specified by:
getValue in class org.eclipse.jface.viewers.EditingSupport
See Also:
EditingSupport.getValue(java.lang.Object)

setValue

protected void setValue(java.lang.Object element,
                        java.lang.Object value)
Delegates to the right EditingSupport.

Specified by:
setValue in class org.eclipse.jface.viewers.EditingSupport
See Also:
EditingSupport.setValue(java.lang.Object, java.lang.Object)

UML

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.