use of org.csstudio.opibuilder.properties.PVValueProperty in project yamcs-studio by yamcs.
the class PVWidgetModelDelegate method configureBaseProperties.
public void configureBaseProperties() {
model.addPVProperty(new PVNameProperty(PROP_PVNAME, "PV Name", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_PVVALUE, null));
model.addProperty(new BooleanProperty(PROP_BORDER_ALARMSENSITIVE, "Alarm Sensitive", WidgetPropertyCategory.Border, true));
model.addProperty(new BooleanProperty(PROP_FORECOLOR_ALARMSENSITIVE, "ForeColor Alarm Sensitive", WidgetPropertyCategory.Display, false));
model.addProperty(new BooleanProperty(PROP_BACKCOLOR_ALARMSENSITIVE, "BackColor Alarm Sensitive", WidgetPropertyCategory.Display, false));
model.addProperty(new BooleanProperty(PROP_ALARM_PULSING, "Alarm Pulsing", WidgetPropertyCategory.Display, false));
// $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
model.setTooltip("$(" + PROP_PVNAME + ")\n" + "$(" + PROP_PVVALUE + ")");
}
use of org.csstudio.opibuilder.properties.PVValueProperty in project yamcs-studio by yamcs.
the class IntensityGraphModel method configureProperties.
@Override
protected void configureProperties() {
addPVProperty(new PVNameProperty(PROP_HORIZON_PROFILE_X_PV_NAME, "Horizon Profile X PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_HORIZON_PROFILE_X_PV_VALUE, null));
addPVProperty(new PVNameProperty(PROP_VERTICAL_PROFILE_X_PV_NAME, "Vertical Profile X PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_VERTICAL_PROFILE_X_PV_VALUE, null));
addPVProperty(new PVNameProperty(PROP_HORIZON_PROFILE_Y_PV_NAME, "Horizon Profile Y PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_HORIZON_PROFILE_Y_PV_VALUE, null));
addPVProperty(new PVNameProperty(PROP_VERTICAL_PROFILE_Y_PV_NAME, "Vertical Profile Y PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_VERTICAL_PROFILE_Y_PV_VALUE, null));
addPVProperty(new PVNameProperty(PROP_PIXEL_INFO_PV_NAME, "Pixel Info PV", WidgetPropertyCategory.Basic, ""), new PVValueProperty(PROP_PIXEL_INFO_PV_VALUE, null));
addProperty(new DoubleProperty(PROP_MIN, "Minimum", WidgetPropertyCategory.Behavior, DEFAULT_MIN), true);
addProperty(new DoubleProperty(PROP_MAX, "Maximum", WidgetPropertyCategory.Behavior, DEFAULT_MAX), true);
addProperty(new IntegerProperty(PROP_DATA_WIDTH, "Data Width", WidgetPropertyCategory.Behavior, 0), true);
addProperty(new IntegerProperty(PROP_DATA_HEIGHT, "Data Height", WidgetPropertyCategory.Behavior, 0), true);
addProperty(SingleSourceHelper.createColorMapProperty(PROP_COLOR_MAP, "Color Map", WidgetPropertyCategory.Display, new ColorMap(PredefinedColorMap.JET, true, true)), true);
addProperty(new BooleanProperty(PROP_SHOW_RAMP, "Show Ramp", WidgetPropertyCategory.Display, true), true);
addProperty(new IntegerProperty(PROP_GRAPH_AREA_WIDTH, "Graph Area Width", WidgetPropertyCategory.Position, 0), true);
addProperty(new IntegerProperty(PROP_GRAPH_AREA_HEIGHT, "Graph Area Height", WidgetPropertyCategory.Position, 0), true);
addProperty(new IntegerProperty(PROP_CROP_LEFT, "Crop Left", WidgetPropertyCategory.Behavior, 0));
addProperty(new IntegerProperty(PROP_CROP_RIGHT, "Crop Right", WidgetPropertyCategory.Behavior, 0));
addProperty(new IntegerProperty(PROP_CROP_TOP, "Crop Top", WidgetPropertyCategory.Behavior, 0));
addProperty(new IntegerProperty(PROP_CROP_BOTTOM, "Crop BOTTOM", WidgetPropertyCategory.Behavior, 0));
addProperty(new BooleanProperty(PROP_RGB_MODE, "RGB Mode", WidgetPropertyCategory.Behavior, false), false);
addProperty(new ComboProperty(PROP_COLOR_DEPTH, "Color Depth", WidgetPropertyCategory.Behavior, ColorDepth.stringValues(), 0), true);
addProperty(new BooleanProperty(PROP_SINGLE_LINE_PROFILING, "Profile on Single Line", WidgetPropertyCategory.Behavior, false), true);
addProperty(new ColorProperty(PROP_ROI_COLOR, "ROI Color", WidgetPropertyCategory.Display, CustomMediaFactory.COLOR_CYAN), true);
addProperty(new IntegerProperty(PROP_ROI_COUNT, "ROI Count", WidgetPropertyCategory.Behavior, 0, 0, MAX_ROIS_AMOUNT));
addAxisProperties();
addROIProperties();
}
use of org.csstudio.opibuilder.properties.PVValueProperty 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.PVValueProperty 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.PVValueProperty in project yamcs-studio by yamcs.
the class PVWidgetEditpartDelegate method doActivate.
public void doActivate() {
saveFigureOKStatus(editpart.getFigure());
if (editpart.getExecutionMode() == ExecutionMode.RUN_MODE) {
pvMap.clear();
final Map<StringProperty, PVValueProperty> pvPropertyMap = editpart.getWidgetModel().getPVMap();
for (final StringProperty sp : pvPropertyMap.keySet()) {
if (sp.getPropertyValue() == null || ((String) sp.getPropertyValue()).trim().length() <= 0)
continue;
try {
IPV pv = BOYPVFactory.createPV((String) sp.getPropertyValue(), isAllValuesBuffered);
pvMap.put(sp.getPropertyID(), pv);
editpart.addToConnectionHandler((String) sp.getPropertyValue(), pv);
WidgetPVListener pvListener = new WidgetPVListener(sp.getPropertyID());
pv.addListener(pvListener);
pvListenerMap.put(sp.getPropertyID(), pvListener);
} catch (Exception e) {
OPIBuilderPlugin.getLogger().log(Level.WARNING, "Unable to connect to PV:" + (String) sp.getPropertyValue(), // $NON-NLS-1$
e);
}
}
}
}
Aggregations