public class UndoablePropertySheetEntry extends PropertySheetEntry
UndoablePropertySheetEntry provides undo support for changes made to
IPropertySources by the PropertySheetViewer. Clients can construct a
PropertySheetPage and use this class
as the root entry. All changes made to property sources displayed on that
page will be done using the provided IOperationHistory.
NOTE: If you intend to use an IPropertySourceProvider for a PropertySheetPage whose root entry is an instance of of UndoablePropertySheetEntry, you should set the IPropertySourceProvider on that root entry, rather than the PropertySheetPage.
FILTER_ID_EXPERT| Constructor and Description |
|---|
UndoablePropertySheetEntry(IOperationHistory operationHistory,
IUndoContext undoContext)
Constructs the root entry using the given
IOperationHistory. |
| Modifier and Type | Method and Description |
|---|---|
protected PropertySheetEntry |
createChildEntry() |
void |
dispose() |
protected IOperationHistory |
getOperationHistory()
Returns the
IOperationHistory that is used by this entry. |
void |
resetPropertyValue() |
protected void |
valueChanged(PropertySheetEntry child) |
protected void |
valueChanged(UndoablePropertySheetEntry child,
ITransactionalOperation operation)
Update parent entry about change, being encapsulated into the given
operation.
|
addPropertySheetEntryListener, applyEditorValue, getBackground, getCategory, getChildEntries, getDescription, getDescriptor, getDisplayName, getEditor, getEditValue, getErrorText, getFilters, getFont, getForeground, getHelpContextIds, getImage, getParent, getPropertySource, getValueAsString, getValues, hasChildEntries, refreshFromRoot, removePropertySheetEntryListener, setPropertySourceProvider, setValuesaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectpublic UndoablePropertySheetEntry(IOperationHistory operationHistory, IUndoContext undoContext)
IOperationHistory.operationHistory - the operation history to useundoContext - the undo context to useprotected PropertySheetEntry createChildEntry()
createChildEntry in class PropertySheetEntryPropertySheetEntry.createChildEntry()public void dispose()
dispose in interface IPropertySheetEntrydispose in class PropertySheetEntryIPropertySheetEntry.dispose()protected IOperationHistory getOperationHistory()
IOperationHistory that is used by this entry. It is
obtained from the parent in case the entry is not a root entry.IOperationHistory to be used.public void resetPropertyValue()
resetPropertyValue in interface IPropertySheetEntryresetPropertyValue in class PropertySheetEntryIPropertySheetEntry.resetPropertyValue()protected void valueChanged(PropertySheetEntry child)
valueChanged in class PropertySheetEntryPropertySheetEntry.valueChanged(PropertySheetEntry)protected void valueChanged(UndoablePropertySheetEntry child, ITransactionalOperation operation)
child - The child entry that changed.operation - An operation encapsulating the change.Copyright (c) 2014 itemis AG and others. All rights reserved.