use of org.csstudio.opibuilder.properties.StringProperty in project yamcs-studio by yamcs.
the class AbstractExecuteScriptAction method configureProperties.
@Override
protected void configureProperties() {
addProperty(new FilePathProperty(PROP_PATH, "File Path", WidgetPropertyCategory.Basic, new Path(""), new String[] { getFileExtension() }, false));
addProperty(new StringProperty(PROP_SCRIPT_TEXT, "Script Text", WidgetPropertyCategory.Basic, getScriptHeader(), true, true));
BooleanProperty embeddedProperty = new BooleanProperty(PROP_EMBEDDED, "Embedded", WidgetPropertyCategory.Basic, false);
embeddedProperty.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
getProperty(PROP_PATH).setVisibleInPropSheet(!((Boolean) evt.getNewValue()));
getProperty(PROP_SCRIPT_TEXT).setVisibleInPropSheet(((Boolean) evt.getNewValue()));
}
});
addProperty(embeddedProperty);
getProperty(PROP_SCRIPT_TEXT).setVisibleInPropSheet(false);
}
Aggregations