use of org.csstudio.opibuilder.properties.IntegerProperty in project yamcs-studio by yamcs.
the class ThumbWheelModel method configureProperties.
/**
* {@inheritDoc}
*/
@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));
}
use of org.csstudio.opibuilder.properties.IntegerProperty in project yamcs-studio by yamcs.
the class XYGraphModel method configureProperties.
@Override
protected void configureProperties() {
addPVProperty(new PVNameProperty(PROP_TRIGGER_PV, "Trigger PV", WidgetPropertyCategory.Behavior, ""), new PVValueProperty(PROP_TRIGGER_PV_VALUE, null));
addProperty(new StringProperty(PROP_TITLE, "Title", WidgetPropertyCategory.Display, ""));
addProperty(new FontProperty(PROP_TITLE_FONT, "Title Font", WidgetPropertyCategory.Display, // $NON-NLS-1$
MediaService.DEFAULT_BOLD_FONT));
addProperty(new BooleanProperty(PROP_SHOW_LEGEND, "Show Legend", WidgetPropertyCategory.Display, true));
addProperty(new BooleanProperty(PROP_SHOW_PLOTAREA_BORDER, "Show Plot Area Border", WidgetPropertyCategory.Display, false));
addProperty(new BooleanProperty(PROP_SHOW_TOOLBAR, "Show Toolbar", WidgetPropertyCategory.Display, true));
addProperty(new ColorProperty(PROP_PLOTAREA_BACKCOLOR, "Plot Area Background Color", WidgetPropertyCategory.Display, DEFAULT_PLOTAREA_BACKCOLOR));
addProperty(new BooleanProperty(PROP_TRANSPARENT, "Transparent", WidgetPropertyCategory.Display, false));
addProperty(new IntegerProperty(PROP_AXIS_COUNT, "Axis Count", WidgetPropertyCategory.Behavior, 2, 2, MAX_AXES_AMOUNT));
addProperty(new IntegerProperty(PROP_TRACE_COUNT, "Trace Count", WidgetPropertyCategory.Behavior, 1, 0, MAX_TRACES_AMOUNT));
addAxisProperties();
addTraceProperties();
setPropertyVisible(PROP_FONT, false);
}
use of org.csstudio.opibuilder.properties.IntegerProperty in project yamcs-studio by yamcs.
the class XYGraphModel method addTraceProperty.
private void addTraceProperty(TraceProperty traceProperty, int traceIndex) {
String propID = makeTracePropID(traceProperty.propIDPre, traceIndex);
WidgetPropertyCategory category = new NameDefinedCategory("Trace " + traceIndex);
switch(traceProperty) {
case NAME:
addProperty(new StringProperty(propID, traceProperty.toString(), category, "$(" + makeTracePropID(TraceProperty.YPV.propIDPre, traceIndex) + ")"));
break;
case ANTI_ALIAS:
// case CHRONOLOGICAL:
addProperty(new BooleanProperty(propID, traceProperty.toString(), category, true));
break;
case BUFFER_SIZE:
addProperty(new IntegerProperty(propID, traceProperty.toString(), category, DEFAULT_BUFFER_SIZE, 1, MAX_BUFFER_SIZE));
break;
case CONCATENATE_DATA:
addProperty(new BooleanProperty(propID, traceProperty.toString(), category, true));
break;
// break;
case LINE_WIDTH:
addProperty(new IntegerProperty(propID, traceProperty.toString(), category, 1, 1, 100));
break;
case PLOTMODE:
addProperty(new ComboProperty(propID, traceProperty.toString(), category, PlotMode.stringValues(), 0));
break;
case POINT_SIZE:
addProperty(new IntegerProperty(propID, traceProperty.toString(), category, 4, 1, 200));
break;
case POINT_STYLE:
addProperty(new ComboProperty(propID, traceProperty.toString(), category, PointStyle.stringValues(), 0));
break;
case TRACE_COLOR:
addProperty(new ColorProperty(propID, traceProperty.toString(), category, XYGraph.DEFAULT_TRACES_COLOR[traceIndex % XYGraph.DEFAULT_TRACES_COLOR.length]));
break;
case TRACE_TYPE:
addProperty(new ComboProperty(propID, traceProperty.toString(), category, TraceType.stringValues(), 0));
break;
// break;
case UPDATE_DELAY:
addProperty(new IntegerProperty(propID, traceProperty.toString(), category, 100, 0, 655350));
break;
case UPDATE_MODE:
addProperty(new ComboProperty(propID, traceProperty.toString(), category, UpdateMode.stringValues(), 0));
break;
case XAXIS_INDEX:
addProperty(new ComboProperty(propID, traceProperty.toString(), category, AXES_ARRAY, 0));
break;
case XPV:
addPVProperty(new PVNameProperty(propID, traceProperty.toString(), category, ""), new PVValueProperty(makeTracePropID(TraceProperty.XPV_VALUE.propIDPre, traceIndex), null));
break;
case YPV:
addPVProperty(new PVNameProperty(propID, traceProperty.toString(), category, // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
traceIndex == 0 ? "$(" + PROP_PVNAME + ")" : ""), new PVValueProperty(makeTracePropID(TraceProperty.YPV_VALUE.propIDPre, traceIndex), null));
break;
case YAXIS_INDEX:
addProperty(new ComboProperty(propID, traceProperty.toString(), category, AXES_ARRAY, 1));
break;
case VISIBLE:
addProperty(new BooleanProperty(propID, traceProperty.toString(), category, true));
break;
default:
break;
}
}
use of org.csstudio.opibuilder.properties.IntegerProperty in project yamcs-studio by yamcs.
the class ConnectionModel method configureProperties.
@Override
protected void configureProperties() {
addProperty(new IntegerProperty(PROP_LINE_WIDTH, "Line Width", WidgetPropertyCategory.Display, 1, 1, 100));
addProperty(new ComboProperty(PROP_LINE_STYLE, "Line Style", WidgetPropertyCategory.Display, LineStyle.stringValues(), 0));
addProperty(new ColorProperty(PROP_LINE_COLOR, "Line Color", WidgetPropertyCategory.Display, CustomMediaFactory.COLOR_BLACK));
addProperty(new ComboProperty(PROP_ROUTER, "Router", WidgetPropertyCategory.Display, RouterType.stringValues(), 0));
addProperty(new ComboProperty(PROP_ARROW_TYPE, "Arrows", WidgetPropertyCategory.Display, ArrowType.stringValues(), 0));
addProperty(new BooleanProperty(PROP_FILL_ARROW, "Fill Arrow", WidgetPropertyCategory.Display, true));
addProperty(new IntegerProperty(PROP_ARROW_LENGTH, "Arrow Length", WidgetPropertyCategory.Display, 15, 5, 1000));
addProperty(new BooleanProperty(PROP_ANTIALIAS, "Anti Alias", WidgetPropertyCategory.Display, true));
addProperty(new StringProperty(PROP_SRC_TERM, "Source Terminal", WidgetPropertyCategory.Display, ""));
addProperty(new StringProperty(PROP_TGT_TERM, "Target Terminal", WidgetPropertyCategory.Display, ""));
addProperty(new PointListProperty(PROP_POINTS, "Points", WidgetPropertyCategory.Display, new PointList()));
addProperty(new ComboProperty(PROP_LINE_JUMP_ADD, "Add Line Jump To", WidgetPropertyCategory.Display, LineJumpAdd.stringValues(), 0));
addProperty(new ComboProperty(PROP_LINE_JUMP_STYLE, "Line Jump Style", WidgetPropertyCategory.Display, LineJumpStyle.stringValues(), 0));
addProperty(new IntegerProperty(PROP_LINE_JUMP_SIZE, "Line Jump Size", WidgetPropertyCategory.Display, 10, 1, 100));
AbstractWidgetProperty loadedFromLinkingContainer = new StringProperty(PROP_IS_LOADED_FROM_LINKING_CONTAINER, "Is Loaded From Linking Container", WidgetPropertyCategory.Behavior, "false");
addProperty(loadedFromLinkingContainer);
setPropertyVisibleAndSavable(PROP_IS_LOADED_FROM_LINKING_CONTAINER, false, false);
setPropertyVisibleAndSavable(PROP_POINTS, false, true);
AbstractWidgetProperty srcWUIDProp = new StringProperty(PROP_SRC_WUID, "Source WUID", WidgetPropertyCategory.Display, "");
addProperty(srcWUIDProp);
srcWUIDProp.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (displayModel == null)
return;
String wuid = evt.getNewValue().toString();
String path = getPropertyValue(PROP_SRC_PATH).toString();
AbstractWidgetModel w = null;
if (path == null || path.equals("")) {
w = getTerminal(displayModel, null, wuid);
} else {
List<String> paths = Arrays.asList(path.split(PATH_DELIMITER));
w = getTerminal(displayModel, paths, wuid);
}
if (w != null) {
source = w;
reconnect();
} else
throw new IllegalArgumentException("Non exist widget PATH:[" + path + "],\nWUID:[" + wuid + "]");
}
});
AbstractWidgetProperty tgtWUIDProp = new StringProperty(PROP_TGT_WUID, "Target WUID", WidgetPropertyCategory.Display, "");
addProperty(tgtWUIDProp);
tgtWUIDProp.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (displayModel == null)
return;
String wuid = evt.getNewValue().toString();
String path = getPropertyValue(PROP_TGT_PATH).toString();
AbstractWidgetModel w = null;
if (path == null || path.equals("")) {
w = getTerminal(displayModel, null, wuid);
} else {
List<String> paths = Arrays.asList(path.split(PATH_DELIMITER));
w = getTerminal(displayModel, paths, wuid);
}
if (w != null) {
target = w;
reconnect();
} else
throw new IllegalArgumentException("Non exist widget PATH:[" + path + "],\nWUID:[" + wuid + "]");
}
});
AbstractWidgetProperty srcPathProp = new StringProperty(PROP_SRC_PATH, "Source Path", WidgetPropertyCategory.Display, "");
addProperty(srcPathProp);
AbstractWidgetProperty tgtPathProp = new StringProperty(PROP_TGT_PATH, "Target Path", WidgetPropertyCategory.Display, "");
addProperty(tgtPathProp);
setPropertyVisibleAndSavable(PROP_SRC_WUID, false, true);
setPropertyVisibleAndSavable(PROP_TGT_WUID, false, true);
setPropertyVisibleAndSavable(PROP_SRC_PATH, false, true);
setPropertyVisibleAndSavable(PROP_TGT_PATH, false, true);
setPropertyVisibleAndSavable(PROP_SRC_TERM, false, true);
setPropertyVisibleAndSavable(PROP_TGT_TERM, false, true);
removeProperty(PROP_BORDER_COLOR);
removeProperty(PROP_BORDER_STYLE);
removeProperty(PROP_BORDER_WIDTH);
removeProperty(PROP_VISIBLE);
removeProperty(PROP_ENABLED);
removeProperty(PROP_TOOLTIP);
removeProperty(PROP_ACTIONS);
removeProperty(PROP_FONT);
removeProperty(PROP_XPOS);
removeProperty(PROP_YPOS);
removeProperty(PROP_WIDTH);
removeProperty(PROP_HEIGHT);
removeProperty(PROP_RULES);
removeProperty(PROP_ACTIONS);
removeProperty(PROP_SCRIPTS);
removeProperty(PROP_COLOR_BACKGROUND);
removeProperty(PROP_COLOR_FOREGROUND);
removeProperty(PROP_SCALE_OPTIONS);
}
Aggregations