Search in sources :

Example 6 with DoubleProperty

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

the class DisplayModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new IntegerProperty(PROP_GRID_SPACE, "Grid Space", WidgetPropertyCategory.Display, 6, 1, 1000));
    addProperty(new BooleanProperty(PROP_SHOW_GRID, "Show Grid", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SHOW_RULER, "Show Ruler", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SNAP_GEOMETRY, "Snap to Geometry", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_SHOW_EDIT_RANGE, "Show Edit Range", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_AUTO_ZOOM_TO_FIT_ALL, "Auto Zoom to Fit All", WidgetPropertyCategory.Behavior, false));
    addProperty(new ComplexDataProperty(PROP_AUTO_SCALE_WIDGETS, "Auto Scale Widgets (at Runtime)", WidgetPropertyCategory.Behavior, new DisplayScaleData(this), "Scale Widgets as windows resizes"));
    addProperty(new BooleanProperty(PROP_SHOW_CLOSE_BUTTON, "Show Close Button", WidgetPropertyCategory.Display, true));
    var version = new Version(0, 0, 0);
    addProperty(new VersionProperty(PROP_BOY_VERSION, "BOY Version", WidgetPropertyCategory.Basic, version.toString()));
    addProperty(new DoubleProperty(PROP_FRAME_RATE, "Frame Rate", WidgetPropertyCategory.Display, -1.0));
    setPropertyVisible(PROP_BORDER_COLOR, false);
    setPropertyVisible(PROP_BORDER_STYLE, false);
    setPropertyVisible(PROP_BORDER_WIDTH, false);
    setPropertyVisible(PROP_VISIBLE, false);
    setPropertyVisible(PROP_ENABLED, false);
    setPropertyVisible(PROP_TOOLTIP, false);
    setPropertyVisible(PROP_ACTIONS, false);
    setPropertyVisible(PROP_FONT, false);
    setPropertyVisibleAndSavable(PROP_FRAME_RATE, false, false);
    setPropertyVisibleAndSavable(PROP_BOY_VERSION, false, true);
    addProperty(new ActionsProperty(PROP_ACTIONS, "Actions", WidgetPropertyCategory.Behavior, false));
    setPropertyDescription(PROP_COLOR_FOREGROUND, "Grid Color");
    setPropertyValue(PROP_NAME, "");
    removeProperty(PROP_SCALE_OPTIONS);
}
Also used : IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) ComplexDataProperty(org.csstudio.opibuilder.properties.ComplexDataProperty) Version(org.osgi.framework.Version) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) ActionsProperty(org.csstudio.opibuilder.properties.ActionsProperty) VersionProperty(org.csstudio.opibuilder.properties.VersionProperty) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty) DisplayScaleData(org.csstudio.opibuilder.datadefinition.DisplayScaleData)

Example 7 with DoubleProperty

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

Example 8 with DoubleProperty

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

the class ThumbWheelModel method configureProperties.

@Override
protected void configureProperties() {
    // addProperty(new DoubleProperty(PROP_VALUE, "Value",
    // WidgetPropertyCategory.Behavior, 0));
    addProperty(new DoubleProperty(PROP_MIN, "Minimum", WidgetPropertyCategory.Behavior, DEFAULT_MIN));
    addProperty(new DoubleProperty(PROP_MAX, "Maximum", WidgetPropertyCategory.Behavior, DEFAULT_MAX));
    addProperty(new IntegerProperty(PROP_INTEGER_DIGITS_PART, "Integer Digits", WidgetPropertyCategory.Behavior, DEFAULT_INTEGER_DIGITS));
    addProperty(new IntegerProperty(PROP_DECIMAL_DIGITS_PART, "Decimal Digits", WidgetPropertyCategory.Behavior, DEFAULT_DECIMAL_DIGITS));
    addProperty(new ColorProperty(PROP_INTERNAL_FRAME_COLOR, "Internal Frame Color", WidgetPropertyCategory.Display, ColorConstants.black.getRGB()));
    addProperty(new ColorProperty(PROP_INTERNAL_FOCUSED_FRAME_COLOR, "Focused Frame Color", WidgetPropertyCategory.Display, ColorConstants.blue.getRGB()));
    addProperty(new IntegerProperty(PROP_INTERNAL_FRAME_THICKNESS, "Internal Frame Thickness", WidgetPropertyCategory.Display, 1));
    addProperty(new BooleanProperty(PROP_LIMITS_FROM_PV, "Limits From PV", WidgetPropertyCategory.Behavior, false));
    addProperty(new BooleanProperty(PROP_SHOW_BUTTONS, "Show Buttons", WidgetPropertyCategory.Display, true));
}
Also used : IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 9 with DoubleProperty

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

the class IntensityGraphModel method configureProperties.

