Search in sources :

Example 6 with StringProperty

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

the class LabelModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new StringProperty(PROP_TEXT, "Text", WidgetPropertyCategory.Display, "Label", true));
    addProperty(new BooleanProperty(PROP_TRANSPARENT, "Transparent", WidgetPropertyCategory.Display, !pvModel));
    addProperty(new BooleanProperty(PROP_AUTOSIZE, "Auto Size", WidgetPropertyCategory.Display, false));
    addProperty(new ComboProperty(PROP_ALIGN_H, "Horizontal Alignment", WidgetPropertyCategory.Display, H_ALIGN.stringValues(), 1));
    addProperty(new ComboProperty(PROP_ALIGN_V, "Vertical Alignment", WidgetPropertyCategory.Display, V_ALIGN.stringValues(), 1));
    addProperty(new BooleanProperty(PROP_WRAP_WORDS, "Wrap Words", WidgetPropertyCategory.Behavior, false));
    addProperty(new BooleanProperty(PROP_SHOW_SCROLLBAR, "Show Scrollbar", WidgetPropertyCategory.Behavior, false));
    if (!pvModel) {
        setTooltip("");
        setPropertyVisible(PROP_PVNAME, false);
        setPropertyVisible(PROP_PVVALUE, false);
        setPropertyVisible(PROP_BACKCOLOR_ALARMSENSITIVE, false);
        setPropertyVisible(PROP_BORDER_ALARMSENSITIVE, false);
        setPropertyVisible(PROP_FORECOLOR_ALARMSENSITIVE, false);
        setPropertyVisible(PROP_ALARM_PULSING, false);
    }
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty)

Example 7 with StringProperty

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

the class MenuButtonModel method configureProperties.

/**
 * {@inheritDoc}
 */
@Override
protected void configureProperties() {
    addProperty(new StringProperty(PROP_LABEL, "Label", WidgetPropertyCategory.Display, // $NON-NLS-1$
    ""));
    addProperty(new BooleanProperty(PROP_ACTIONS_FROM_PV, "Actions From PV", WidgetPropertyCategory.Behavior, DEFAULT_ACTIONS_FROM_PV));
    addProperty(new BooleanProperty(PROP_TRANSPARENT, "Transparent", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_SHOW_DOWN_ARROW, "Show Down Arrow", WidgetPropertyCategory.Display, false));
    removeProperty(PROP_ACTIONS);
    addProperty(new ActionsProperty(PROP_ACTIONS, "Actions", WidgetPropertyCategory.Behavior, false));
    setPropertyVisible(PROP_ACTIONS, !DEFAULT_ACTIONS_FROM_PV);
}
Also used : BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) ActionsProperty(org.csstudio.opibuilder.properties.ActionsProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty)

Example 8 with StringProperty

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

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

the class TextInputModel method configureProperties.

