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 command stack.
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(CommandStack commandStack)
Constructs the root entry using the given command stack.
|
Modifier and Type | Method and Description |
---|---|
protected PropertySheetEntry |
createChildEntry() |
void |
dispose() |
protected CommandStack |
getCommandStack()
Returns the
CommandStack that is used by this entry. |
void |
resetPropertyValue() |
protected void |
valueChanged(PropertySheetEntry child) |
addPropertySheetEntryListener, applyEditorValue, getBackground, getCategory, getChildEntries, getDescription, getDescriptor, getDisplayName, getEditor, getEditValue, getErrorText, getFilters, getFont, getForeground, getHelpContextIds, getImage, getParent, getPropertySource, getValueAsString, getValues, hasChildEntries, refreshFromRoot, removePropertySheetEntryListener, setPropertySourceProvider, setValues
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public UndoablePropertySheetEntry(CommandStack commandStack)
commandStack
- the command stack to useprotected PropertySheetEntry createChildEntry()
createChildEntry
in class PropertySheetEntry
PropertySheetEntry.createChildEntry()
public void dispose()
dispose
in interface IPropertySheetEntry
dispose
in class PropertySheetEntry
IPropertySheetEntry.dispose()
protected CommandStack getCommandStack()
CommandStack
that is used by this entry. It is
obtained from the parent in case the entry is not a root entry.CommandStack
to be used.public void resetPropertyValue()
resetPropertyValue
in interface IPropertySheetEntry
resetPropertyValue
in class PropertySheetEntry
IPropertySheetEntry.resetPropertyValue()
protected void valueChanged(PropertySheetEntry child)
valueChanged
in class PropertySheetEntry
PropertySheetEntry.valueChanged(PropertySheetEntry)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.