public abstract class PropertyEditorBase extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.zkoss.zul.impl.XulElement |
component |
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyEditorBase(String template)
Create property editor using the specified template.
|
protected |
PropertyEditorBase(org.zkoss.zul.impl.XulElement component)
Create property editor using the specified component for editing.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
commit()
Commit the changed value.
|
org.zkoss.zul.impl.XulElement |
getComponent()
Returns the component used to edit the property.
|
PropertyInfo |
getPropInfo()
Returns the PropertyInfo object associated with this editor.
|
UIElementBase |
getTarget()
Returns the target UI element 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(UIElementBase target,
PropertyInfo propInfo,
PropertyGrid propGrid)
Initializes the property editor.
|
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 PropertyEditorBase(String template) throws Exception
template - The template to create the editing component.Exception - Unspecified exception.protected PropertyEditorBase(org.zkoss.zul.impl.XulElement component)
component - The component used to edit the property.public org.zkoss.zul.impl.XulElement getComponent()
protected abstract Object getValue()
protected abstract void setValue(Object value)
value - Value for the editor component.public boolean hasChanged()
public PropertyInfo getPropInfo()
public UIElementBase getTarget()
public void updateValue()
public void setFocus()
protected void init(UIElementBase target, PropertyInfo propInfo, PropertyGrid propGrid)
target - The target UI element.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.Copyright © 2016 Regenstrief Center for Biomedical Informatics. All rights reserved.