Runtime

## org.eclipse.gmf.runtime.diagram.ui.editparts
Interface IGraphicalEditPart

All Superinterfaces:
  EditPart, GraphicalEditPart, IAdaptable, org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart

All Known Subinterfaces:
  IBorderItemEditPart, IResizableCompartmentEditPart

All Known Implementing Classes:
  AbstractBorderItemEditPart, ConnectionEditPart, GraphicalEditPart, NestableListItemEditPart, ResizableCompartmentEditPart

public interface IGraphicalEditPart
extends GraphicalEditPart, org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart

Field Summary

Fields inherited from interface org.eclipse.gef.EditPart
`SELECTED, SELECTED_NONE, SELECTED_PRIMARY`

Method Summary
`EditPart` `findEditPart(EditPart epBegin, EObject theElement)` finds an editpart given a starting editpart and an EObject
`IGraphicalEditPart` `getChildBySemanticHint(java.lang.String semanticHint)` Returns the first child inside this edit part that owns a view with the same type as the passed hint
`IDiagramEditDomain` `getDiagramEditDomain()` Gets the associated DiagramEditDomain to the edit part
`PreferencesHint` `getDiagramPreferencesHint()` Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values.
`org.eclipse.emf.transaction.TransactionalEditingDomain` `getEditingDomain()` Gets my transactional EMF editing domain.
`View` `getNotationView()` Return the editpart's associated Notation View.
`java.lang.Object` `getPreferredValue(EStructuralFeature feature)` Retrieves the preferred value for the supplied feature.
`EditPart` `getPrimaryChildEditPart()` this method will return the primary child view inside this edit part
`View` `getPrimaryView()` Convenience method returns the editpart's primary view.
`java.lang.Object` `getStructuralFeatureValue(EStructuralFeature id)` Convenience method to retreive the value for the supplied feature from the editpart's associated view element.
`TopGraphicEditPart` `getTopGraphicEditPart()` Method getTopGraphicEditPart.
`EObject` `resolveSemanticElement()` Gets the semantic element associated to this editpart's view.
`void` `setStructuralFeatureValue(EStructuralFeature feature, java.lang.Object value)` Convenience method to set a feature value.

Methods inherited from interface org.eclipse.gef.GraphicalEditPart
`addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint`

Methods inherited from interface org.eclipse.gef.EditPart

`activate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest`

Methods inherited from interface org.eclipse.core.runtime.IAdaptable
`getAdapter`

Methods inherited from interface org.eclipse.gmf.runtime.diagram.ui.internal.editparts.IEditableEditPart
`disableEditMode, enableEditMode, isEditModeEnabled`

Method Detail

### getNotationView

    public View getNotationView()

  Return the editpart's associated Notation View.

  Returns:
    `View`, the associated view or null if there is no associated Notation View

### getDiagramEditDomain

    public IDiagramEditDomain getDiagramEditDomain()

  Gets the associated DiagramEditDomain to the edit part

  Returns:
    IDiagramEditDomain

### getChildBySemanticHint

    public IGraphicalEditPart getChildBySemanticHint(java.lang.String semanticHint)

  Returns the first child inside this edit part that owns a view with the same type as the passed hint

  Parameters:
    `semanticHint` -
  Returns:
    IGraphicalEditPart

### getTopGraphicEditPart

    public TopGraphicEditPart getTopGraphicEditPart()

  Method getTopGraphicEditPart.

  Returns:
    TopGraphicEditPart

### getStructuralFeatureValue

    public java.lang.Object getStructuralFeatureValue(EStructuralFeature id)

  Convenience method to retreive the value for the supplied feature from the editpart's associated view element.

  Returns:
    Object the value

### setStructuralFeatureValue

    public void setStructuralFeatureValue(EStructuralFeature feature,
                                          java.lang.Object value)

  Convenience method to set a feature value.

  Parameters:
    `feature` -
    `value` -

### findEditPart

    public EditPart findEditPart(EditPart epBegin,
                                 EObject theElement)

  finds an editpart given a starting editpart and an EObject

  Parameters:
    `epBegin` - starting edit part
    `theElement` - eObject to use
  Returns:
    the found edit part if there is any

### getPrimaryView

    public View getPrimaryView()

  Convenience method returns the editpart's primary view.

  Returns:
    the primary view

### getPrimaryChildEditPart

    public EditPart getPrimaryChildEditPart()

  this method will return the primary child view inside this edit part

  Returns:
    the primary child view inside this edit part

### getDiagramPreferencesHint

    public PreferencesHint getDiagramPreferencesHint()

  Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. The preference hint is mapped to a preference store in the preference registry <@link DiagramPreferencesRegistry>.

  Returns:
    the preferences hint

### resolveSemanticElement

    public EObject resolveSemanticElement()

  Gets the semantic element associated to this editpart's view.

  Returns:
    the semantic element or `null` if the semantic element was `null` or unresolvable

### getEditingDomain

    public org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()

  Gets my transactional EMF editing domain.

  Returns:
    my transactional EMF editing domain

### getPreferredValue

    public java.lang.Object getPreferredValue(EStructuralFeature feature)

  Retrieves the preferred value for the supplied feature. This value could be the current value set in the preference store. Clients may override this to supply their own preferred values. The type of the return value will vary depending on the feature.

  Parameters:
    `feature` - the feature to use
  Returns:
    Object The preferred value for the supplied feature. The object is of the same type as if the value of the feature were retrieved directly from the view.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.