Search in sources :

Example 1 with ColorProperty

use of org.csstudio.opibuilder.properties.ColorProperty 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 ColorProperty

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

the class TankModel method configureProperties.

@Override
protected void configureProperties() {
    super.configureProperties();
    addProperty(new ColorProperty(PROP_FILL_COLOR, "Fill Color", WidgetPropertyCategory.Display, DEFAULT_FILL_COLOR));
    addProperty(new BooleanProperty(PROP_FILLCOLOR_ALARM_SENSITIVE, "FillColor Alarm Sensitive", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_EFFECT3D, "3D Effect", WidgetPropertyCategory.Display, true));
    addProperty(new ColorProperty(PROP_FILLBACKGROUND_COLOR, "Color Fillbackground", WidgetPropertyCategory.Display, DEFAULT_FILLBACKGROUND_COLOR));
    setPropertyValue(PROP_LO_COLOR, new RGB(255, 128, 0));
    setPropertyValue(PROP_HI_COLOR, new RGB(255, 128, 0));
    setPropertyVisible(PROP_VALUE_LABEL_FORMAT, false);
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) RGB(org.eclipse.swt.graphics.RGB) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 3 with ColorProperty

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

the class AbstractChoiceModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new StringListProperty(PROP_ITEMS, "Items", WidgetPropertyCategory.Behavior, Arrays.asList(DEFAULT_ITEMS)));
    addProperty(new BooleanProperty(PROP_ITEMS_FROM_PV, "Items From PV", WidgetPropertyCategory.Behavior, true));
    addProperty(new ColorProperty(PROP_SELECTED_COLOR, "Selected Color", WidgetPropertyCategory.Display, DEFAULT_SELECTED_COLOR));
    addProperty(new BooleanProperty(PROP_HORIZONTAL, "Horizontal", WidgetPropertyCategory.Display, false));
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringListProperty(org.csstudio.opibuilder.properties.StringListProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 4 with ColorProperty

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

the class AbstractMarkedWidgetModel method configureProperties.

@Override
protected void configureProperties() {
    super.configureProperties();
    addProperty(new BooleanProperty(PROP_SHOW_MARKERS, "Show Markers", WidgetPropertyCategory.Display, true));
    addProperty(new DoubleProperty(PROP_LOLO_LEVEL, "Level LOLO", WidgetPropertyCategory.Behavior, DEFAULT_LEVELS[0]));
    addProperty(new DoubleProperty(PROP_LO_LEVEL, "Level LO", WidgetPropertyCategory.Behavior, DEFAULT_LEVELS[1]));
    addProperty(new DoubleProperty(PROP_HI_LEVEL, "Level HI", WidgetPropertyCategory.Behavior, DEFAULT_LEVELS[2]));
    addProperty(new DoubleProperty(PROP_HIHI_LEVEL, "Level HIHI", WidgetPropertyCategory.Behavior, DEFAULT_LEVELS[3]));
    addProperty(new BooleanProperty(PROP_SHOW_LOLO, "Show LOLO", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SHOW_LO, "Show LO", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SHOW_HI, "Show HI", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SHOW_HIHI, "Show HIHI", WidgetPropertyCategory.Display, true));
    addProperty(new ColorProperty(PROP_LOLO_COLOR, "Color LOLO ", WidgetPropertyCategory.Display, DEFAULT_LOLO_COLOR));
    addProperty(new ColorProperty(PROP_LO_COLOR, "Color LO", WidgetPropertyCategory.Display, DEFAULT_LO_COLOR));
    addProperty(new ColorProperty(PROP_HI_COLOR, "Color HI", WidgetPropertyCategory.Display, DEFAULT_HI_COLOR));
    addProperty(new ColorProperty(PROP_HIHI_COLOR, "Color HIHI", WidgetPropertyCategory.Display, DEFAULT_HIHI_COLOR));
    addProperty(new BooleanProperty(PROP_LIMITS_FROM_PV, "Limits From PV", WidgetPropertyCategory.Behavior, true));
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 5 with ColorProperty

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

the class ByteMonitorModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new IntegerProperty(PROP_NUM_BITS, "Number of Bits", WidgetPropertyCategory.Display, 16, 0, 64));
    addProperty(new IntegerProperty(PROP_START_BIT, "Start Bit", WidgetPropertyCategory.Display, 0, 0, 64));
    addProperty(new BooleanProperty(PROP_HORIZONTAL, "Horizontal", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_BIT_REVERSE, "Reverse Bits", WidgetPropertyCategory.Display, false));
    addProperty(new ColorProperty(PROP_ON_COLOR, "On Color", WidgetPropertyCategory.Display, DEFAULT_ON_COLOR));
    addProperty(new ColorProperty(PROP_OFF_COLOR, "Off Color", WidgetPropertyCategory.Display, DEFAULT_OFF_COLOR));
    addProperty(new BooleanProperty(PROP_SQUARE_LED, "Square LED", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_EFFECT3D, "3D Effect", WidgetPropertyCategory.Display, true));
    addProperty(new StringListProperty(PROP_LABELS, "Labels", WidgetPropertyCategory.Display, new ArrayList<String>()));
    addProperty(new IntegerProperty(PROP_LED_BORDER, "LED border", WidgetPropertyCategory.Display, DEFAULT_LED_BORDER));
    addProperty(new ColorProperty(PROP_LED_BORDER_COLOR, "LED border color", WidgetPropertyCategory.Display, DEFAULT_LED_BORDER_COLOR.getRGB()));
    addProperty(new BooleanProperty(PROP_PACK_LEDS, "Pack LEDs", WidgetPropertyCategory.Display, false));
}
Also used : IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) ArrayList(java.util.ArrayList) StringListProperty(org.csstudio.opibuilder.properties.StringListProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Aggregations

BooleanProperty (org.csstudio.opibuilder.properties.BooleanProperty)24 ColorProperty (org.csstudio.opibuilder.properties.ColorProperty)24 IntegerProperty (org.csstudio.opibuilder.properties.IntegerProperty)12 DoubleProperty (org.csstudio.opibuilder.properties.DoubleProperty)8 StringProperty (org.csstudio.opibuilder.properties.StringProperty)8 ComboProperty (org.csstudio.opibuilder.properties.ComboProperty)7 RGB (org.eclipse.swt.graphics.RGB)4 FontProperty (org.csstudio.opibuilder.properties.FontProperty)3 PVNameProperty (org.csstudio.opibuilder.properties.PVNameProperty)3 PVValueProperty (org.csstudio.opibuilder.properties.PVValueProperty)3 WidgetPropertyCategory (org.csstudio.opibuilder.properties.WidgetPropertyCategory)3 NameDefinedCategory (org.csstudio.opibuilder.properties.NameDefinedCategory)2 StringListProperty (org.csstudio.opibuilder.properties.StringListProperty)2 OPIColor (org.csstudio.opibuilder.util.OPIColor)2 UID (java.rmi.server.UID)1 ArrayList (java.util.ArrayList)1 WidgetScaleData (org.csstudio.opibuilder.datadefinition.WidgetScaleData)1 AbstractWidgetProperty (org.csstudio.opibuilder.properties.AbstractWidgetProperty)1 ActionsProperty (org.csstudio.opibuilder.properties.ActionsProperty)1 ComplexDataProperty (org.csstudio.opibuilder.properties.ComplexDataProperty)1