Class PropertySheetEntry
- All Implemented Interfaces:
- IPropertySheetEntry
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.
- Since:
- 3.0 (was previously internal)
- 
Field SummaryFields inherited from interface org.eclipse.ui.views.properties.IPropertySheetEntryFILTER_ID_EXPERT
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the given listener to this entry's collection of listeners.voidApply the current cell editor value.protected PropertySheetEntryFactory method to create a new childPropertySheetEntryinstance.voiddispose()Called when the entry is no longer neededprotected ColorReturns the background color for the entry.Returns the entry's category.Returns the child entries for this entry.Return a short description of the property sheet entry.protected IPropertyDescriptorReturns the descriptor for this entry.Returns the name used to display the property.Return theCellEditorused to edit the property.protected ObjectgetEditValue(int index) Returns the edit value for the object at the given index.Returns the error text to display if the value is invalid.String[]Return the filter ids used to group entries into levels such as Expert.protected FontgetFont()Returns the font for the entry.protected ColorReturns the foreground color for the entry.Returns the help context id for this entry, ornullif this entry has no help context id.getImage()Returns the image for the property value, if there is one.protected PropertySheetEntryReturns the parent of this entry.protected IPropertySourcegetPropertySource(Object object) Returns an property source for the given object.Returns the value of the objects expressed as a String.Object[]Returns the value objects of this entry.booleanReturnstrueif the entry has children.protected voidRefresh the entry tree from the root down.voidRemoves the given listener from this entry's collection of listeners.voidResets the property value to its default value if it has been changed.voidSets a property source provider for this entry.voidThePropertySheetEntryimplmentation of this method declared onIPropertySheetEntrywill obtain an editable value for the given objects and update the child entries.protected voidvalueChanged(PropertySheetEntry child) The value of the given child entry has changed.Methods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- 
Constructor Details- 
PropertySheetEntrypublic PropertySheetEntry()
 
- 
- 
Method Details- 
addPropertySheetEntryListenerDescription copied from interface:IPropertySheetEntryAdds the given listener to this entry's collection of listeners.- Specified by:
- addPropertySheetEntryListenerin interface- IPropertySheetEntry
- Parameters:
- listener- the listener to add
 
- 
applyEditorValuepublic void applyEditorValue()Description copied from interface:IPropertySheetEntryApply the current cell editor value.- Specified by:
- applyEditorValuein interface- IPropertySheetEntry
 
- 
createChildEntryFactory method to create a new childPropertySheetEntryinstance.Subclasses may overwrite to create new instances of their own class. - Returns:
- a new PropertySheetEntryinstance for the descriptor passed in
- Since:
- 3.1
 
- 
disposepublic void dispose()Description copied from interface:IPropertySheetEntryCalled when the entry is no longer needed- Specified by:
- disposein interface- IPropertySheetEntry
 
- 
getCategoryDescription copied from interface:IPropertySheetEntryReturns the entry's category.- Specified by:
- getCategoryin interface- IPropertySheetEntry
- Returns:
- the entry's category
 
- 
getChildEntriesDescription copied from interface:IPropertySheetEntryReturns the child entries for this entry.- Specified by:
- getChildEntriesin interface- IPropertySheetEntry
- Returns:
- the child entries for this entry
 
- 
getDescriptionDescription copied from interface:IPropertySheetEntryReturn a short description of the property sheet entry. Typically this description is shown in a status line when the entry is selected.- Specified by:
- getDescriptionin interface- IPropertySheetEntry
- Returns:
- the entry's description
 
- 
getDescriptorReturns the descriptor for this entry.- Returns:
- the descriptor for this entry
- Since:
- 3.1 (was previously private)
 
- 
getDisplayNameDescription copied from interface:IPropertySheetEntryReturns the name used to display the property.- Specified by:
- getDisplayNamein interface- IPropertySheetEntry
- Returns:
- the name used to display the property
 
- 
getEditorDescription copied from interface:IPropertySheetEntryReturn theCellEditorused to edit the property.- Specified by:
- getEditorin interface- IPropertySheetEntry
- Parameters:
- parent- the parent widget for the editor
- Returns:
- the CellEditorused to edit the property
 
