use of org.csstudio.swt.widgets.figures.BoolSwitchFigure in project yamcs-studio by yamcs.
the class BoolSwitchEditPart method doCreateFigure.
@Override
protected IFigure doCreateFigure() {
final BoolSwitchModel model = getWidgetModel();
BoolSwitchFigure boolSwitch = new BoolSwitchFigure();
initializeCommonFigureProperties(boolSwitch, model);
boolSwitch.setEffect3D(model.isEffect3D());
return boolSwitch;
}
use of org.csstudio.swt.widgets.figures.BoolSwitchFigure in project yamcs-studio by yamcs.
the class BoolSwitchEditPart method registerPropertyChangeHandlers.
@Override
protected void registerPropertyChangeHandlers() {
registerCommonPropertyChangeHandlers();
// effect 3D
IWidgetPropertyChangeHandler handler = new IWidgetPropertyChangeHandler() {
@Override
public boolean handleChange(final Object oldValue, final Object newValue, final IFigure refreshableFigure) {
BoolSwitchFigure boolSwitch = (BoolSwitchFigure) refreshableFigure;
boolSwitch.setEffect3D((Boolean) newValue);
return true;
}
};
setPropertyChangeHandler(BoolSwitchModel.PROP_EFFECT3D, handler);
}
Aggregations