|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.yospace.yae.yogi.YogiComponent
|
+--com.yospace.yae.yogi.YogiWindow
A component which can have only three children: a content pane, a menu bar and a title bar. It always has a content pane, but the title bar and menu bar are optional. Adding a YogiMenu directly to a YogiWindow causes that menu to be added to the menu bar, if one exists. Attempting to add any other type of YogiComponent other than YogiContentPane, YogiMenuBar, YogiTitleBar or YogiMenu to a YogiWindow results in that component being added not as a direct child of the window, but as a child of the content pane.
| Field Summary | |
static int |
PROPERTY_CONTENT_PANE
Constant for the content pane property |
static int |
PROPERTY_MENU_BAR
Constant for the menu bar property |
static int |
PROPERTY_TITLE_BAR
Constant for the title bar property |
| Constructor Summary | |
YogiWindow()
Sets the new YogiWindow to have a content pane (but, by default, no title or menu bars). |
|
| Method Summary | |
void |
add(YogiComponent yc)
Adding a YogiContentPane to this component results in the current content pane being replaced with this new one. |
void |
addMenu(YogiMenu menu)
Adds the given menu to the current menu bar, if a current menu bar exists. |
YogiContentPane |
getContentPane()
Accessor method for the content pane. |
YogiMenu |
getMenu(int index)
Gets the menu at the given index from the current menu bar. |
YogiMenu |
getMenu(java.lang.String menuId)
Gets the menu with the id String from the current menu bar. |
YogiMenuBar |
getMenuBar()
Accessor method for the window's menu bar. |
YogiTitleBar |
getTitleBar()
Accessor method for the title bar. |
void |
remove(int index)
Delegates the removal of the component at the specified index to the YogiContentPane. |
void |
remove(YogiComponent yc)
YogiTitleBars, YogiMenuBars and YogiMenus can be directly removed from a YogiWindow. |
void |
removeMenu(YogiMenu menu)
Removes the given menu from the menu bar. |
void |
removeMenus()
Convenience method to remove all menus. |
void |
setContentPane(YogiContentPane contentPane)
Sets the content pane to be the given YogiContentPane. |
void |
setMenuBar(YogiMenuBar menuBar)
Sets the menu bar. |
void |
setTitleBar(YogiTitleBar titleBar)
Sets the title bar, removing the old one if one existed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PROPERTY_MENU_BAR
public static final int PROPERTY_TITLE_BAR
public static final int PROPERTY_CONTENT_PANE
| Constructor Detail |
public YogiWindow()
| Method Detail |
public void add(YogiComponent yc)
YogiWindow.getContentPane().add();
add in class YogiComponentyc - the component to add.public void remove(YogiComponent yc)
YogiWindow.getContentPane().remove();
remove in class YogiComponentyc - the component to add.public void remove(int index)
remove in class YogiComponentindex - The index of the component to be removed.public YogiContentPane getContentPane()
public void setContentPane(YogiContentPane contentPane)
contentPane - the content pane to replace the current one with.public YogiMenuBar getMenuBar()
public void setMenuBar(YogiMenuBar menuBar)
menuBar - the new menu bar.public void addMenu(YogiMenu menu)
menu - the menu to add.public YogiMenu getMenu(int index)
index - the index of the menu to get from the menu bar.public YogiMenu getMenu(java.lang.String menuId)
menuId - the String identifier of the menu to get from the menu bar.public void removeMenu(YogiMenu menu)
the - menu to remove from the menu bar. Does nothing if there is
no menu bar set up or the menu is not on the menu bar.public void removeMenus()
public YogiTitleBar getTitleBar()
public void setTitleBar(YogiTitleBar titleBar)
titleBar - the new title bar.
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||