|
||||||||||
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
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 |
Fields inherited from interface org.eclipse.ui.views.properties.IPropertySheetEntry |
FILTER_ID_EXPERT |
Constructor Summary | |
PropertySheetEntry()
|
Method Summary | |
void |
addPropertySheetEntryListener(org.eclipse.ui.views.properties.IPropertySheetEntryListener listener)
|
void |
applyEditorValue()
|
protected java.util.List |
computeMergedPropertyDescriptors()
Return the sorted intersection of all the IPropertyDescriptor s
for the objects. |
protected PropertySheetEntry[] |
createChildEntries(int size)
Return a new array of property sheet entries of the given size |
protected PropertySheetEntry |
createChildEntry()
Return a new PropertySheetEntry . |
void |
dispose()
|
java.lang.String |
getCategory()
|
org.eclipse.ui.views.properties.IPropertySheetEntry[] |
getChildEntries()
|
java.lang.String |
getDescription()
|
protected org.eclipse.ui.views.properties.IPropertyDescriptor |
getDescriptor()
Returns the descriptor for this entry. |
java.lang.String |
getDisplayName()
|
org.eclipse.jface.viewers.CellEditor |
getEditor(org.eclipse.swt.widgets.Composite parent)
|
protected java.lang.Object |
getEditValue(int index)
Returns the edit value for the object at the given index. |
java.lang.String |
getErrorText()
|
java.lang.String[] |
getFilters()
|
java.lang.Object |
getHelpContextIds()
|
org.eclipse.swt.graphics.Image |
getImage()
|
protected PropertySheetEntry |
getParent()
Returns the parent PropertySheetEntry |
protected org.eclipse.ui.views.properties.IPropertySource |
getPropertySource(java.lang.Object object)
Returns an property source for the given object. |
java.lang.String |
getValueAsString()
|
java.lang.Object[] |
getValues()
Returns the value objects of this entry. |
boolean |
hasChildEntries()
|
protected void |
refreshFromRoot()
Refresh the entry tree from the root down |
void |
removePropertySheetEntryListener(org.eclipse.ui.views.properties.IPropertySheetEntryListener listener)
|
void |
resetPropertyValue()
|
void |
setPropertySourceProvider(org.eclipse.ui.views.properties.IPropertySourceProvider provider)
Sets a property source provider for this entry. |
protected void |
setValue(java.lang.Object newValue)
Set the value for this entry. |
void |
setValues(java.lang.Object[] objects)
The PropertySheetEntry implmentation of this
method declared onIPropertySheetEntry will
obtain an editable value for the given objects and update
the child entries. |
protected void |
valueChanged(PropertySheetEntry child)
The value of the given child entry has changed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertySheetEntry()
Method Detail |
public void addPropertySheetEntryListener(org.eclipse.ui.views.properties.IPropertySheetEntryListener listener)
addPropertySheetEntryListener
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public void applyEditorValue()
applyEditorValue
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
protected java.util.List computeMergedPropertyDescriptors()
IPropertyDescriptor
s
for the objects.
Made protected due to Bug 63383.
protected PropertySheetEntry[] createChildEntries(int size)
size
- size of the new array
protected PropertySheetEntry createChildEntry()
PropertySheetEntry
.
PropertySheetEntry
public void dispose()
dispose
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public java.lang.String getCategory()
getCategory
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public org.eclipse.ui.views.properties.IPropertySheetEntry[] getChildEntries()
getChildEntries
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public java.lang.String getDescription()
getDescription
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
protected org.eclipse.ui.views.properties.IPropertyDescriptor getDescriptor()
public java.lang.String getDisplayName()
getDisplayName
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public org.eclipse.jface.viewers.CellEditor getEditor(org.eclipse.swt.widgets.Composite parent)
getEditor
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
protected java.lang.Object getEditValue(int index)
index
- the value object index
public java.lang.String getErrorText()
getErrorText
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public java.lang.String[] getFilters()
getFilters
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public java.lang.Object getHelpContextIds()
getHelpContextIds
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public org.eclipse.swt.graphics.Image getImage()
getImage
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
protected PropertySheetEntry getParent()
PropertySheetEntry
protected org.eclipse.ui.views.properties.IPropertySource getPropertySource(java.lang.Object object)
object
- an object for which to obtain a property source or
null
if a property source is not available
public java.lang.String getValueAsString()
getValueAsString
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public java.lang.Object[] getValues()
public boolean hasChildEntries()
hasChildEntries
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
protected void refreshFromRoot()
public void removePropertySheetEntryListener(org.eclipse.ui.views.properties.IPropertySheetEntryListener listener)
removePropertySheetEntryListener
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public void resetPropertyValue()
resetPropertyValue
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
public void setPropertySourceProvider(org.eclipse.ui.views.properties.IPropertySourceProvider provider)
IPropertySource
for each of this entries objects. If no provider is
set then a default provider is used.
provider
- IPropertySourceProviderprotected 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.
newValue
- the new valuepublic void setValues(java.lang.Object[] objects)
PropertySheetEntry
implmentation of this
method declared onIPropertySheetEntry
will
obtain an editable value for the given objects and update
the child entries.
Updating the child entries will typically call this method on the child entries and thus the entire entry tree is updated
setValues
in interface org.eclipse.ui.views.properties.IPropertySheetEntry
objects
- the new values for this entryprotected void valueChanged(PropertySheetEntry child)
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 |