Runtime

## org.eclipse.gmf.runtime.emf.ui.properties.sections
Class UndoableModelPropertySheetEntry

    java.lang.Object
      org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertySheetEntry
          org.eclipse.gmf.runtime.emf.ui.properties.sections.UndoableModelPropertySheetEntry

All Implemented Interfaces:
  ICellEditorListener, IPropertySheetEntry

    public class UndoableModelPropertySheetEntry

extends PropertySheetEntry

An property sheet entry for elements in the model. The changes to the model element property are done through a model command executed by the `CommandManager` so that the changes can be undone by undo interval ID.

Field Summary

Fields inherited from class org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertySheetEntry
`descriptor, editor, editValue, parent, values`

Fields inherited from interface org.eclipse.ui.views.properties.IPropertySheetEntry
`FILTER_ID_EXPERT`

Constructor Summary
`UndoableModelPropertySheetEntry(IOperationHistory operationHistory)` Intializes me with an operation history through which property change commands will be executed, undone and redone.

Method Summary
`void` `applyEditorValue()`
`protected PropertySheetEntry[]` `createChildEntries(int size)` Creates a list of child `PropertySheetEntry` entries.
`protected PropertySheetEntry` `createChildEntry()` Create child entry for this `PropertySheerEntry`
`protected ICompositeCommand` `getCompositeCommand(java.lang.String propertyName)`
`org.eclipse.emf.transaction.TransactionalEditingDomain` `getEditingDomain()` Gets my editing domain.
`protected IOperationHistory` `getOperationHistory()` Gets my operation history.
`protected UndoableModelPropertySheetEntry` `getParentEntry()` Returns the parent.
`protected ICommand` `getPropertyCommand(java.lang.String propertyName, java.lang.Object object, java.lang.Object propertyId, java.lang.Object value)`
`void` `resetPropertyValue()`
`void` `setEditingDomain(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)` Sets my editing domain.
`protected void` `setValue(java.lang.Object newValue)` Set the value for this entry.
`void` `setValues(java.lang.Object[] objects)` Extracts the editing domain from the `objects` if I am the root entry.
`protected void` `valueChanged(UndoableModelPropertySheetEntry child, ICommand command)` The value of the given child entry has changed.

Methods inherited from class org.eclipse.gmf.runtime.emf.ui.properties.sections.PropertySheetEntry

`addPropertySheetEntryListener, cancelEditor, computeMergedPropertyDescriptors, computePropertyDescriptorsFor, createChildEntries, dispose, editorValueChanged, getCategory, getChildEntries, getDescription, getDescriptor, getDisplayName, getEditor, getEditValue, getErrorText, getFilters, getHelpContextIds, getImage, getPropertySource, getValueAsString, getValues, hasChildEntries, refreshValues, removePropertySheetEntryListener, setErrorText, setPropertySourceProvider, valueChanged`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UndoableModelPropertySheetEntry

    public UndoableModelPropertySheetEntry(IOperationHistory operationHistory)

  Intializes me with an operation history through which property change commands will be executed, undone and redone.

  Parameters:
    `operationHistory` - my operation history

Method Detail

### setEditingDomain

    public void setEditingDomain(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)

  Sets my editing domain.

  Parameters:
    `editingDomain` - my editing domain

### getEditingDomain

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

  Gets my editing domain. The root entry stores the editing domain.

  Returns:
    my editing domain

### applyEditorValue

    public void applyEditorValue()

  Specified by:
    `applyEditorValue` in interface `ICellEditorListener`
  Specified by:
    `applyEditorValue` in interface `IPropertySheetEntry`
  Overrides:
    `applyEditorValue` in class `PropertySheetEntry`

### resetPropertyValue

    public void resetPropertyValue()

  Specified by:
    `resetPropertyValue` in interface `IPropertySheetEntry`
  Overrides:
    `resetPropertyValue` in class `PropertySheetEntry`

### setValue

    protected void setValue(java.lang.Object newValue)

  Set the value for this entry.

  We set the given value as the value for all our value objects. We then call our parent to update the property we represent with the given value. We then trigger a model refresh.

  Overrides:
    `setValue` in class `PropertySheetEntry`
  Parameters:
    `newValue` - the new value

### valueChanged

    protected void valueChanged(UndoableModelPropertySheetEntry child,
                                ICommand command)

  The value of the given child entry has changed. Therefore we must set this change into our value objects.

  We must inform our parent so that it can update its value objects

  Subclasses may override to set the property value in some custom way.

  Parameters:
    `child` - the child entry that changed its value
    `command` - the command into which to compose my property chnage command

### setValues

    public void setValues(java.lang.Object[] objects)

  Extracts the editing domain from the `objects` if I am the root entry.

  Specified by:
    `setValues` in interface `IPropertySheetEntry`
  Overrides:
    `setValues` in class `PropertySheetEntry`
  Parameters:
    `objects` - the new values for this entry

### getOperationHistory

    protected final IOperationHistory getOperationHistory()

  Gets my operation history.

  Returns:
    my operation history

### getParentEntry

    protected UndoableModelPropertySheetEntry getParentEntry()

  Returns the parent. This can be another `PropertySheetEntry` or `null`.

### getPropertyCommand

    protected ICommand getPropertyCommand(java.lang.String propertyName,
                                          java.lang.Object object,
                                          java.lang.Object propertyId,
                                          java.lang.Object value)

### getCompositeCommand

    protected ICompositeCommand getCompositeCommand(java.lang.String propertyName)

### createChildEntries

    protected PropertySheetEntry[] createChildEntries(int size)

  Description copied from class: `PropertySheetEntry`
  Creates a list of child `PropertySheetEntry` entries.

  Overrides:
    `createChildEntries` in class `PropertySheetEntry`
  Parameters:
    `size` - list size
  Returns:
    list of child `PropertySheerEntry`

### createChildEntry

    protected PropertySheetEntry createChildEntry()

  Description copied from class: `PropertySheetEntry`
  Create child entry for this `PropertySheerEntry`

  Overrides:
    `createChildEntry` in class `PropertySheetEntry`
  Returns:
    child `PropertySheetEntry`

Runtime

Guidelines for using Eclipse APIs.

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