Search in sources :

Example 1 with WidgetPropertyCategory

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

the class IntensityGraphModel method addAxisProperties.

private void addAxisProperties() {
    WidgetPropertyCategory xCategory = new NameDefinedCategory("X Axis");
    WidgetPropertyCategory yCategory = new NameDefinedCategory("Y Axis");
    for (AxisProperty axisProperty : AxisProperty.values()) addAxisProperty(X_AXIS_ID, axisProperty, xCategory);
    for (AxisProperty axisProperty : AxisProperty.values()) addAxisProperty(Y_AXIS_ID, axisProperty, yCategory);
}
Also used : WidgetPropertyCategory(org.csstudio.opibuilder.properties.WidgetPropertyCategory) NameDefinedCategory(org.csstudio.opibuilder.properties.NameDefinedCategory)

Example 2 with WidgetPropertyCategory

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

the class SashContainerModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new BooleanProperty(PROP_TRANSPARENT, "Transparent", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_HORIZONTAL, "Horizontal", WidgetPropertyCategory.Display, true));
    addProperty(new ComboProperty(PROP_SASH_STYLE, "Sash Style", WidgetPropertyCategory.Display, SashContainerFigure.SashStyle.stringValues(), 2));
    addProperty(new DoubleProperty(PROP_SASH_POSITION, "Sash Position", WidgetPropertyCategory.Display, 0.5));
    addProperty(new IntegerProperty(PROP_SASH_WIDTH, "Sash Width", WidgetPropertyCategory.Display, 3, 1, 100));
    // addProperty(new BooleanProperty(PROP_LOCK_CHILDREN, "Lock Children",
    // WidgetPropertyCategory.Behavior, false));
    addProperty(new BooleanProperty(PROP_PANEL1_AUTO_SCALE_CHILDREN, "Auto Scale Children (at Runtime)", new WidgetPropertyCategory() {

        @Override
        public String toString() {
            return "Panel 1 (Left/Up)";
        }
    }, false));
    addProperty(new BooleanProperty(PROP_PANEL2_AUTO_SCALE_CHILDREN, "Auto Scale Children (at Runtime)", new WidgetPropertyCategory() {

        @Override
        public String toString() {
            return "Panel 2 (Right/Down)";
        }
    }, false));
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) WidgetPropertyCategory(org.csstudio.opibuilder.properties.WidgetPropertyCategory) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty)

Example 3 with WidgetPropertyCategory

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

the class TabModel method addTabProperty.

