|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GMenu | +--BoxedGMenu
This class extends the General Menu class GMenu adding a frame box drawing capability. The user can instantiate a default menu layout or control the box and menu dimensions.
Fields inherited from class GMenu |
ITEM_COL, itemCol, MAX_ITEMS, MENU_START_ROW, MENU_TITLE_OFFSET, MENU_TITLE_ROW, menuItems, menuStartRow, menuTitleOffset, menuTitleRow, nextItemNumber, titleSet |
Constructor Summary | |
BoxedGMenu()
Default constructor assumes specific coordinates for box drawing as well as default characters: '+' for corners, '-' for horizontal and '|' for vertical. |
|
BoxedGMenu(int iCol,
int titleRow,
int titleOffset,
int startRow,
int upperLeftRow,
int upperLeftCol,
int lowerRightRow,
int lowerRightCol,
BoxChars bx)
Allows complete specification of formatting of a menu and box. |
Method Summary | |
void |
displayMenu(Console con)
Method overloads the displayMenu() method in GMenu. Constructs the menu in the con screen and displays it on the display device. |
static void |
main(java.lang.String[] args)
Test driver for BoxedGMenu object. |
Methods inherited from class GMenu |
addMenuItem, addTitle, getItemCol, getMenuStartRow, getMenuTitleOffset, getMenuTitleRow, setItemCol, setMenuStartRow, setMenuTitleOffset, setMenuTitleRow, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BoxedGMenu()
public BoxedGMenu(int iCol, int titleRow, int titleOffset, int startRow, int upperLeftRow, int upperLeftCol, int lowerRightRow, int lowerRightCol, BoxChars bx)
iCol is the screen column where an item will start.
titleRow is the row number for the title
titleOffset is an offset that determines how far to the right
or left of the itemCol the title will print.
startRow is the row where the menu selection items start
upperLeftRow is the row coordinate of upper left corner
upperLeftCol is the column coordinate of the upper left corner
lowerRightRow is the row coordinate of lower right corner
lowerRightCol is the column coordinate of lower right corner
bx is a BoxChars object containing the characters to be used to
draw the box around the menu.
iCol should be between 0 and 50 or the value will be set to the default, ITEM_COL.
titleRow should be between 0 and 12 or the value will be set to the default, MENU_TITLE_ROW.
titleOffset may be negative or positive but should not result in the start column of the title from exceeding the same bounds as the iCol constraints, otherwise the value will be the default, MENU_TITLE_OFFSET.
startRow should be between 1 and 23 or the value will be set to the default, MENU_START_ROW.
Method Detail |
public void displayMenu(Console con)
displayMenu
in class GMenu
public static void main(java.lang.String[] args)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |