buoy.widget

Class BFrame


public class BFrame
extends WindowWidget

A BFrame is a WidgetContainer corresponding to a main 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, BFrames generate the following event types:

Author:
Peter Eastman

Constructor Summary

BFrame()
Create a new BFrame.
BFrame(String title)
Create a new BFrame.

Method Summary

int
getChildCount()
Get the number of children in this container.
Iterator
getChildren()
Get an Iterator listing all child Widgets.
Image
getIcon()
Get the image which should be used to represent this window when it is iconified.
BMenuBar
getMenuBar()
Get the BMenuBar for this window.
String
getTitle()
Get the title of the window.
boolean
isIconified()
Determine whether this window has been iconified.
boolean
isMaximized()
Determine whether this window has been maximized.
boolean
isResizable()
Determine whether this window may be resized by the user.
void
remove(Widget widget)
Remove a child Widget from this container.
void
removeAll()
Remove all child Widgets from this container.
void
setIcon(Image icon)
Set the image which should be used to represent this window when it is iconified.
void
setIconified(boolean iconified)
Set whether this window is iconified.
void
setMaximized(boolean maximized)
Set whether this window is maximized.
void
setMenuBar(BMenuBar menus)
Set the BMenuBar for this window.
void
setResizable(boolean resizable)
Set whether this window may be resized by the user.
void
setTitle(String title)
Set the title of the window.

Methods inherited from class buoy.widget.WindowWidget

dispose, getContent, getDefaultButton, isVisible, layoutChildren, pack, setBounds, setContent, setDefaultButton, setVisible, toBack, toFront

Methods inherited from class buoy.widget.WidgetContainer

getChildCount, getChildren, isOpaque, layoutChildren, remove, removeAll, setOpaque

Methods inherited from class buoy.widget.Widget

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

Methods inherited from class buoy.event.EventSource

addEventLink, addEventLink, addEventLink, dispatchEvent, removeEventLink

Constructor Details

BFrame

public BFrame()
Create a new BFrame.

BFrame

public BFrame(String title)
Create a new BFrame.

Method Details

getChildCount

public int getChildCount()
Get the number of children in this container.
Overrides:
getChildCount in interface WidgetContainer

getChildren

public Iterator getChildren()
Get an Iterator listing all child Widgets.
Overrides:
getChildren in interface WidgetContainer

getIcon

public Image getIcon()
Get the image which should be used to represent this window when it is iconified. Note that the behavior of iconified windows is platform specific, and some platforms may ignore the image you set. Also, some platforms may display this image in the title bar of the window.

This may be null, in which case the platform-specific default image will be used.


getMenuBar

public BMenuBar getMenuBar()
Get the BMenuBar for this window.

getTitle

public String getTitle()
Get the title of the window.

isIconified

public boolean isIconified()
Determine whether this window has been iconified. The precise behavior of an iconified window is platform specific, but it generally causes the window to be hidden and replaced by an icon on the desktop or elsewhere on the screen.

isMaximized

public boolean isMaximized()
Determine whether this window has been maximized. The precise behavior of a maximized window is platform specific, but it generally causes the window to expand to fill the entire screen.

isResizable

public boolean isResizable()
Determine whether this window may be resized by the user.

remove

public void remove(Widget widget)
Remove a child Widget from this container.
Overrides:
remove in interface WidgetContainer

removeAll

public void removeAll()
Remove all child Widgets from this container.
Overrides:
removeAll in interface WidgetContainer

setIcon

public void setIcon(Image icon)
Set the image which should be used to represent this window when it is iconified. Note that the behavior of iconified windows is platform specific, and some platforms may ignore the image you set. Also, some platforms may display this image in the title bar of the window.

This may be null, in which case the platform-specific default image will be used.


setIconified

public void setIconified(boolean iconified)
Set whether this window is iconified. The precise behavior of an iconified window is platform specific, but it generally causes the window to be hidden and replaced by an icon on the desktop or elsewhere on the screen.

setMaximized

public void setMaximized(boolean maximized)
Set whether this window is maximized. The precise behavior of a maximized window is platform specific, but it generally causes the window to expand to fill the entire screen.

setMenuBar

public void setMenuBar(BMenuBar menus)
Set the BMenuBar for this window.

setResizable

public void setResizable(boolean resizable)
Set whether this window may be resized by the user.

setTitle

public void setTitle(String title)
Set the title of the window.

Written by Peter Eastman.