Package org.eclipse.gef.ui.properties
Class UndoablePropertySheetEntry
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.views.properties.PropertySheetEntry
-
- org.eclipse.gef.ui.properties.UndoablePropertySheetEntry
-
- All Implemented Interfaces:
IPropertySheetEntry
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.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.ui.views.properties.IPropertySheetEntry
FILTER_ID_EXPERT
-
-
Constructor Summary
Constructors Constructor Description UndoablePropertySheetEntry(CommandStack commandStack)
Constructs the root entry using the given command stack.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PropertySheetEntry
createChildEntry()
void
dispose()
protected CommandStack
getCommandStack()
Returns theCommandStack
that is used by this entry.void
resetPropertyValue()
protected void
valueChanged(PropertySheetEntry child)
-
Methods inherited from class org.eclipse.ui.views.properties.PropertySheetEntry
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
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Constructor Detail
-
UndoablePropertySheetEntry
public UndoablePropertySheetEntry(CommandStack commandStack)
Constructs the root entry using the given command stack.- Parameters:
commandStack
- the command stack to use- Since:
- 3.1
-
-
Method Detail
-
createChildEntry
protected PropertySheetEntry createChildEntry()
- Overrides:
createChildEntry
in classPropertySheetEntry
- See Also:
PropertySheetEntry.createChildEntry()
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceIPropertySheetEntry
- Overrides:
dispose
in classPropertySheetEntry
- See Also:
IPropertySheetEntry.dispose()
-
getCommandStack
protected CommandStack getCommandStack()
Returns theCommandStack
that is used by this entry. It is obtained from the parent in case the entry is not a root entry.- Returns:
- the
CommandStack
to be used. - Since:
- 3.7
-
resetPropertyValue
public void resetPropertyValue()
- Specified by:
resetPropertyValue
in interfaceIPropertySheetEntry
- Overrides:
resetPropertyValue
in classPropertySheetEntry
- See Also:
IPropertySheetEntry.resetPropertyValue()
-
valueChanged
protected void valueChanged(PropertySheetEntry child)
- Overrides:
valueChanged
in classPropertySheetEntry
- See Also:
PropertySheetEntry.valueChanged(PropertySheetEntry)
-
-