title: SWT CheckBox Button get checked/unchecked state
body: <p>I have a checkbox button based on which I want to set a variable as <code>true</code> or <code>false</code>. But I don't know how to handle the event. Here's my code:</p>
  
  <pre><code>Boolean check = false;
  Button checkBox = new Button(composite,SWT.CHECK);
  checkBox.setText("CheckBox");
  checkBox.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent event) {
          if (event.detail == SWT.CHECK) {
              // Now what should I do here to get
              // Whether it is a checked event or unchecked event.
          }
      }
  });
  </code></pre>