@Override
protected void configureProperties() {
    super.configureProperties();
    addProperty(new ComboProperty(PROP_STYLE, "Style", WidgetPropertyCategory.Basic, Style.stringValues(), Style.CLASSIC.ordinal()));
    addProperty(new DoubleProperty(PROP_MIN, "Minimum", WidgetPropertyCategory.Behavior, DEFAULT_MIN));
    addProperty(new DoubleProperty(PROP_MAX, "Maximum", WidgetPropertyCategory.Behavior, DEFAULT_MAX));
    addProperty(new BooleanProperty(PROP_LIMITS_FROM_PV, "Limits From PV", WidgetPropertyCategory.Behavior, true));
    addProperty(new BooleanProperty(PROP_MULTILINE_INPUT, "Multi-line Input", WidgetPropertyCategory.Behavior, false));
    addProperty(new StringProperty(PROP_DATETIME_FORMAT, "Datetime Format", WidgetPropertyCategory.Display, // $NON-NLS-1$
    "yyyy-MM-dd HH:mm:ss"));
    addProperty(new ComboProperty(PROP_SELECTOR_TYPE, "Selector Type", WidgetPropertyCategory.Display, SelectorType.stringValues(), SelectorType.NONE.ordinal()));
    addProperty(new ComboProperty(PROP_FILE_SOURCE, "File Source", WidgetPropertyCategory.Display, FileSource.stringValues(), FileSource.WORKSPACE.ordinal()));
    addProperty(new ComboProperty(PROP_FILE_RETURN_PART, "File Return Part", WidgetPropertyCategory.Display, FileReturnPart.stringValues(), FileReturnPart.FULL_PATH.ordinal()));
    addProperty(new StringProperty(PROP_CONFIRM_MESSAGE, "Confirm Message", WidgetPropertyCategory.Behavior, "", // $NON-NLS-1$
    true));
    addProperty(new BooleanProperty(PROP_SHOW_NATIVE_BORDER, "Show Native Border", WidgetPropertyCategory.Display, true));
    addProperty(new BooleanProperty(PROP_PASSWORD_INPUT, "Password Input", WidgetPropertyCategory.Behavior, false));
    addProperty(new BooleanProperty(PROP_READ_ONLY, "Read Only", WidgetPropertyCategory.Behavior, false));
    addProperty(new BooleanProperty(PROP_SHOW_H_SCROLL, "Show Horizontal Scrollbar", WidgetPropertyCategory.Display, false));
    addProperty(new BooleanProperty(PROP_SHOW_V_SCROLL, "Show Vertical Scrollbar", WidgetPropertyCategory.Display, false));
    addProperty(new ComboProperty(PROP_NEXT_FOCUS, "Next Focus", WidgetPropertyCategory.Behavior, FOCUS_TRAVERSE.stringValues(), 0));
    setPropertyVisible(PROP_DATETIME_FORMAT, false);
    setPropertyVisible(PROP_FILE_RETURN_PART, false);
    setPropertyVisible(PROP_FILE_SOURCE, false);
    setPropertyVisible(PROP_WRAP_WORDS, false);
    setPropertyVisible(PROP_ALIGN_V, false);
    // $NON-NLS-1$
    setText("");
    setPropertyValue(PROP_BORDER_STYLE, BorderStyle.LOWERED.ordinal());
    setPropertyValue(PROP_BORDER_ALARMSENSITIVE, false);
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) DoubleProperty(org.csstudio.opibuilder.properties.DoubleProperty)

Example 10 with StringProperty

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

the class AbstractBoolWidgetModel method configureProperties.

@Override
protected void configureProperties() {
    addProperty(new IntegerProperty(PROP_BIT, "Bit", WidgetPropertyCategory.Behavior, -1, -1, 63));
    addProperty(new BooleanProperty(PROP_SHOW_BOOL_LABEL, "Show Boolean Label", WidgetPropertyCategory.Display, false));
    addProperty(new StringProperty(PROP_ON_LABEL, "On Label", WidgetPropertyCategory.Display, DEFAULT_ON_LABEL));
    addProperty(new StringProperty(PROP_OFF_LABEL, "Off Label", WidgetPropertyCategory.Display, DEFAULT_OFF_LABEL));
    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 ComboProperty(PROP_DATA_TYPE, "Data Type", WidgetPropertyCategory.Behavior, new String[] { "Bit", "Enum" }, 0));
    addProperty(new StringProperty(PROP_ON_STATE, "On State", WidgetPropertyCategory.Behavior, ""));
    addProperty(new StringProperty(PROP_OFF_STATE, "Off State", WidgetPropertyCategory.Behavior, ""));
    addProperty(new ComboProperty(PROP_BOOL_LABEL_POS, "Boolean Label Position", WidgetPropertyCategory.Display, BoolLabelPosition.stringValues(), 0));
}
Also used : ComboProperty(org.csstudio.opibuilder.properties.ComboProperty) IntegerProperty(org.csstudio.opibuilder.properties.IntegerProperty) BooleanProperty(org.csstudio.opibuilder.properties.BooleanProperty) StringProperty(org.csstudio.opibuilder.properties.StringProperty) ColorProperty(org.csstudio.opibuilder.properties.ColorProperty)

Aggregations

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