Class FontProperty
java.lang.Object
org.csstudio.opibuilder.properties.AbstractWidgetProperty<OPIFont>
org.csstudio.opibuilder.properties.FontProperty
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML attribute namefontName.static final StringXML attribute namefontName.static final Stringstatic final StringXML attribute namefontName.static final StringXML attribute namefont.static final StringXML attribute namefontName.Fields inherited from class org.csstudio.opibuilder.properties.AbstractWidgetProperty
category, defaultValue, description, executionMode, prop_id, propertyValue, visibleInPropSheet, widgetModel -
Constructor Summary
ConstructorsConstructorDescriptionFontProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue) Font Property Constructor.FontProperty(String prop_id, String description, WidgetPropertyCategory category, FontData defaultValue) Font Property Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncheckValue(Object value) Check if the requestNewValue is convertible or legal.booleanSubclass should override this method if it is configurable by rule.protected PropertyDescriptorCreate theIPropertyDescriptorreadValueFromXML(org.jdom2.Element propElement) Read the property value from a XML element.toStringInRuleScript(OPIFont opiFont) Convert to the property value string in the script generated by rule.voidwriteToXML(org.jdom2.Element propElement) Write the property value into a XML element.Methods inherited from class org.csstudio.opibuilder.properties.AbstractWidgetProperty
addPropertyChangeListener, firePropertyChange, getAllPropertyChangeListeners, getCategory, getDefaultValue, getDescription, getExecutionMode, getPropertyDescriptor, getPropertyID, getPropertyValue, getRawPropertyValue, isDefaultValue, isSavable, isVisibleInPropSheet, onlyAcceptExpressionInRule, removeAllPropertyChangeListeners, removePropertyChangeListener, setCategory, setDefaultValue, setDescription, setExecutionMode, setPropertyValue, setPropertyValue, setPropertyValue_IgnoreOldValue, setSavable, setVisibleInPropSheet, setWidgetModel, toString
-
Field Details
-
XML_ELEMENT_FONT
XML attribute namefont.- See Also:
-
XML_ELEMENT_FONTNAME
XML attribute namefontName.- See Also:
-
XML_ATTRIBUTE_FONT_NAME
XML attribute namefontName.- See Also:
-
XML_ATTRIBUTE_FONT_HEIGHT
XML attribute namefontName.- See Also:
-
XML_ATTRIBUTE_FONT_STYLE
XML attribute namefontName.- See Also:
-
XML_ATTRIBUTE_FONT_PIXELS
- See Also:
-
-
Constructor Details
-
FontProperty
public FontProperty(String prop_id, String description, WidgetPropertyCategory category, FontData defaultValue) Font Property Constructor. The property value type isOPIFont.- Parameters:
prop_id- the property id which should be unique in a widget model.description- the description of the property, which will be shown as the property name in property sheet.category- the category of the widget.defaultValue- the default value when the widget is first created.
-
FontProperty
public FontProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue) Font Property Constructor. The property value type isOPIFont.- Parameters:
prop_id- the property id which should be unique in a widget model.description- the description of the property, which will be shown as the property name in property sheet.category- the category of the widget.defaultValue- the default value when the widget is first created. It must be a exist font macro name in font file.
-
-
Method Details
-
checkValue
Description copied from class:AbstractWidgetPropertyCheck if the requestNewValue is convertible or legal.- Specified by:
checkValuein classAbstractWidgetProperty<OPIFont>- Parameters:
value- the value to be checked.- Returns:
- The value after being checked. It might be coerced if the requestValue is illegal. return null if it is not convertible or illegal.
-
createPropertyDescriptor
Description copied from class:AbstractWidgetPropertyCreate theIPropertyDescriptor- Specified by:
createPropertyDescriptorin classAbstractWidgetProperty<OPIFont>
-
writeToXML
public void writeToXML(org.jdom2.Element propElement) Description copied from class:AbstractWidgetPropertyWrite the property value into a XML element.- Specified by:
writeToXMLin classAbstractWidgetProperty<OPIFont>
-
readValueFromXML
Description copied from class:AbstractWidgetPropertyRead the property value from a XML element.- Specified by:
readValueFromXMLin classAbstractWidgetProperty<OPIFont>
-
configurableByRule
public boolean configurableByRule()Description copied from class:AbstractWidgetPropertySubclass should override this method if it is configurable by rule. If this returns true, the methodAbstractWidgetProperty.toStringInRuleScript(Object)should be properly overridden too.- Overrides:
configurableByRulein classAbstractWidgetProperty<OPIFont>- Returns:
- true if this property is configurable by rule.
-
toStringInRuleScript
Description copied from class:AbstractWidgetPropertyConvert to the property value string in the script generated by rule.- Overrides:
toStringInRuleScriptin classAbstractWidgetProperty<OPIFont>
-