use of org.csstudio.opibuilder.widgets.model.KnobModel in project yamcs-studio by yamcs.
the class KnobEditPart method doCreateFigure.
/**
* {@inheritDoc}
*/
@Override
protected IFigure doCreateFigure() {
final KnobModel model = (KnobModel) getModel();
KnobFigure knob = new KnobFigure();
initializeCommonFigureProperties(knob, model);
knob.setBulbColor(model.getKnobColor());
knob.setEffect3D(model.isEffect3D());
knob.setThumbColor(model.getThumbColor());
knob.setValueLabelVisibility(model.isShowValueLabel());
knob.setGradient(model.isRampGradient());
knob.setIncrement(model.getIncrement());
knob.addManualValueChangeListener(new IManualValueChangeListener() {
@Override
public void manualValueChanged(double newValue) {
if (getExecutionMode() == ExecutionMode.RUN_MODE) {
setPVValue(AbstractPVWidgetModel.PROP_PVNAME, newValue);
}
}
});
markAsControlPV(AbstractPVWidgetModel.PROP_PVNAME, AbstractPVWidgetModel.PROP_PVVALUE);
return knob;
}
Aggregations