private void addTabProperty(TabProperty tabProperty, final int tabIndex) {
    String 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 4 with WidgetPropertyCategory

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

the class LEDModel method configureProperties.

@Override
protected void configureProperties() {
    super.configureProperties();
    addProperty(new BooleanProperty(PROP_EFFECT3D, "3D Effect", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SQUARE_LED, "Square LED", WidgetPropertyCategory.Display, false));
    setPropertyVisible(PROP_BOOL_LABEL_POS, false);
    addProperty(new IntegerProperty(PROP_NSTATES, "State Count", WidgetPropertyCategory.Behavior, 2, 2, LEDFigure.MAX_NSTATES));
    setPropertyVisibleAndSavable(PROP_NSTATES, true, false);
    WidgetPropertyCategory category = new NameDefinedCategory("State Fallback");
    addProperty(new StringProperty(PROP_STATE_FALLBACK_LABEL, "Label", category, LEDFigure.DEFAULT_STATE_FALLBACK_LABAL));
    setPropertyVisibleAndSavable(PROP_STATE_FALLBACK_LABEL, false, false);
    addProperty(new ColorProperty(PROP_STATE_FALLBACK_COLOR, "Color", category, LEDFigure.DEFAULT_STATE_FALLBACK_COLOR.getRGB()));
    setPropertyVisibleAndSavable(PROP_STATE_FALLBACK_COLOR, false, false);
    addProperty(new IntegerProperty(PROP_BULB_BORDER, "Bulb border", WidgetPropertyCategory.Display, LEDFigure.DEFAULT_BULB_BORDER_WIDTH));
    addProperty(new ColorProperty(PROP_BULB_BORDER_COLOR, "Bulb border color", WidgetPropertyCategory.Display, LEDFigure.DEFAULT_BULB_BORDER_COLOR.getRGB()));
    for (int state = 0; state < LEDFigure.MAX_NSTATES; state++) {
        category = new NameDefinedCategory(String.format("State %02d", state + 1));
        addProperty(new StringProperty(String.format(PROP_STATE_LABEL, state), "Label", category, LEDFigure.DEFAULT_STATE_LABELS[state]));
        setPropertyVisibleAndSavable(String.format(PROP_STATE_LABEL, state), false, false);
        addProperty(new ColorProperty(String.format(PROP_STATE_COLOR, state), "Color", category, LEDFigure.DEFAULT_STATE_COLORS[state].getRGB()));
        setPropertyVisibleAndSavable(String.format(PROP_STATE_COLOR, state), false, false);
        addProperty(new DoubleProperty(String.format(PROP_STATE_VALUE, state), "Value", category, LEDFigure.DEFAULT_STATE_VALUES[state]));
        setPropertyVisibleAndSavable(String.format(PROP_STATE_VALUE, state), false, false);
    }
}
Also used : IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) WidgetPropertyCategory(org.csstudio.opibuilder.properties.WidgetPropertyCategory) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty) NameDefinedCategory(org.csstudio.opibuilder.properties.NameDefinedCategory) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 5 with WidgetPropertyCategory

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

the class TextUpdateModel method configureProperties.

@Override
protected void configureProperties() {
    pvModel = true;
    super.configureProperties();
    WidgetPropertyCategory category = new WidgetPropertyCategory() {

        @Override
        public String toString() {
            return "Format";
        }
    };
    addProperty(new ComboProperty(PROP_FORMAT_TYPE, "Format Type", category, FormatEnum.stringValues(), 0));
    addProperty(new IntegerProperty(PROP_PRECISION, "Precision", category, 0, 0, 100));
    addProperty(new BooleanProperty(PROP_PRECISION_FROM_DB, "Precision from PV", category, true));
    addProperty(new BooleanProperty(PROP_SHOW_UNITS, "Show Units", category, true));
    addProperty(new DoubleProperty(PROP_ROTATION, "Rotation Angle", WidgetPropertyCategory.Display, 0, 0, 360));
    setPropertyValue(PROP_TEXT, "######");
    setPropertyValue(PROP_ALIGN_H, 0);
    setPropertyValue(PROP_ALIGN_V, 1);
    setPropertyVisible(PROP_SHOW_SCROLLBAR, false);
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) WidgetPropertyCategory(org.csstudio.opibuilder.properties.WidgetPropertyCategory) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty)

Aggregations

WidgetPropertyCategory (org.csstudio.opibuilder.properties.WidgetPropertyCategory)7 BooleanProperty (org.csstudio.opibuilder.properties.BooleanProperty)5 IntegerProperty (org.csstudio.opibuilder.properties.IntegerProperty)4 NameDefinedCategory (org.csstudio.opibuilder.properties.NameDefinedCategory)4 ColorProperty (org.csstudio.opibuilder.properties.ColorProperty)3 ComboProperty (org.csstudio.opibuilder.properties.ComboProperty)3 DoubleProperty (org.csstudio.opibuilder.properties.DoubleProperty)3 StringProperty (org.csstudio.opibuilder.properties.StringProperty)3 FilePathProperty (org.csstudio.opibuilder.properties.FilePathProperty)1 FontProperty (org.csstudio.opibuilder.properties.FontProperty)1 PVNameProperty (org.csstudio.opibuilder.properties.PVNameProperty)1 PVValueProperty (org.csstudio.opibuilder.properties.PVValueProperty)1