Class BaseEditPart<M,​F extends org.eclipse.draw2d.IFigure>

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, org.eclipse.gef.EditPart, org.eclipse.gef.GraphicalEditPart, org.eclipse.gef.RequestConstants
    Direct Known Subclasses:
    ListEditPart

    public abstract class BaseEditPart<M,​F extends org.eclipse.draw2d.IFigure>
    extends org.eclipse.gef.editparts.AbstractGraphicalEditPart
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart

        org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart, org.eclipse.gef.editparts.AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider
      • Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart

        org.eclipse.gef.editparts.AbstractEditPart.EditPolicyIterator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.core.databinding.DataBindingContext bindings  
      protected ObservableManager observables  
      • Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart

        figure, sourceConnections, targetConnections
      • Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart

        children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG
      • Fields inherited from interface org.eclipse.gef.EditPart

        SELECTED, SELECTED_NONE, SELECTED_PRIMARY
      • Fields inherited from interface org.eclipse.gef.RequestConstants

        REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseEditPart()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addChildVisual​(org.eclipse.gef.EditPart childEditPart, int index)  
      protected void asyncExec​(Runnable runnable)  
      protected void bindModel​(Object model, PanelKey key)  
      protected void createEditPolicies()  
      protected abstract F createFigure()  
      protected void createModelBindings()  
      void deactivate()  
      protected void doAddChildVisual​(org.eclipse.draw2d.IFigure child, int index)  
      Object getAdapter​(Class key)  
      org.eclipse.gef.EditDomain getEditDomain()  
      F getFigure()  
      M getModel()  
      protected List<Object> getModelChildren()  
      protected <T extends org.eclipse.core.databinding.observable.value.IObservableValue>
      T
      registerModelBinding​(T binding)  
      protected void removeChildVisual​(org.eclipse.gef.EditPart childEditPart)  
      void setModel​(Object model)  
      protected void syncExec​(Runnable runnable)  
      • Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart

        activate, addNodeListener, addNotify, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getContentPane, getDragTracker, getLayer, getModelSourceConnections, getModelTargetConnections, getSourceConnections, getTargetConnections, isSelectable, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refresh, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeNodeListener, removeNotify, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals
      • Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart

        activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, refreshChildren, refreshVisuals, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregister, unregisterAccessibility, unregisterModel
      • Methods inherited from interface org.eclipse.gef.EditPart

        addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
    • Field Detail

      • bindings

        protected final org.eclipse.core.databinding.DataBindingContext bindings
    • Constructor Detail

      • BaseEditPart

        public BaseEditPart()
    • Method Detail

      • getEditDomain

        public org.eclipse.gef.EditDomain getEditDomain()
      • getModel

        public M getModel()
        Specified by:
        getModel in interface org.eclipse.gef.EditPart
        Overrides:
        getModel in class org.eclipse.gef.editparts.AbstractEditPart
      • getFigure

        public F getFigure()
        Specified by:
        getFigure in interface org.eclipse.gef.GraphicalEditPart
        Overrides:
        getFigure in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
      • createFigure

        protected abstract F createFigure()
        Specified by:
        createFigure in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
      • registerModelBinding

        protected <T extends org.eclipse.core.databinding.observable.value.IObservableValue> T registerModelBinding​(T binding)
      • createEditPolicies

        protected void createEditPolicies()
        Specified by:
        createEditPolicies in class org.eclipse.gef.editparts.AbstractEditPart
      • setModel

        public void setModel​(Object model)
        Specified by:
        setModel in interface org.eclipse.gef.EditPart
        Overrides:
        setModel in class org.eclipse.gef.editparts.AbstractEditPart
      • createModelBindings

        protected void createModelBindings()
      • deactivate

        public void deactivate()
        Specified by:
        deactivate in interface org.eclipse.gef.EditPart
        Overrides:
        deactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
      • bindModel

        protected void bindModel​(Object model,
                                 PanelKey key)
      • addChildVisual

        protected void addChildVisual​(org.eclipse.gef.EditPart childEditPart,
                                      int index)
        Overrides:
        addChildVisual in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
      • doAddChildVisual

        protected void doAddChildVisual​(org.eclipse.draw2d.IFigure child,
                                        int index)
      • removeChildVisual

        protected void removeChildVisual​(org.eclipse.gef.EditPart childEditPart)
        Overrides:
        removeChildVisual in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
      • getModelChildren

        protected List<Object> getModelChildren()
        Overrides:
        getModelChildren in class org.eclipse.gef.editparts.AbstractEditPart
      • asyncExec

        protected void asyncExec​(Runnable runnable)
      • syncExec

        protected void syncExec​(Runnable runnable)
      • getAdapter

        public Object getAdapter​(Class key)
        Specified by:
        getAdapter in interface org.eclipse.core.runtime.IAdaptable
        Overrides:
        getAdapter in class org.eclipse.gef.editparts.AbstractGraphicalEditPart