buoy.widget
Class BDialog
A BDialog is a WidgetContainer corresponding to a dialog window. It may contain up to two child Widgets:
a BMenuBar, and a single other Widget (usually a WidgetContainer of some sort) which fills the rest
of the window.
In addition to the event types generated by all Widgets, BDialogs generate the following event types:
BDialog() - Create a non-modal BDialog with no title or parent window.
|
BDialog(String title) - Create a non-modal BDialog with no parent window.
|
BDialog(WindowWidget parent, String title, boolean modal) - Create a new BDialog.
|
BDialog(WindowWidget parent, boolean modal) - Create a new BDialog with no title.
|
int | getChildCount() - Get the number of children in this container.
|
Collection | getChildren() - Get a Collection containing all child Widgets of this container.
|
JDialog | getComponent()
|
BMenuBar | getMenuBar() - Get the BMenuBar for this window.
|
String | getTitle() - Get the title of the dialog.
|
boolean | isModal() - Determine whether this dialog is modal.
|
boolean | isResizable() - Determine whether this dialog may be resized by the user.
|
void | pack() - Select an appropriate size for the dialog, based on the preferred size of its contents, then re-layout
all of its contents.
|
void | remove(Widget widget) - Remove a child Widget from this container.
|
void | removeAll() - Remove all child Widgets from this container.
|
void | setMenuBar(BMenuBar menus) - Set the BMenuBar for this window.
|
void | setModal(boolean modal) - Set whether this dialog is modal.
|
void | setResizable(boolean resizable) - Set whether this dialog may be resized by the user.
|
void | setTitle(String title) - Set the title of the dialog.
|
dispose , getComponent , getContent , getDefaultButton , isVisible , layoutChildren , pack , setBounds , setContent , setDefaultButton , setVisible , toBack , toFront |
addEventLink , dispatchEvent , getBackground , getBounds , getComponent , getCursor , getFont , getMaximumSize , getMinimumSize , getName , getParent , getPreferredSize , hasFocus , isEnabled , isFocusable , isVisible , repaint , requestFocus , setBackground , setCursor , setEnabled , setFocusable , setFont , setName , setVisible |
BDialog
public BDialog()
Create a non-modal BDialog with no title or parent window.
BDialog
public BDialog(String title)
Create a non-modal BDialog with no parent window.
title
- the title of the dialog
BDialog
public BDialog(WindowWidget parent,
String title,
boolean modal)
Create a new BDialog.
parent
- the parent window (a BFrame or BDialog) for this dialogtitle
- the title of the dialogmodal
- specifies whether this is a modal dialog
BDialog
public BDialog(WindowWidget parent,
boolean modal)
Create a new BDialog with no title.
parent
- the parent window (a BFrame or BDialog) for this dialogmodal
- specifies whether this is a modal dialog
getChildren
public Collection getChildren()
Get a Collection containing all child Widgets of this container.
- getChildren in interface WidgetContainer
getMenuBar
public BMenuBar getMenuBar()
Get the BMenuBar for this window.
getTitle
public String getTitle()
Get the title of the dialog.
isModal
public boolean isModal()
Determine whether this dialog is modal.
isResizable
public boolean isResizable()
Determine whether this dialog may be resized by the user.
pack
public void pack()
Select an appropriate size for the dialog, based on the preferred size of its contents, then re-layout
all of its contents. If this is being called for the first time before the dialog has yet been shown,
it also centers the dialog relative to its parent (or the screen if it does not have a parent).
- pack in interface WindowWidget
setMenuBar
public void setMenuBar(BMenuBar menus)
Set the BMenuBar for this window.
setModal
public void setModal(boolean modal)
Set whether this dialog is modal. This must be called before the dialog is made visible.
It is not possible to change whether a currently visible dialog is modal.
setResizable
public void setResizable(boolean resizable)
Set whether this dialog may be resized by the user.
setTitle
public void setTitle(String title)
Set the title of the dialog.
Written by Peter Eastman.