if (widget.equals(lineWidthSpinner)) {
lineWidth = lineWidthSpinner.getSelection();
} else if (widget.equals(lineAlphaSpinner)) {
lineAlpha = lineAlphaSpinner.getSelection();
} else if (widget.equals(lineColorButton)) {
ColorDialog dialog = new ColorDialog(lineColorButton.getShell());
dialog.open();
RGB rgb = dialog.getRGB();
if (rgb != null) {
lineColor = new Color(rgb.red, rgb.green, rgb.blue);
}
} else if (widget.equals(fillAlphaSpinner)) {
fillAlpha = fillAlphaSpinner.getSelection();
} else if (widget.equals(fillColorButton)) {
ColorDialog dialog = new ColorDialog(fillColorButton.getShell());
dialog.open();
RGB rgb = dialog.getRGB();
if (rgb != null) {
fillColor = new Color(rgb.red, rgb.green, rgb.blue);
}
} else if (widget.equals(rectangleRadio) || widget.equals(roundRectangleRadio)
|| widget.equals(ellipseRadio)) {