- 
getEditValueReturns the edit value for the object at the given index.- Parameters:
- index- the value object index
- Returns:
- the edit value for the object at the given index
 
- 
getErrorTextDescription copied from interface:IPropertySheetEntryReturns the error text to display if the value is invalid.- Specified by:
- getErrorTextin interface- IPropertySheetEntry
- Returns:
- the error text to display when the value is invalid or
         null
 
- 
getFiltersDescription copied from interface:IPropertySheetEntryReturn the filter ids used to group entries into levels such as Expert. Valid values are defined as constants on this interface.- Specified by:
- getFiltersin interface- IPropertySheetEntry
- Returns:
- the filter ids used to group entries into levels such as Expert.
 
- 
getHelpContextIdsDescription copied from interface:IPropertySheetEntryReturns the help context id for this entry, ornullif this entry has no help context id.NOTE: Help support system API's changed since 2.0 and arrays of contexts are no longer supported. Thus the only valid non- nullreturn type for this method is aStringrepresenting a context id. The previously valid return types are deprecated. The plural name for this method is unfortunate.- Specified by:
- getHelpContextIdsin interface- IPropertySheetEntry
- Returns:
- the help context id for this entry
 
- 
getImageDescription copied from interface:IPropertySheetEntryReturns the image for the property value, if there is one. This image is managed by the entry it came from. Callers of this method must never dispose the returned image.- Specified by:
- getImagein interface- IPropertySheetEntry
- Returns:
- the image for this property value or null
 
- 
getParentReturns the parent of this entry.- Returns:
- the parent entry, or nullif it has no parent
- Since:
- 3.1
 
- 
getPropertySourceReturns an property source for the given object.- Parameters:
- object- an object for which to obtain a property source or- nullif a property source is not available
- Returns:
- an property source for the given object
- Since:
- 3.1 (was previously private)
 
- 
getValueAsStringDescription copied from interface:IPropertySheetEntryReturns the value of the objects expressed as a String.- Specified by:
- getValueAsStringin interface- IPropertySheetEntry
- Returns:
- the value of the objects expressed as a String
 
- 
getValuesReturns the value objects of this entry.- Returns:
- the value objects of this entry
- Since:
- 3.1 (was previously private)
 
- 
hasChildEntriespublic boolean hasChildEntries()Description copied from interface:IPropertySheetEntryReturnstrueif the entry has children.- Specified by:
- hasChildEntriesin interface- IPropertySheetEntry
- Returns:
- trueif the entry has children
 
- 
refreshFromRootprotected void refreshFromRoot()Refresh the entry tree from the root down.- Since:
- 3.1 (was previously private)
 
- 
removePropertySheetEntryListenerDescription copied from interface:IPropertySheetEntryRemoves the given listener from this entry's collection of listeners.- Specified by:
- removePropertySheetEntryListenerin interface- IPropertySheetEntry
- Parameters:
- listener- the listener to remove
 
- 
resetPropertyValuepublic void resetPropertyValue()Description copied from interface:IPropertySheetEntryResets the property value to its default value if it has been changed.Does nothing if the notion of a default value is not meaningful for the property. - Specified by:
- resetPropertyValuein interface- IPropertySheetEntry
 
- 
setPropertySourceProviderSets a property source provider for this entry. This provider is used to obtain anIPropertySourcefor each of this entries objects. If no provider is set then a default provider is used.- Parameters:
- provider- IPropertySourceProvider
 
- 
setValuesThePropertySheetEntryimplmentation of this method declared onIPropertySheetEntrywill 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 - Specified by:
- setValuesin interface- IPropertySheetEntry
- Parameters:
- objects- the new values for this entry
 
- 
valueChangedThe value of the given child entry has changed. Therefore we must set this change into our value objects.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. - Parameters:
- child- the child entry that changed its value
 
- 
getForegroundReturns the foreground color for the entry.- Returns:
- the foreground color for the entry, or nullto use the default foreground color
- Since:
- 3.7
 
- 
getBackgroundReturns the background color for the entry.- Returns:
- the background color for the entry, or nullto use the default background color
- Since:
- 3.7
 
- 
getFontReturns the font for the entry.- Returns:
- the font for the entry, or nullto use the default font
- Since:
- 3.7
 
 
-