@Override
protected void configureProperties() {
    addPVProperty(new PVNameProperty(PROP_HORIZON_PROFILE_X_PV_NAME, "Horizon Profile X PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_HORIZON_PROFILE_X_PV_VALUE, null));
    addPVProperty(new PVNameProperty(PROP_VERTICAL_PROFILE_X_PV_NAME, "Vertical Profile X PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_VERTICAL_PROFILE_X_PV_VALUE, null));
    addPVProperty(new PVNameProperty(PROP_HORIZON_PROFILE_Y_PV_NAME, "Horizon Profile Y PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_HORIZON_PROFILE_Y_PV_VALUE, null));
    addPVProperty(new PVNameProperty(PROP_VERTICAL_PROFILE_Y_PV_NAME, "Vertical Profile Y PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_VERTICAL_PROFILE_Y_PV_VALUE, null));
    addPVProperty(new PVNameProperty(PROP_PIXEL_INFO_PV_NAME, "Pixel Info PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_PIXEL_INFO_PV_VALUE, null));
    addProperty(new DoubleProperty(PROP_MIN, "Minimum", WidgetPropertyCategory.Behavior, DEFAULT_MIN), true);
    addProperty(new DoubleProperty(PROP_MAX, "Maximum", WidgetPropertyCategory.Behavior, DEFAULT_MAX), true);
    addProperty(new IntegerProperty(PROP_DATA_WIDTH, "Data Width", WidgetPropertyCategory.Behavior, 0), true);
    addProperty(new IntegerProperty(PROP_DATA_HEIGHT, "Data Height", WidgetPropertyCategory.Behavior, 0), true);
    addProperty(new ColorMapProperty(PROP_COLOR_MAP, "Color Map", WidgetPropertyCategory.Display, new ColorMap(PredefinedColorMap.JET, true, true)), true);
    addProperty(new BooleanProperty(PROP_SHOW_RAMP, "Show Ramp", WidgetPropertyCategory.Display, true), true);
    addProperty(new IntegerProperty(PROP_GRAPH_AREA_WIDTH, "Graph Area Width", WidgetPropertyCategory.Position, 0), true);
    addProperty(new IntegerProperty(PROP_GRAPH_AREA_HEIGHT, "Graph Area Height", WidgetPropertyCategory.Position, 0), true);
    addProperty(new IntegerProperty(PROP_CROP_LEFT, "Crop Left", WidgetPropertyCategory.Behavior, 0));
    addProperty(new IntegerProperty(PROP_CROP_RIGHT, "Crop Right", WidgetPropertyCategory.Behavior, 0));
    addProperty(new IntegerProperty(PROP_CROP_TOP, "Crop Top", WidgetPropertyCategory.Behavior, 0));
    addProperty(new IntegerProperty(PROP_CROP_BOTTOM, "Crop Bottom", WidgetPropertyCategory.Behavior, 0));
    addProperty(new BooleanProperty(PROP_RGB_MODE, "RGB Mode", WidgetPropertyCategory.Behavior, false), false);
    addProperty(new ComboProperty(PROP_COLOR_DEPTH, "Color Depth", WidgetPropertyCategory.Behavior, ColorDepth.stringValues(), 0), true);
    addProperty(new BooleanProperty(PROP_SINGLE_LINE_PROFILING, "Profile on Single Line", WidgetPropertyCategory.Behavior, false), true);
    addProperty(new ColorProperty(PROP_ROI_COLOR, "ROI Color", WidgetPropertyCategory.Display, CustomMediaFactory.COLOR_CYAN), true);
    addProperty(new IntegerProperty(PROP_ROI_COUNT, "ROI Count", WidgetPropertyCategory.Behavior, 0, 0, MAX_ROIS_AMOUNT));
    addAxisProperties();
    addROIProperties();
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) ColorMap(org.csstudio.swt.widgets.datadefinition.ColorMap) PredefinedColorMap(org.csstudio.swt.widgets.datadefinition.ColorMap.PredefinedColorMap) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) PVValueProperty(org.csstudio.opibuilder.properties.PVValueProperty) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty) ColorMapProperty(org.csstudio.opibuilder.widgets.properties.ColorMapProperty) PVNameProperty(org.csstudio.opibuilder.properties.PVNameProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Example 10 with DoubleProperty

use of org.csstudio.opibuilder.properties.DoubleProperty 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 (var 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)

Aggregations

DoubleProperty (org.csstudio.opibuilder.properties.DoubleProperty)16 BooleanProperty (org.csstudio.opibuilder.properties.BooleanProperty)15 IntegerProperty (org.csstudio.opibuilder.properties.IntegerProperty)9 ColorProperty (org.csstudio.opibuilder.properties.ColorProperty)8 ComboProperty (org.csstudio.opibuilder.properties.ComboProperty)6 StringProperty (org.csstudio.opibuilder.properties.StringProperty)3 WidgetPropertyCategory (org.csstudio.opibuilder.properties.WidgetPropertyCategory)3 OPIColor (org.csstudio.opibuilder.util.OPIColor)2 DisplayScaleData (org.csstudio.opibuilder.datadefinition.DisplayScaleData)1 ActionsProperty (org.csstudio.opibuilder.properties.ActionsProperty)1 ComplexDataProperty (org.csstudio.opibuilder.properties.ComplexDataProperty)1 FontProperty (org.csstudio.opibuilder.properties.FontProperty)1 NameDefinedCategory (org.csstudio.opibuilder.properties.NameDefinedCategory)1 PVNameProperty (org.csstudio.opibuilder.properties.PVNameProperty)1 PVValueProperty (org.csstudio.opibuilder.properties.PVValueProperty)1 PointListProperty (org.csstudio.opibuilder.properties.PointListProperty)1 VersionProperty (org.csstudio.opibuilder.properties.VersionProperty)1 ColorMapProperty (org.csstudio.opibuilder.widgets.properties.ColorMapProperty)1 ColorMap (org.csstudio.swt.widgets.datadefinition.ColorMap)1 PredefinedColorMap (org.csstudio.swt.widgets.datadefinition.ColorMap.PredefinedColorMap)1