/**
* @return the existing or new "TabText" property.
*/
private Property getTabTextProperty(final XmlObjectInfo widget) throws Exception {
Property property = (Property) widget.getArbitraryValue(this);
if (property == null) {
final DocumentElement headerElement = getHeaderElement(widget);
if (headerElement.getTagLocal().equals("header")) {
property = new XmlProperty(widget, "TabText", StringPropertyEditor.INSTANCE) {
@Override
public boolean isModified() throws Exception {
return getValue() != UNKNOWN_VALUE;
}
@Override
public Object getValue() throws Exception {
return headerElement.getTextNode().getText();
}
@Override
protected void setValueEx(Object value) throws Exception {
if (value instanceof String) {
headerElement.setText((String) value, false);
}
}
};
property.setCategory(PropertyCategory.system(7));
}
}
return property;
}