|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.internal.ui.properties.PropertySheetEntry
org.eclipse.gef.internal.ui.properties.UndoablePropertySheetEntry
PropertySheetEntry
is an implementation of
IPropertySheetEntry
which uses IPropertySource
and IPropertyDescriptor
to interact with domain model objects.
Every property sheet entry has a single descriptor (except the root entry which has none). This descriptor determines what property of its objects it will display/edit.
Entries do not listen for changes in their objects. Since there is no restriction on properties being independent, a change in one property may affect other properties. The value of a parent's property may also change. As a result we are forced to refresh the entire entry tree when a property changes value.
Field Summary | |
protected CommandStack |
stack
|
Fields inherited from interface org.eclipse.ui.views.properties.IPropertySheetEntry |
FILTER_ID_EXPERT |
Constructor Summary | |
UndoablePropertySheetEntry()
|
|
UndoablePropertySheetEntry(CommandStack stack)
|
Method Summary | |
protected PropertySheetEntry[] |
createChildEntries(int size)
Return an array of property sheet entries |
protected PropertySheetEntry |
createChildEntry()
Return a new PropertySheetEntry . |
void |
dispose()
|
protected CommandStack |
getCommandStack()
returns the Command stack from the root entry |
void |
resetPropertyValue()
|
void |
setCommandStack(CommandStack stack)
|
protected void |
setValue(java.lang.Object newValue)
Set the value for this entry. |
protected void |
valueChanged(UndoablePropertySheetEntry child,
CompoundCommand command)
The value of the given child entry has changed. |
Methods inherited from class org.eclipse.gef.internal.ui.properties.PropertySheetEntry |
addPropertySheetEntryListener, applyEditorValue, computeMergedPropertyDescriptors, getCategory, getChildEntries, getDescription, getDescriptor, getDisplayName, getEditor, getEditValue, getErrorText, getFilters, getHelpContextIds, getImage, getParent, getPropertySource, getValueAsString, getValues, hasChildEntries, refreshFromRoot, removePropertySheetEntryListener, setPropertySourceProvider, setValues, valueChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected CommandStack stack
Constructor Detail |
public UndoablePropertySheetEntry()
public UndoablePropertySheetEntry(CommandStack stack)
Method Detail |
protected PropertySheetEntry[] createChildEntries(int size)
createChildEntries
in class PropertySheetEntry
size
- size of the new array
protected PropertySheetEntry createChildEntry()
PropertySheetEntry
PropertySheetEntry
.
createChildEntry
in class PropertySheetEntry
PropertySheetEntry
public void dispose()
dispose
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
dispose
in class PropertySheetEntry
protected CommandStack getCommandStack()
public void resetPropertyValue()
resetPropertyValue
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
resetPropertyValue
in class PropertySheetEntry
public void setCommandStack(CommandStack stack)
protected void setValue(java.lang.Object newValue)
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.
setValue
in class PropertySheetEntry
newValue
- the new valueprotected void valueChanged(UndoablePropertySheetEntry child, CompoundCommand command)
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.
child
- the child entry that changed its value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |