Search in sources :

Example 1 with FilePathProperty

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

the class TabModel method addTabProperty.

private void addTabProperty(TabProperty tabProperty, int tabIndex) {
    var propID = makeTabPropID(tabProperty.propIDPre, tabIndex);
    WidgetPropertyCategory category;
    category = new WidgetPropertyCategory() {

        @Override
        public String toString() {
            return NLS.bind("Tab {0}", tabIndex);
        }
    };
    switch(tabProperty) {
        case TITLE:
            addProperty(new StringProperty(propID, tabProperty.toString(), category, category.toString()));
            break;
        case FONT:
            addProperty(new FontProperty(propID, tabProperty.toString(), category, DEFAULT_TAB_FONT));
            break;
        case FORECOLOR:
            addProperty(new ColorProperty(propID, tabProperty.toString(), category, DEFAULT_TAB_FORECOLOR));
            break;
        case BACKCOLOR:
            addProperty(new ColorProperty(propID, tabProperty.toString(), category, DEFAULT_TAB_BACKCOLOR));
            break;
        case ICON_PATH:
            addProperty(new FilePathProperty(propID, tabProperty.toString(), category, null, FILE_EXTENSIONS));
            break;
        case ENABLED:
            addProperty(new BooleanProperty(propID, tabProperty.toString(), category, true));
            break;
        default:
            break;
    }
}
Also used : FontProperty(org.csstudio.opibuilder.properties.FontProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) WidgetPropertyCategory(org.csstudio.opibuilder.properties.WidgetPropertyCategory) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 2 with FilePathProperty

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

the class OpenDisplayAction method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new FilePathProperty(PROP_PATH, "File Path", WidgetPropertyCategory.Basic, "", new String[] { "opi" }, false) {

        @Override
        public String readValueFromXML(Element propElement) {
            handleLegacySettings(propElement);
            return super.readValueFromXML(propElement);
        }
    });
    addProperty(new MacrosProperty(PROP_MACROS, "Macros", WidgetPropertyCategory.Basic, new MacrosInput(new LinkedHashMap<String, String>(), true)));
    addProperty(new ComboProperty(PROP_MODE, "Mode", WidgetPropertyCategory.Basic, DisplayMode.stringValues(), DisplayMode.REPLACE.ordinal()));
}
Also used : MacrosInput(org.csstudio.opibuilder.util.MacrosInput) ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) Element(org.jdom.Element) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty) MacrosProperty(org.csstudio.opibuilder.properties.MacrosProperty)

Example 3 with FilePathProperty

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

the class ImageBoolIndicatorModel 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));
    setPropertyVisible(PROP_ON_COLOR, false);
    setPropertyVisible(PROP_OFF_COLOR, false);
    FigureTransparencyHelper.addProperty(this);
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Example 4 with FilePathProperty

use of org.csstudio.opibuilder.properties.FilePathProperty in project org.csstudio.display.builder by kasemir.

the class DataBrowserWidgedModel method configureProperties.

/**
 * {@inheritDoc}}
 */
@Override
protected void configureProperties() {
    addProperty(new FilePathProperty(PROP_FILENAME, Messages.FileName, WidgetPropertyCategory.Basic, EMPTY_PATH, new String[] { Model.FILE_EXTENSION, Model.FILE_EXTENSION_OLD }));
    addProperty(new StringProperty(PROP_SELECTION_VALUE_PV, "Selection Value PV (VTable)", WidgetPropertyCategory.Basic, ""));
    addProperty(new BooleanProperty(PROP_SHOW_VALUE_LABELS, "Show Value Labels", WidgetPropertyCategory.Display, false));
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) FilePathProperty(org.csstudio.opibuilder.properties.FilePathProperty)

Example 5 with FilePathProperty

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

the class ActionButtonModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new ComboProperty(PROP_STYLE, "Style", WidgetPropertyCategory.Basic, Style.stringValues(), Style.CLASSIC.ordinal()));
    addProperty(new StringProperty(PROP_TEXT, "Text", WidgetPropertyCategory.Display, "$(actions)", true));
    addProperty(new IntegerProperty(PROP_ACTION_INDEX, "Click Action Index", WidgetPropertyCategory.Behavior, 0, -1, Integer.MAX_VALUE));
    addProperty(new IntegerProperty(PROP_RELEASED_ACTION_INDEX, "Release Action Index", WidgetPropertyCategory.Behavior, 0, -1, Integer.MAX_VALUE));
    addProperty(new BooleanProperty(PROP_TOGGLE_BUTTON, "Toggle Button", WidgetPropertyCategory.Behavior, DEFAULT_TOGGLE_BUTTON));
    addProperty(new FilePathProperty(PROP_IMAGE, "Icon File", WidgetPropertyCategory.Display, "", FILE_EXTENSIONS));
    removeProperty(PROP_ACTIONS);
    addProperty(new ActionsProperty(PROP_ACTIONS, "Actions", WidgetPropertyCategory.Behavior, false));
    setPropertyVisible(PROP_RELEASED_ACTION_INDEX, DEFAULT_TOGGLE_BUTTON);
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) ActionsProperty(org.csstudio.opibuilder.properties.ActionsProperty) 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