Search in sources :

Example 21 with IntegerProperty

use of org.csstudio.opibuilder.properties.IntegerProperty 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 22 with IntegerProperty

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

the class SpinnerModel method configureProperties.

@Override
protected void configureProperties() {
    pvModel = true;
    super.configureProperties();
    removeProperty(LabelModel.PROP_AUTOSIZE);
    removeProperty(LabelModel.PROP_SHOW_SCROLLBAR);
    removeProperty(LabelModel.PROP_WRAP_WORDS);
    setPropertyVisible(LabelModel.PROP_TEXT, false);
    addProperty(new DoubleProperty(PROP_MIN, "Minimum", WidgetPropertyCategory.Behavior, DEFAULT_MIN));
    addProperty(new DoubleProperty(PROP_MAX, "Maximum", WidgetPropertyCategory.Behavior, DEFAULT_MAX));
    addProperty(new DoubleProperty(PROP_STEP_INCREMENT, "Step Increment", WidgetPropertyCategory.Behavior, DEFAULT_STEP_INCREMENT), true);
    addProperty(new DoubleProperty(PROP_PAGE_INCREMENT, "Page Increment", WidgetPropertyCategory.Behavior, DEFAULT_PAGE_INCREMENT), true);
    addProperty(new BooleanProperty(PROP_LIMITS_FROM_PV, "Limits from PV", WidgetPropertyCategory.Behavior, true));
    addProperty(new ComboProperty(PROP_FORMAT, "Format", WidgetPropertyCategory.Display, NumericFormatType.stringValues(), 0));
    addProperty(new IntegerProperty(PROP_PRECISION, "Precision", WidgetPropertyCategory.Display, 3, 0, 100));
    addProperty(new BooleanProperty(PROP_PRECISION_FROM_PV, "Precision from PV", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_BUTTONS_ON_LEFT, "Buttons on Left", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_HORIZONTAL_BUTTONS_LAYOUT, "Horizontal Buttons Layout", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_SHOW_TEXT, "Show text", WidgetPropertyCategory.Display, true));
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty)

Example 23 with IntegerProperty

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

the class TabModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new IntegerProperty(PROP_TAB_COUNT, "Tab Count", WidgetPropertyCategory.Behavior, 1, 1, MAX_TABS_AMOUNT));
    addProperty(new BooleanProperty(PROP_HORIZONTAL_TABS, "Horizontal Tabs", WidgetPropertyCategory.Display, true));
    addProperty(new IntegerProperty(PROP_ACTIVE_TAB, "Active Tab", WidgetPropertyCategory.Display, 0, 0, MAX_TABS_AMOUNT - 1));
    addProperty(new IntegerProperty(PROP_MINIMUM_TAB_HEIGHT, "Minimum Tab Height", WidgetPropertyCategory.Display, 10, 10, 1000));
    setPropertyVisible(PROP_FONT, false);
    addTabsProperties();
}
Also used : IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty)

Example 24 with IntegerProperty

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

the class TableModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new BooleanProperty(PROP_EDITABLE, "Editable", WidgetPropertyCategory.Behavior, true));
    StringTableProperty contentProperty = new StringTableProperty(PROP_DEFAULT_CONTENT, "Default Content", WidgetPropertyCategory.Display, new String[][] { { "" } }, new String[] { "" });
    addProperty(contentProperty);
    String[] dropDownOptions = new String[org.csstudio.swt.widgets.natives.SpreadSheetTable.CellEditorType.values().length];
    for (int i = 0; i < dropDownOptions.length; i++) dropDownOptions[i] = org.csstudio.swt.widgets.natives.SpreadSheetTable.CellEditorType.values()[i].name();
    StringTableProperty headersProperty = new StringTableProperty(PROP_COLUMN_HEADERS, "Column Headers", WidgetPropertyCategory.Display, new String[0][0], new String[] { "Column Title", "Column Width", "Editable", "CellEditor" }, new CellEditorType[] { CellEditorType.TEXT, CellEditorType.TEXT, CellEditorType.CHECKBOX, CellEditorType.DROPDOWN }, new Object[] { null, null, new String[] { "Yes", "No" }, dropDownOptions });
    addProperty(headersProperty);
    IntegerProperty columnsCountProperty = new IntegerProperty(PROP_COLUMNS_COUNT, "Columns Count", WidgetPropertyCategory.Display, 1, 1, 10000);
    addProperty(columnsCountProperty);
    addProperty(new BooleanProperty(PROP_COLUMN_HEADER_VISIBLE, "Column Header Visible", WidgetPropertyCategory.Display, true));
    headersProperty.addPropertyChangeListener(new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            updateContentPropertyTitles();
        }
    });
    columnsCountProperty.addPropertyChangeListener(new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            updateContentPropertyTitles();
        }
    });
}
Also used : StringTableProperty(org.csstudio.opibuilder.properties.StringTableProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) PropertyChangeEvent(java.beans.PropertyChangeEvent) PropertyChangeListener(java.beans.PropertyChangeListener) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty)

Example 25 with IntegerProperty

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

IntegerProperty (org.csstudio.opibuilder.properties.IntegerProperty)29 BooleanProperty (org.csstudio.opibuilder.properties.BooleanProperty)27 ComboProperty (org.csstudio.opibuilder.properties.ComboProperty)14 ColorProperty (org.csstudio.opibuilder.properties.ColorProperty)12 StringProperty (org.csstudio.opibuilder.properties.StringProperty)12 DoubleProperty (org.csstudio.opibuilder.properties.DoubleProperty)9 PropertyChangeEvent (java.beans.PropertyChangeEvent)4 PropertyChangeListener (java.beans.PropertyChangeListener)4 PVNameProperty (org.csstudio.opibuilder.properties.PVNameProperty)4 WidgetPropertyCategory (org.csstudio.opibuilder.properties.WidgetPropertyCategory)4 ActionsProperty (org.csstudio.opibuilder.properties.ActionsProperty)3 FontProperty (org.csstudio.opibuilder.properties.FontProperty)3 PVValueProperty (org.csstudio.opibuilder.properties.PVValueProperty)3 ComplexDataProperty (org.csstudio.opibuilder.properties.ComplexDataProperty)2 FilePathProperty (org.csstudio.opibuilder.properties.FilePathProperty)2 NameDefinedCategory (org.csstudio.opibuilder.properties.NameDefinedCategory)2 IPath (org.eclipse.core.runtime.IPath)2 Path (org.eclipse.core.runtime.Path)2 RGB (org.eclipse.swt.graphics.RGB)2 UID (java.rmi.server.UID)1