use of org.csstudio.opibuilder.widgets.model.NativeButtonModel in project yamcs-studio by yamcs.
the class NativeButtonEditPart method doCreateFigure.
/**
* {@inheritDoc}
*/
@Override
protected IFigure doCreateFigure() {
NativeButtonModel model = getWidgetModel();
int style = SWT.None;
style |= model.isToggleButton() ? SWT.TOGGLE : SWT.PUSH;
style |= SWT.WRAP;
final NativeButtonFigure buttonFigure = new NativeButtonFigure(this, style);
button = buttonFigure.getSWTWidget();
button.setText(model.getText());
buttonFigure.setImagePath(model.getImagePath());
updatePropSheet(model.isToggleButton());
markAsControlPV(AbstractPVWidgetModel.PROP_PVNAME, AbstractPVWidgetModel.PROP_PVVALUE);
return buttonFigure;
}
Aggregations