use of org.csstudio.opibuilder.properties.WidgetPropertyCategory in project yamcs-studio by yamcs.
the class XYGraphModel method addAxisProperties.
private void addAxisProperties() {
for (int i = 0; i < MAX_AXES_AMOUNT; i++) {
WidgetPropertyCategory category;
if (i == 0)
category = new NameDefinedCategory("Primary X Axis (0)");
else if (i == 1)
category = new NameDefinedCategory("Primary Y Axis (1)");
else
category = new NameDefinedCategory("Secondary Axis (" + i + ")");
for (AxisProperty axisProperty : AxisProperty.values()) addAxisProperty(axisProperty, i, category);
}
}
use of org.csstudio.opibuilder.properties.WidgetPropertyCategory 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;
}
}
Aggregations