|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.slashie.libjcsi.textcomponents.TextComponent
net.slashie.libjcsi.textcomponents.MenuBox
public class MenuBox
Box used for various menus.
| Constructor Summary | |
|---|---|
MenuBox(ConsoleSystemInterface si)
Creates a new menu. |
|
| Method Summary | |
|---|---|
void |
draw()
Prints the menu to the screen. |
java.lang.Object |
getSelection()
Allows the user to move the selection bar up and down the menu and then select an item in the menu with the spacebar. |
void |
setBorder(boolean val)
Sets whether or not there is a border on the menu. |
void |
setMenuItems(java.util.Vector items)
Allows the menu items to be set. |
void |
setPosition(int x,
int y)
Allows the position of the menu's upper left corner to be specified. |
void |
setPrompt(java.lang.String prompt)
Allows the prompt to be specified. |
void |
setPromptSize(int size)
Sets the height of the menu. |
void |
setTitle(java.lang.String s)
|
void |
setWidth(int width)
Sets the width of the menu and resets the upper left position to reflect the change of width. |
| Methods inherited from class net.slashie.libjcsi.textcomponents.TextComponent |
|---|
clearBox, drawBorder, getForeColor, getHeight, getWidth, hasBorder, setBorderColor, setBorderColor, setBounds, setForeColor, setForeColor, setHeight |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MenuBox(ConsoleSystemInterface si)
si - ConsoleSystemInterface menu is attached to.| Method Detail |
|---|
public void setPosition(int x,
int y)
setPosition in class TextComponentx - horizontal positiony - vertical positionpublic void setPromptSize(int size)
size - menu's heightpublic void setWidth(int width)
setWidth in class TextComponentwidth - menu's widthpublic void setBorder(boolean val)
setBorder in class TextComponentval - true for a borderpublic void setPrompt(java.lang.String prompt)
prompt - String to use as prompt.public void setMenuItems(java.util.Vector items)
items - Vector of the items in the menu.public void draw()
draw in class TextComponentpublic java.lang.Object getSelection()
public void setTitle(java.lang.String s)
s - String that will be the title
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||