Runtime

## org.eclipse.gmf.runtime.notation
Interface View

All Superinterfaces:
  EModelElement, EObject, Notifier

All Known Subinterfaces:
  Diagram, Edge, Node

All Known Implementing Classes:
  DiagramImpl, EdgeImpl, NodeImpl, ViewImpl

public interface View
extends EModelElement

A representation of the model object 'View'.

The views are the central abstraction in a notation model. View objects reference a business model and contain other notation objects that together hold all the properties needed to visualize that business model. The reason the view object does not have all the properties itself but rather delegates to other abstractions is to allow for easy extension of properties.

The following features are supported:

- `Visible`
- `Type`
- `Mutable`
- `Source Edges`
- `Target Edges`
- `Persisted Children`
- `Styles`
- `Element`
- `Diagram`
- `Transient Children`

See Also:
  `NotationPackage.getView()`
** Generated **
Model:
  abstract="true"

Method Summary
`Node` `createChild(EClass eClass)` A utililty method to create a new `Node` from the given `eClass` paramter and then inserts the object in the view's Children collection
`Style` `createStyle(EClass eClass)` A utililty method to create a new `Style` from the given `eClass` paramter and then inserts the object in the view's Styles collection
`EList` `getChildren()` Returns the value of the 'Children'list.
`Diagram` `getDiagram()` Returns the value of the 'Diagram' reference
`EObject` `getElement()` Returns the value of the 'Element' reference
`EList` `getPersistedChildren()` Returns the value of the 'Persisted Children' containment reference list.
`EList` `getSourceEdges()` Returns the value of the 'Source Edges' reference list.
`Style` `getStyle(EClass eClass)` Looks up a style in the view's collection of styles that extends/implements the given `EClass`.
`EList` `getStyles()` Returns the value of the 'Styles' containment reference list.
`EList` `getTargetEdges()` Returns the value of the 'Target Edges' reference list.
`EList` `getTransientChildren()` Returns the value of the 'Transient Children' containment reference list.
`java.lang.String` `getType()` Returns the value of the 'Type' attribute.
`EList` `getVisibleChildren()` Returns an Unmodifable list that contains all the visible children in the Children list.
`void` `insertChild(View child)` A utililty method to insert a persisted child
`void` `insertChild(View child, boolean persisted)` A utililty method to insert a persisted or transient child
`void` `insertChildAt(View child, int index)` A utililty method to insert a persisted child at a specific index
`boolean` `isMutable()` Returns the value of the 'Mutable' attribute.
`boolean` `isSetElement()` Returns whether the value of the '`Element`' reference is set
`boolean` `isVisible()` Returns the value of the 'Visible' attribute.
`void` `persist()` A utililty method to persist the view, it will do nothing if the view is alrady peristed
`void` `persistChildren()` A utililty method to persist all view's children
`void` `removeChild(View child)` A utililty method to remove a child form a view
`void` `setElement(EObject value)` Sets the value of the '`Element`' reference
`void` `setMutable(boolean value)` Sets the value of the '`Mutable`' attribute
`void` `setType(java.lang.String value)` Sets the value of the '`Type`' attribute
`void` `setVisible(boolean value)` Sets the value of the '`Visible`' attribute
`void` `unsetElement()` Unsets the value of the '`Element`' reference

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Method Detail

### isVisible

    public boolean isVisible()

  Returns the value of the 'Visible' attribute. The default value is `"true"`.

  Returns:
    the value of the 'Visible' attribute.
  See Also:
    `View.setVisible(boolean)`, `NotationPackage.getView_Visible()`
  ** Generated **
  Model:
    default="true"

### setVisible

    public void setVisible(boolean value)

  Sets the value of the '`Visible`' attribute.

  Parameters:
    `value` - the new value of the 'Visible' attribute.
  See Also:
    `View.isVisible()`
  ** Generated **

### getType

    public java.lang.String getType()

  Returns the value of the 'Type' attribute. The default value is `""`.

  The view's type is a context-defined unique string representing the kind of the view. It is usually used if the view is a subview or if it is a top level view that does not have a business model

  Returns:
    the value of the 'Type' attribute.
  See Also:
    `View.setType(String)`, `NotationPackage.getView_Type()`
  ** Generated **
  Model:
    default=""

### setType

    public void setType(java.lang.String value)

  Sets the value of the '`Type`' attribute.

  The view's type is a context-defined unique string representing the kind of the view. It is usually used if the view is a subview or if it is a top level view that does not have a business model

  Parameters:
    `value` - the new value of the 'Type' attribute.
  See Also:
    `View.getType()`
  ** Generated **

### isMutable

    public boolean isMutable()

  Returns the value of the 'Mutable' attribute. The default value is `"false"`.

  If the meaning of the 'Mutable' attribute isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Mutable' attribute.
  See Also:
    `View.setMutable(boolean)`, `NotationPackage.getView_Mutable()`
  ** Generated **
  Model:
    default="false" transient="true"

### setMutable

    public void setMutable(boolean value)

  Sets the value of the '`Mutable`' attribute.

  Parameters:
    `value` - the new value of the 'Mutable' attribute.
  See Also:
    `View.isMutable()`
  ** Generated **

### getSourceEdges

    public EList getSourceEdges()

  Returns the value of the 'Source Edges' reference list. The list contents are of type `Edge`. It is bidirectional and its opposite is '`Source`'.

  The property is a list of zero or more outgoing edges from the view

  Returns:
    the value of the 'Source Edges' reference list.
  See Also:
    `NotationPackage.getView_SourceEdges()`, `Edge.getSource()`
  ** Generated **
  Model:
    type="org.eclipse.gmf.runtime.notation.Edge" opposite="source" resolveProxies="false" transient="true"

