T - The input component class.public abstract class PropertyEditorBase<T extends org.fujion.component.BaseUIComponent> extends Object implements Comparable<PropertyEditorBase<T>>
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyEditorBase(String template)
Create property editor using the specified template.
|
protected |
PropertyEditorBase(T editor)
Create property editor using the specified component for editing.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
commit()
Commit the changed value.
|
int |
compareTo(PropertyEditorBase<T> o) |
T |
getEditor()
Returns the component used to edit the property.
|
PropertyInfo |
getPropInfo()
Returns the PropertyInfo object associated with this editor.
|
Object |
getTarget()
Returns the target object associated with this editor.
|
protected abstract Object |
getValue()
Logic to return the value from the editor component.
|
boolean |
hasChanged()
Returns true if the property value has been changed since the last commit.
|
protected void |
init(Object target,
PropertyInfo propInfo,
PropertyGrid propGrid)
Initializes the property editor.
|
protected void |
onChange(org.fujion.event.ChangeEvent event)
Notify the property grid that the value has changed.
|
boolean |
revert()
Revert changes to the property value.
|
void |
setFocus()
Sets focus to the editor component.
|
protected abstract void |
setValue(Object value)
Logic to set the value in the editor component.
|
void |
setWrongValueException(Throwable exc)
Updates the wrong value message at the client.
|
void |
setWrongValueMessage(String message)
Updates the wrong value message at the client.
|
void |
updateValue()
Updates the last committed value.
|
protected void |
wireController() |
protected final T extends org.fujion.component.BaseUIComponent editor
protected PropertyEditorBase(String template)
template - The template to create the editing component.protected PropertyEditorBase(T editor)
editor - The component used to edit the property.protected void wireController()
public T getEditor()
protected abstract Object getValue()
protected abstract void setValue(Object value)
value - Value for the editor component.public boolean hasChanged()
public PropertyInfo getPropInfo()
public Object getTarget()
public void updateValue()
public void setFocus()
protected void init(Object target, PropertyInfo propInfo, PropertyGrid propGrid)
target - The target object.propInfo - The PropertyInfo instance reflecting the property being edited on the target.propGrid - The property grid owning this property editor.public boolean commit()
public boolean revert()
public void setWrongValueException(Throwable exc)
exc - The exception to display.public void setWrongValueMessage(String message)
message - If null, any existing message is removed. Otherwise, the specified method is
displayed next to the editor component.public int compareTo(PropertyEditorBase<T> o)
compareTo in interface Comparable<PropertyEditorBase<T extends org.fujion.component.BaseUIComponent>>@EventHandler(value="change",
target="@editor")
protected void onChange(org.fujion.event.ChangeEvent event)
event - The change event.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.