SWT Button

  1. SWT uses Button to represent checkboxes, toggle buttons, and radio buttons.
  2. You determine the type by the style constants.
  3. You may pass only one of SWT.LEFT, SWT.CENTER, or SWT.RIGHT.
  4. You may pass only one of SWT.ARROW, SWT.CHECK, SWT.PUSH, SWT.RADIO, or SWT.TOGGLE.
  5. If you pass SWT.ARROW, you may pass only one of SWT.UP, SWT.DOWN, SWT.LEFT, or SWT.RIGHT.
Style Description
SWT.ARROW Creates a push button that displays an arrow.
SWT.CHECK Creates a checkbox.
SWT.PUSH Creates a push button.
SWT.RADIO Creates a radio button.
SWT.TOGGLE Creates a push button that preserves its pushed or nonpushed state.
SWT.FLAT Creates a push button that appears flat.
SWT.UP When combined with SWT.ARROW, displays an upward-pointing arrow.
SWT.DOWN When combined with SWT.ARROW, displays a downward-pointing arrow.
SWT.CENTER Centers the associated text.
SWT.LEFT Left-aligns the associated text. When combined with SWT.ARROW, displays a leftward-pointing arrow.
SWT.RIGHT Right-aligns the associated text. When combined with SWT.ARROW, displays a rightward-pointing arrow.

你可能感兴趣的:(java,桌面)