All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.swing.visuals.util
Class CommonButtons

    com.sas.swing.visuals.util.CommonButtons

All Implemented Interfaces:
  javax.swing.SwingConstants

    public final class CommonButtons

implements javax.swing.SwingConstants

A class to identify and create common buttons.

The buttons identified by `CommonButtons` are:

- `Apply`
- `Browse`
- `Cancel`
- `Close`
- `Help`
- `No`
- `OK`
- `Yes`

As a convience, `CommonButtons` also provides the following button combinations:

- `OK and Cancel`
- `OK, Cancel and Apply`
- `Yes and No`
- `Yes, No and Cancel`

There is also an identifier for specifying `no buttons`. This identifier might be used for creating a dialog that should not display any buttons but instead only have the close button (usually an x) at the top.

Field Summary
`static int` | `APPLY_BUTTON` Identifier for an "Apply" button.
`static int` | `BROWSE_BUTTON` Identifier for a "Browse" button.
`static int` | `CANCEL_BUTTON` Identifier for a "Cancel" button.
`static int` | `CLOSE_BUTTON` Identifier for a "Close" button.
`static int` | `HELP_BUTTON` Identifier for a "Help" button.
`static int` | `NO_BUTTON` Identifier for a "No" button.
`static int` | `NO_BUTTONS` Identifier for no buttons at all.
`static int` | `OK_BUTTON` Identifier for an "OK" button.
`static int` | `OK_CANCEL_APPLY_BUTTONS` Identifier for a combination of "OK", "Cancel" and "Apply" buttons.
`static int` | `OK_CANCEL_BUTTONS` Identifier for a combination of "OK" and "Cancel" buttons.
`static java.lang.String` | `RB_KEY`
`static int` | `YES_BUTTON` Identifier for a "Yes" button.
`static int` | `YES_NO_BUTTONS` Identifier for a combination of "Yes" and "No" buttons.
`static int` | `YES_NO_CANCEL_BUTTONS` Identifier for a combination of "Yes", "No" and "Cancel" buttons.

Method Summary
`static javax.swing.AbstractButton` | `createButton(int id)` Creates a `JButton` for the specified button id.
`static javax.swing.AbstractButton[]` | `createButtons(int buttonIds)` Creates an array of `JButton`'s for the specified button ids.

Field Detail

### RB_KEY

    public static final java.lang.String RB_KEY

See Also:
  Constant Field Values

### OK_BUTTON

    public static final int OK_BUTTON

  Identifier for an "OK" button.

  See Also:
    Constant Field Values

### CANCEL_BUTTON

    public static final int CANCEL_BUTTON

  Identifier for a "Cancel" button.

  See Also:
    Constant Field Values

### APPLY_BUTTON

    public static final int APPLY_BUTTON

  Identifier for an "Apply" button.

  See Also:
    Constant Field Values

### HELP_BUTTON

    public static final int HELP_BUTTON

  Identifier for a "Help" button.

  See Also:
    Constant Field Values

### YES_BUTTON

    public static final int YES_BUTTON

  Identifier for a "Yes" button.

  See Also:
    Constant Field Values

### NO_BUTTON

    public static final int NO_BUTTON

  Identifier for a "No" button.

  See Also:
    Constant Field Values

### CLOSE_BUTTON

    public static final int CLOSE_BUTTON

  Identifier for a "Close" button.

  See Also:
    Constant Field Values

### BROWSE_BUTTON

    public static final int BROWSE_BUTTON

  Identifier for a "Browse" button.

  See Also:
    Constant Field Values

### NO_BUTTONS

    public static final int NO_BUTTONS

  Identifier for no buttons at all.

  See Also:
    Constant Field Values

### OK_CANCEL_BUTTONS

    public static final int OK_CANCEL_BUTTONS

  Identifier for a combination of "OK" and "Cancel" buttons.

  See Also:
    Constant Field Values

### OK_CANCEL_APPLY_BUTTONS

    public static final int OK_CANCEL_APPLY_BUTTONS

  Identifier for a combination of "OK", "Cancel" and "Apply" buttons.

  See Also:
    Constant Field Values

### YES_NO_BUTTONS

    public static final int YES_NO_BUTTONS

  Identifier for a combination of "Yes" and "No" buttons.

  See Also:
    Constant Field Values

### YES_NO_CANCEL_BUTTONS

    public static final int YES_NO_CANCEL_BUTTONS

  Identifier for a combination of "Yes", "No" and "Cancel" buttons.

  See Also:
    Constant Field Values

Method Detail

### createButtons

    public static javax.swing.AbstractButton[] createButtons(int buttonIds)

  Creates an array of `JButton`'s for the specified button ids.

  Parameters:
    `buttonIds` - Identifies the buttons to create
  Returns:
    an array of buttons

### createButton

    public static javax.swing.AbstractButton createButton(int id)

  Creates a `JButton` for the specified button id.

  Parameters:
    `id` - Identifies the button create
  Returns:
    a button for the specified id

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.