### getTargetEdges

    public EList getTargetEdges()

  Returns the value of the 'Target Edges' reference list. The list contents are of type `Edge`. It is bidirectional and its opposite is '`Target`'.

  The property is a list of zero or more incoming edges to the view

  Returns:
    the value of the 'Target Edges' reference list.
  See Also:
    `NotationPackage.getView_TargetEdges()`, `Edge.getTarget()`
  ** Generated **
  Model:
    type="org.eclipse.gmf.runtime.notation.Edge" opposite="target" resolveProxies="false" transient="true"

### getPersistedChildren

    public EList getPersistedChildren()

  Returns the value of the 'Persisted Children' containment reference list. The list contents are of type `Node`.

  If the meaning of the 'Persisted Children' containment reference list isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Persisted Children' containment reference list.
  See Also:
    `NotationPackage.getView_PersistedChildren()`
  ** Generated **
  Model:
    type="org.eclipse.gmf.runtime.notation.Node" containment="true"

### getChildren

    public EList getChildren()

  Returns the value of the 'Children'list. the returned list is an Unmodifable list. The list contents are of type `View`.

  Returns:
    the value of the 'Children' list.
  See Also:
    `org.eclipse.gmf.runtime.notation.NotationPackage#getView_Children()`

### getVisibleChildren

    public EList getVisibleChildren()

  Returns an Unmodifable list that contains all the visible children in the Children list. The list contents are of type `View`.

  Returns:
    Unmodifable list of Visible children

### getStyles

    public EList getStyles()

  Returns the value of the 'Styles' containment reference list. The list contents are of type `Style`.

  The list contains unique instances of these styles

  Returns:
    the value of the 'Styles' containment reference list.
  See Also:
    `NotationPackage.getView_Styles()`
  ** Generated **
  Model:
    type="org.eclipse.gmf.runtime.notation.Style" containment="true"

### getElement

    public EObject getElement()

  Returns the value of the 'Element' reference.

  This is The referenced business model element

  Returns:
    the value of the 'Element' reference.
  See Also:
    `View.isSetElement()`, `View.unsetElement()`, `View.setElement(EObject)`, `NotationPackage.getView_Element()`
  ** Generated **
  Model:
    unsettable="true"

### setElement

    public void setElement(EObject value)

  Sets the value of the '`Element`' reference. This is The referenced business model element

  Parameters:
    `value` - the new value of the 'Element' reference.
  See Also:
    `View.isSetElement()`, `View.unsetElement()`, `View.getElement()`
  ** Generated **

### unsetElement

    public void unsetElement()

  Unsets the value of the '`Element`' reference.

  See Also:
    `View.isSetElement()`, `View.getElement()`, `View.setElement(EObject)`
  ** Generated **

### isSetElement

    public boolean isSetElement()

  Returns whether the value of the '`Element`' reference is set.

  Returns:
    whether the value of the 'Element' reference is set.
  See Also:
    `View.unsetElement()`, `View.getElement()`, `View.setElement(EObject)`
  ** Generated **

### getDiagram

    public Diagram getDiagram()

  Returns the value of the 'Diagram' reference.

  The diagram is the top level container of this view

  Returns:
    the value of the 'Diagram' reference.
  See Also:
    `NotationPackage.getView_Diagram()`
  ** Generated **
  Model:
    required="true" transient="true" changeable="false" volatile="true"

### getTransientChildren

    public EList getTransientChildren()

  Returns the value of the 'Transient Children' containment reference list. The list contents are of type `Node`.

  If the meaning of the 'Transient Children' containment reference list isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Transient Children' containment reference list.
  See Also:
    `NotationPackage.getView_TransientChildren()`
  ** Generated **
  Model:
    type="org.eclipse.gmf.runtime.notation.Node" containment="true" transient="true"

### getStyle

    public Style getStyle(EClass eClass)

  Looks up a style in the view's collection of styles that extends/implements the given `EClass`. Thefore the returned style instance is not guaranteed to be unique for different `EClass`es

  ** Generated **
  Model:

### createChild

    public Node createChild(EClass eClass)

  A utililty method to create a new `Node` from the given `eClass` paramter and then inserts the object in the view's Children collection

  Parameters:
    `eClass` - the `EClass` to be used in creating the `Node` object
  ** Generated **
  Model:

### createStyle

    public Style createStyle(EClass eClass)

  A utililty method to create a new `Style` from the given `eClass` paramter and then inserts the object in the view's Styles collection

  Parameters:
    `eClass` - the `EClass` to be used in creating the `Style` object
  ** Generated **
  Model:

### persistChildren

    public void persistChildren()

  A utililty method to persist all view's children

### persist

    public void persist()

  A utililty method to persist the view, it will do nothing if the view is alrady peristed

### insertChild

    public void insertChild(View child)

  A utililty method to insert a persisted child

  Parameters:
    `child` - the 'View' to insert.

### insertChildAt

    public void insertChildAt(View child,
                              int index)

  A utililty method to insert a persisted child at a specific index

  Parameters:
    `child` - the 'View' to insert.

### insertChild

    public void insertChild(View child,
                            boolean persisted)

  A utililty method to insert a persisted or transient child

  Parameters:
    `child` - the 'View' to insert.

### removeChild

    public void removeChild(View child)

  A utililty method to remove a child form a view

  Parameters:
    `child` - the 'View' to remove

Runtime

Guidelines for using Eclipse APIs.

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