Search in sources :

Example 6 with FilePathProperty

use of org.csstudio.opibuilder.properties.FilePathProperty in project yamcs-studio by yamcs.

the class ImageBoolButtonModel method configureProperties.

@Override
protected void configureProperties() {
    super.configureProperties();
    addProperty(new FilePathProperty(PROP_ON_IMAGE, "On Image", WidgetPropertyCategory.Image, "", FILE_EXTENSIONS));
    addProperty(new FilePathProperty(PROP_OFF_IMAGE, "Off Image", WidgetPropertyCategory.Image, "", FILE_EXTENSIONS));
    addProperty(new BooleanProperty(PROP_STRETCH, "Stretch to Fit", WidgetPropertyCategory.Image, false));
    addProperty(new BooleanProperty(PROP_AUTOSIZE, "Auto Size", WidgetPropertyCategory.Image, true));
    addProperty(new BooleanProperty(PROP_NO_ANIMATION, "No Animation", WidgetPropertyCategory.Image, false));
    addProperty(new BooleanProperty(PROP_ALIGN_TO_NEAREST_SECOND, "Animation aligned to the nearest second", WidgetPropertyCategory.Image, false));
    removeProperty(PROP_ACTIONS);
    addProperty(new ActionsProperty(PROP_ACTIONS, "Actions", WidgetPropertyCategory.Behavior, false));
    setPropertyVisible(PROP_ON_COLOR, false);
    setPropertyVisible(PROP_OFF_COLOR, false);
    FigureTransparencyHelper.addProperty(this);
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) ActionsProperty(org.csstudio.opibuilder.properties.ActionsProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Example 7 with FilePathProperty

use of org.csstudio.opibuilder.properties.FilePathProperty in project yamcs-studio by yamcs.

the class ImageModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new FilePathProperty(PROP_IMAGE_FILE, "Image File", WidgetPropertyCategory.Basic, "", FILE_EXTENSIONS));
    addProperty(new IntegerProperty(PROP_TOPCROP, "Crop Top", WidgetPropertyCategory.Image, 0));
    addProperty(new IntegerProperty(PROP_BOTTOMCROP, "Crop Bottom", WidgetPropertyCategory.Image, 0));
    addProperty(new IntegerProperty(PROP_LEFTCROP, "Crop Left", WidgetPropertyCategory.Image, 0));
    addProperty(new IntegerProperty(PROP_RIGHTCROP, "Crop Right", WidgetPropertyCategory.Image, 0));
    addProperty(new BooleanProperty(PROP_STRETCH, "Stretch to Fit", WidgetPropertyCategory.Image, false));
    addProperty(new BooleanProperty(PROP_AUTOSIZE, "Auto Size", WidgetPropertyCategory.Image, true));
    addProperty(new BooleanProperty(PROP_NO_ANIMATION, "No Animation", WidgetPropertyCategory.Image, false));
    addProperty(new BooleanProperty(PROP_ALIGN_TO_NEAREST_SECOND, "Animation aligned to the nearest second", WidgetPropertyCategory.Image, false));
    addProperty(new ComboProperty(PROP_DEGREE, "Rotation Angle", WidgetPropertyCategory.Image, allowedDegrees, 0));
    addProperty(new BooleanProperty(PROP_FLIP_HORIZONTAL, "Flip Horizontal", WidgetPropertyCategory.Image, false));
    addProperty(new BooleanProperty(PROP_FLIP_VERTICAL, "Flip Vertical", WidgetPropertyCategory.Image, false));
    addProperty(new MatrixProperty(PERMUTATION_MATRIX, "Permutation Matrix", WidgetPropertyCategory.Image, PermutationMatrix.generateIdentityMatrix().getMatrix()));
    setPropertyVisibleAndSavable(PERMUTATION_MATRIX, false, true);
    FigureTransparencyHelper.addProperty(this);
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) MatrixProperty(org.csstudio.opibuilder.properties.MatrixProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Example 8 with FilePathProperty

use of org.csstudio.opibuilder.properties.FilePathProperty 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 String[] { getFileExtension() }, false));
    addProperty(new StringProperty(PROP_SCRIPT_TEXT, "Script Text", WidgetPropertyCategory.Basic, "", true, true));
    var embeddedProperty = new BooleanProperty(PROP_EMBEDDED, "Embedded", WidgetPropertyCategory.Basic, false);
    embeddedProperty.addPropertyChangeListener(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 : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Example 9 with FilePathProperty

use of org.csstudio.opibuilder.properties.FilePathProperty in project yamcs-studio by yamcs.

the class AbstractLinkingContainerModel method configureBaseProperties.

@Override
protected void configureBaseProperties() {
    super.configureBaseProperties();
    addProperty(new FilePathProperty(PROP_OPI_FILE, "OPI File", WidgetPropertyCategory.Behavior, "", new String[] { "opi" }));
    addProperty(new StringProperty(PROP_GROUP_NAME, "Group Name", WidgetPropertyCategory.Behavior, ""));
}
Also used : StringProperty(org.csstudio.opibuilder.properties.StringProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Aggregations

FilePathProperty (org.csstudio.opibuilder.properties.FilePathProperty)9 BooleanProperty (org.csstudio.opibuilder.properties.BooleanProperty)7 StringProperty (org.csstudio.opibuilder.properties.StringProperty)5 ComboProperty (org.csstudio.opibuilder.properties.ComboProperty)3 ActionsProperty (org.csstudio.opibuilder.properties.ActionsProperty)2 IntegerProperty (org.csstudio.opibuilder.properties.IntegerProperty)2 ColorProperty (org.csstudio.opibuilder.properties.ColorProperty)1 FontProperty (org.csstudio.opibuilder.properties.FontProperty)1 MacrosProperty (org.csstudio.opibuilder.properties.MacrosProperty)1 MatrixProperty (org.csstudio.opibuilder.properties.MatrixProperty)1 WidgetPropertyCategory (org.csstudio.opibuilder.properties.WidgetPropertyCategory)1 MacrosInput (org.csstudio.opibuilder.util.MacrosInput)1 Element (org.jdom.Element)1