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);
}
}
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);
}
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;
}
}
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);
}
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));
}
Aggregations