|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.views.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(IPropertySheetEntryListener listener)
Adds the given listener to this entry's collection of listeners. |
void |
applyEditorValue()
Apply the current cell editor value. |
void |
dispose()
Called when the entry is no longer needed |
String |
getCategory()
Returns the entry's category. |
IPropertySheetEntry[] |
getChildEntries()
Returns the child entries for this entry. |
String |
getDescription()
Return a short description of the property sheet entry. |
String |
getDisplayName()
Returns the name used to display the property. |
CellEditor |
getEditor(Composite parent)
Return the CellEditor used to edit the property. |
protected Object |
getEditValue(int index)
Returns the edit value for the object at the given index. |
String |
getErrorText()
Returns the error text to display if the value is invalid. |
String[] |
getFilters()
Return the filter ids used to group entries into levels such as Expert. |
Object |
getHelpContextIds()
Returns the help context id for this entry, or null if
this entry has no help context id.
|
Image |
getImage()
Returns the image for the property value, if there is one. |
String |
getValueAsString()
Returns the value of the objects expressed as a String. |
boolean |
hasChildEntries()
Returns true if the entry has children. |
void |
removePropertySheetEntryListener(IPropertySheetEntryListener listener)
Removes the given listener from this entry's collection of listeners. |
void |
resetPropertyValue()
Resets the property value to its default value if it has been changed. |
void |
setPropertySourceProvider(IPropertySourceProvider provider)
Sets a property source provider for this entry. |
void |
setValues(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(IPropertySheetEntryListener listener)
IPropertySheetEntry
addPropertySheetEntryListener
in interface IPropertySheetEntry
listener
- the listener to addpublic void applyEditorValue()
IPropertySheetEntry
applyEditorValue
in interface IPropertySheetEntry
public void dispose()
IPropertySheetEntry
dispose
in interface IPropertySheetEntry
public String getCategory()
IPropertySheetEntry
getCategory
in interface IPropertySheetEntry
public IPropertySheetEntry[] getChildEntries()
IPropertySheetEntry
getChildEntries
in interface IPropertySheetEntry
public String getDescription()
IPropertySheetEntry
getDescription
in interface IPropertySheetEntry
public String getDisplayName()
IPropertySheetEntry
getDisplayName
in interface IPropertySheetEntry
public CellEditor getEditor(Composite parent)
IPropertySheetEntry
CellEditor
used to edit the property.
getEditor
in interface IPropertySheetEntry
parent
- the parent widget for the editor
CellEditor
used to edit the propertyprotected Object getEditValue(int index)
index
- the value object index
public String getErrorText()
IPropertySheetEntry
getErrorText
in interface IPropertySheetEntry
null
public String[] getFilters()
IPropertySheetEntry
getFilters
in interface IPropertySheetEntry
public Object getHelpContextIds()
IPropertySheetEntry
null
if
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- null
return type for this method
is a String
representing a context id. The previously
valid return types are deprecated. The plural name for this method is
unfortunate.
getHelpContextIds
in interface IPropertySheetEntry
public Image getImage()
IPropertySheetEntry
getImage
in interface IPropertySheetEntry
null
public String getValueAsString()
IPropertySheetEntry
getValueAsString
in interface IPropertySheetEntry
public boolean hasChildEntries()
IPropertySheetEntry
true
if the entry has children.
hasChildEntries
in interface IPropertySheetEntry
true
if the entry has childrenpublic void removePropertySheetEntryListener(IPropertySheetEntryListener listener)
IPropertySheetEntry
removePropertySheetEntryListener
in interface IPropertySheetEntry
listener
- the listener to removepublic void resetPropertyValue()
IPropertySheetEntry
Does nothing if the notion of a default value is not meaningful for the property.
resetPropertyValue
in interface IPropertySheetEntry
public void setPropertySourceProvider(IPropertySourceProvider provider)
IPropertySource
for each of this entries objects. If no provider is
set then a default provider is used.
provider
- IPropertySourceProviderpublic void setValues(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 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
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.