/** * The <code>PropertySheetEntry</code> implmentation of this method declared on<code> * IPropertySheetEntry</code> will obtain an editable value for the given objects and update the * child entries. * * <p>Updating the child entries will typically call this method on the child entries and thus the * entire entry tree is updated * * @param objects the new values for this entry */ public void setValues(Object[] objects) { values = objects; sources = new HashMap(values.length * 2 + 1); if (values.length == 0) editValue = null; else { // set the first value object as the entry's value Object newValue = values[0]; // see if we should convert the value to an editable value IPropertySource source = getPropertySource(newValue); if (source != null) newValue = source.getEditableValue(); editValue = newValue; } // update our child entries refreshChildEntries(); // inform listeners that our value changed fireValueChanged(); }
/** Refresh the entry tree from the root down */ private void refreshFromRoot() { if (parent == null) refreshChildEntries(); else parent.refreshFromRoot(); }