borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.control
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.Window +----java.awt.Dialog +----borland.jbcl.control.ButtonDialog +----borland.jbcl.control.ColorChooserDialog +----borland.jbcl.control.MessageDialog +----borland.jbcl.control.FontChooserDialog +----borland.jbcl.control.UserNamePasswordDialog +----borland.jbcl.control.ExceptionDialog
Variables Constructors Properties Methods Event Listeners
Implements MenuContainer, ActionListener, KeyListener, ImageObserver, Serializable, EventListener
Extends java.awt.Dialog, adding standard buttons and button sets. Extended by JBCL dialog classes. Provides a way to imbed pre-defined buttons and button sets in message boxes and dialog boxes.
The following buttons close the dialog:
Pre-defined button sets
Name of button set | Buttons in the button set |
OK_CANCEL | OK, Cancel |
YES_NO | Yes, No |
YES_NO_CANCEL | Yes, No, Cancel |
OK_CANCEL_APPLY | OK, Cancel, Apply |
APPLY_DONE | Apply, Done |
ALL | OK, Yes, No, Cancel, Help, Apply, Done |
public static final int ALL = OK | YES | NO | CANCEL | HELP | APPLY | DONE
public static final int APPLY = 0x040
public static final String APPLY_COMMAND = "apply"
public static final int APPLY_DONE = APPLY | DONE
public static final int CANCEL = 0x008
public static final String CANCEL_COMMAND = "cancel"
public static final int DETAILS = 0x200
public static final String DETAILS_COMMAND = "details"
public static final int DONE = 0x010
public static final String DONE_COMMAND = "done"
public static final int HELP = 0x020
public static final String HELP_COMMAND = "help"
public static final int NEXT = 0x080
public static final String NEXT_COMMAND = "next"
public static final int NO = 0x004
public static final int NONE = 0x000
public static final String NONE_COMMAND = "none"
public static final String NO_COMMAND = "no"
public static final int OK = 0x001
public static final int OK_CANCEL = OK | CANCEL
public static final int OK_CANCEL_APPLY = OK | CANCEL | APPLY
public static final String OK_COMMAND = "ok"
public static final int PREVIOUS = 0x100
public static final String PREVIOUS_COMMAND = "previous"
public static final int YES = 0x002
public static final String YES_COMMAND = "yes"
public static final int YES_NO = YES | NO
public static final int YES_NO_CANCEL = YES | NO | CANCEL
protected ActionMulticaster actionMulticaster
protected int buttonAlignment
protected ButtonDescriptor[] buttonDescriptors
protected Panel buttonPanel
protected Panel buttonPanelHolder
protected int buttonSet
protected boolean centered
protected boolean enterOK
protected String[] labels
protected ButtonDescriptor result
protected ButtonDialog(java.awt.Frame frame)
Constructs a ButtonDialog.
The following parameters apply to the various ButtonDialog constructors.
Parameters
protected ButtonDialog(java.awt.Frame frame, java.lang.String title)Constructs a ButtonDialog. See the parameters table above.
protected ButtonDialog(java.awt.Frame frame, java.lang.String title, boolean modal, java.awt.Component centerPanel, java.awt.Panel buttonPanel, borland.jbcl.control.ButtonDescriptor[] buttonDescriptors)Constructs a ButtonDialog. See the parameters table above.
public ButtonDialog(java.awt.Frame frame, java.lang.String title, java.awt.Component centerPanel)Constructs a ButtonDialog. See the parameters table above.
protected ButtonDialog(java.awt.Frame frame, java.lang.String title, java.awt.Component centerPanel, int buttonSet)Constructs a ButtonDialog. See the parameters table above.
public int getButtonAlignment() public void setButtonAlignment(int alignment)
public int getButtonSet() public void setButtonSet(int bs)Defines the set of buttons to be displayed as a set of OR'ed button bits. Examples:
setButtonSet(ButtonDialog.OK | ButtonDialog.CANCEL | ButtonDialog.HELP)
setButtonSet(ButtonDialog.OK_CANCEL)
public boolean getCentered() public void setCentered(boolean c)
public boolean getEnterOK() public void setEnterOK(boolean e)
public String[] getLabels() public void setLabels(java.lang.String[] l)The labels for the buttons actually used, or the whole button set. Setting all buttons signifies a label list for the whole set.
public Dimension getPreferredSize()
public int getResult() public void setResult(int id)
protected void assureOnScreen()
public ButtonDescriptor buttonFromCommand(java.lang.String actionCommand)
public ButtonDescriptor buttonFromID(int id)
protected static final ButtonDescriptor[] buttonSetToButtonDescriptors(int buttonSet)
protected void centerOnScreen()
public void enableButton(java.lang.String actionCommand, boolean enableState)
protected void listenForKeys(java.awt.Component comp)
protected void processActionEvent(java.awt.event.ActionEvent e)
protected void processWindowEvent(java.awt.event.WindowEvent e)
Overrides: java.awt.Window.processWindowEvent(WindowEvent)
protected void setupButtonLabels()
public void show()
Overrides: java.awt.Dialog.show()
public synchronized void addActionListener(java.awt.event.ActionListener l) public synchronized void removeActionListener(java.awt.event.ActionListener l)
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addContainerListener(java.awt.event.ContainerListener l) public void removeContainerListener(java.awt.event.ContainerListener l)
public synchronized void addFocusListener(java.awt.event.FocusListener l) public synchronized void removeFocusListener(java.awt.event.FocusListener l)
public synchronized void addKeyListener(java.awt.event.KeyListener l) public synchronized void removeKeyListener(java.awt.event.KeyListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener l) public synchronized void removeMouseListener(java.awt.event.MouseListener l)
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener l) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
public synchronized void addWindowListener(java.awt.event.WindowListener l) public synchronized void removeWindowListener(java.awt.event.WindowListener l)