de.tu_berlin.cs.tfs.muvitorkit.gef.directedit
Interface IDirectEditPart

All Known Subinterfaces:
IDirectEditPart.IGraphicalDirectEditPart

public interface IDirectEditPart

Interface for providing necessary information to MuvitorTreeDirectEditManager and MuvitorTreeDirectEditPolicy. For AdapterTreeEditParts only!

If you want AdapterGraphicalEditParts or AdapterConnectionEditParts to support direct editing you have to let them implement IDirectEditPart.IGraphicalDirectEditPart instead.

Rating red

Nested Class Summary
static interface IDirectEditPart.IGraphicalDirectEditPart
          Interface for providing necessary information to MuvitorDirectEditManager and MuvitorDirectEditPolicy.
 
Method Summary
 int getDirectEditFeatureID()
           
 ICellEditorValidator getDirectEditValidator()
          Optionally, you may pass a validator whose returned error message will be shown while direct editing.
 

Method Detail

getDirectEditFeatureID

int getDirectEditFeatureID()
Returns:
The featureID from the EMF model's EPackage that describes the feature of this edit part's model to be edited by the direct edit manager.

getDirectEditValidator

ICellEditorValidator getDirectEditValidator()
Optionally, you may pass a validator whose returned error message will be shown while direct editing. If the returned string is null or "" the current value of the cell editor is considered as valid. Example:
 return new ICellEditorValidator() {
        @Override
        public String isValid(Object value) {
                if (((String) value).length() % 2 == 1) {
                        return "No names with odd length!";
                }
                return null;
        };
 

Returns:
a validator or null