Class FilePathProperty
java.lang.Object
org.csstudio.opibuilder.properties.AbstractWidgetProperty<String>
org.csstudio.opibuilder.properties.FilePathProperty
- Direct Known Subclasses:
FilePathPropertyWithFilter
The property for file path, which is represented as a String.
-
Field Summary
Fields inherited from class org.csstudio.opibuilder.properties.AbstractWidgetProperty
category, defaultValue, description, executionMode, prop_id, propertyValue, visibleInPropSheet, widgetModel
-
Constructor Summary
ConstructorDescriptionFilePathProperty
(String prop_id, String description, WidgetPropertyCategory category, String defaultValue, String[] fileExtensions) File Path Property Constructor.FilePathProperty
(String prop_id, String description, WidgetPropertyCategory category, String defaultValue, String[] fileExtensions, boolean buildAbsolutePath) File Path Property Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncheckValue
(Object value) Check if the requestNewValue is convertible or legal.boolean
Subclass should override this method if it is configurable by rule.protected PropertyDescriptor
Create theIPropertyDescriptor
readValueFromXML
(org.jdom2.Element propElement) Read the property value from a XML element.toStringInRuleScript
(String propValue) Convert to the property value string in the script generated by rule.void
writeToXML
(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, getRawPropertyValue, isDefaultValue, isSavable, isVisibleInPropSheet, onlyAcceptExpressionInRule, removeAllPropertyChangeListeners, removePropertyChangeListener, setCategory, setDefaultValue, setDescription, setExecutionMode, setPropertyValue, setPropertyValue, setPropertyValue_IgnoreOldValue, setSavable, setVisibleInPropSheet, setWidgetModel, toString
-
Constructor Details
-
FilePathProperty
public FilePathProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue, String[] fileExtensions) File Path Property Constructor. The property value type isIPath
. It will automatically build the absolute path if it is relative path.- 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.fileExtensions
- the allowed file extensions in the file open dialog.
-
FilePathProperty
public FilePathProperty(String prop_id, String description, WidgetPropertyCategory category, String defaultValue, String[] fileExtensions, boolean buildAbsolutePath) File Path Property Constructor. The property value type isIPath
.- 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.fileExtensions
- the allowed file extensions in the file open dialog.buildAbsolutePath
- true if it should automatically build the absolute path from widget model.
-
-
Method Details
-
checkValue
Description copied from class:AbstractWidgetProperty
Check if the requestNewValue is convertible or legal.- Specified by:
checkValue
in classAbstractWidgetProperty<String>
- 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:AbstractWidgetProperty
Create theIPropertyDescriptor
- Specified by:
createPropertyDescriptor
in classAbstractWidgetProperty<String>
-
getPropertyValue
- Overrides:
getPropertyValue
in classAbstractWidgetProperty<String>
-
readValueFromXML
Description copied from class:AbstractWidgetProperty
Read the property value from a XML element.- Specified by:
readValueFromXML
in classAbstractWidgetProperty<String>
-
writeToXML
public void writeToXML(org.jdom2.Element propElement) Description copied from class:AbstractWidgetProperty
Write the property value into a XML element.- Specified by:
writeToXML
in classAbstractWidgetProperty<String>
-
configurableByRule
public boolean configurableByRule()Description copied from class:AbstractWidgetProperty
Subclass should override this method if it is configurable by rule. If this returns true, the methodAbstractWidgetProperty.toStringInRuleScript(Object)
should be properly overridden too.- Overrides:
configurableByRule
in classAbstractWidgetProperty<String>
- Returns:
- true if this property is configurable by rule.
-
toStringInRuleScript
Description copied from class:AbstractWidgetProperty
Convert to the property value string in the script generated by rule.- Overrides:
toStringInRuleScript
in classAbstractWidgetProperty<String>
-