Search in sources :

Example 21 with StringProperty

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);
}
Also used : IPath(org.eclipse.core.runtime.IPath) Path(org.eclipse.core.runtime.Path) PropertyChangeEvent(java.beans.PropertyChangeEvent) PropertyChangeListener(java.beans.PropertyChangeListener) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Aggregations

StringProperty (org.csstudio.opibuilder.properties.StringProperty)21 BooleanProperty (org.csstudio.opibuilder.properties.BooleanProperty)16 IntegerProperty (org.csstudio.opibuilder.properties.IntegerProperty)12 ColorProperty (org.csstudio.opibuilder.properties.ColorProperty)8 ComboProperty (org.csstudio.opibuilder.properties.ComboProperty)8 PropertyChangeEvent (java.beans.PropertyChangeEvent)4 PropertyChangeListener (java.beans.PropertyChangeListener)4 FilePathProperty (org.csstudio.opibuilder.properties.FilePathProperty)4 FontProperty (org.csstudio.opibuilder.properties.FontProperty)4 ActionsProperty (org.csstudio.opibuilder.properties.ActionsProperty)3 DoubleProperty (org.csstudio.opibuilder.properties.DoubleProperty)3 PVNameProperty (org.csstudio.opibuilder.properties.PVNameProperty)3 PVValueProperty (org.csstudio.opibuilder.properties.PVValueProperty)3 WidgetPropertyCategory (org.csstudio.opibuilder.properties.WidgetPropertyCategory)3 IPath (org.eclipse.core.runtime.IPath)3 Path (org.eclipse.core.runtime.Path)3 NameDefinedCategory (org.csstudio.opibuilder.properties.NameDefinedCategory)2 IPV (org.csstudio.simplepv.IPV)2 RGB (org.eclipse.swt.graphics.RGB)2 UID (java.rmi.server.UID)1