예제 #1
0
 /** Sets the state of the "Example" widgets. */
 void setExampleWidgetState() {
   super.setExampleWidgetState();
   Control[] controls = getExampleWidgets();
   if (controls.length != 0) {
     leftButton.setSelection((controls[0].getStyle() & SWT.LEFT) != 0);
     centerButton.setSelection((controls[0].getStyle() & SWT.CENTER) != 0);
     rightButton.setSelection((controls[0].getStyle() & SWT.RIGHT) != 0);
   }
 }
예제 #2
0
 /** Sets the state of the "Example" widgets. */
 void setExampleWidgetState() {
   super.setExampleWidgetState();
   horizontalButton.setSelection((canvas.getStyle() & SWT.H_SCROLL) != 0);
   verticalButton.setSelection((canvas.getStyle() & SWT.V_SCROLL) != 0);
   borderButton.setSelection((canvas.getStyle() & SWT.BORDER) != 0);
   noBackgroundButton.setSelection((canvas.getStyle() & SWT.NO_BACKGROUND) != 0);
   noFocusButton.setSelection((canvas.getStyle() & SWT.NO_FOCUS) != 0);
   noMergePaintsButton.setSelection((canvas.getStyle() & SWT.NO_MERGE_PAINTS) != 0);
   noRedrawResizeButton.setSelection((canvas.getStyle() & SWT.NO_REDRAW_RESIZE) != 0);
   setCaret();
 }