org.browsecode.helpers.menus
Class MenuStub
java.lang.Object
org.browsecode.helpers.menus.MenuItemStub
org.browsecode.helpers.menus.MenuStub
- All Implemented Interfaces:
- Menu, MenuItem
- Direct Known Subclasses:
- MenuJMenu
public abstract class MenuStub
- extends MenuItemStub
- implements Menu
Method Summary |
CheckboxMenuItem |
getCheckboxMenuItem(java.lang.String title,
javax.swing.Icon icon,
int acceleratorLetter)
|
CheckboxMenuItem |
getCheckboxMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke accelerator)
|
protected int |
getInsertIndex(MenuItem menuItem)
|
Menu |
getMenu(java.lang.String title)
Will get an existing item or create a new item and add it if it does not exist. |
MenuItem |
getMenuItem(java.lang.String title)
Will get an existing item or create a new item and add it if it does not exist. |
MenuItem |
getMenuItem(java.lang.String title,
javax.swing.Icon icon)
Will get an existing item or create a new item and add it if it does not exist. |
MenuItem |
getMenuItem(java.lang.String title,
javax.swing.Icon icon,
int acceleratorLetter)
Will get an existing item or create a new item and add it if it does not exist. |
MenuItem |
getMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke keyStroke)
Will get an existing item or create a new item and add it if it does not exist. |
protected Order |
getOrder()
|
CheckboxMenuItem |
hasCheckboxMenuItem(java.lang.String title)
|
MenuItem |
hasMenuItem(java.lang.String title)
Return an existing item. |
protected abstract CheckboxMenuItem |
makeNewCheckboxMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke keyStroke)
|
protected abstract Menu |
makeNewMenu(java.lang.String title)
|
protected abstract MenuItem |
makeNewMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke keyStroke)
|
void |
setItemsOrder(java.util.Vector itemsOrder)
|
Methods inherited from class org.browsecode.helpers.menus.MenuItemStub |
addActionListener, canAListenerHandleAction, fireAction, getFont, getMenuBarHelper, getTitle, removeActionListener, setBackgroundColor, setFont, setForegroundColor, setTitle, setToolTipText, setVisibleTitle, setVisibleTitleAfterTranslation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
menuItems
protected java.util.Vector<MenuItem> menuItems
order
protected Order order
MenuStub
public MenuStub(MenuBarHelper menuBarHelper)
getOrder
protected Order getOrder()
setItemsOrder
public void setItemsOrder(java.util.Vector itemsOrder)
getInsertIndex
protected int getInsertIndex(MenuItem menuItem)
getMenuItem
public MenuItem getMenuItem(java.lang.String title)
- Description copied from interface:
Menu
- Will get an existing item or create a new item and add it if it does not exist.
- Specified by:
getMenuItem
in interface Menu
- Returns:
getMenuItem
public MenuItem getMenuItem(java.lang.String title,
javax.swing.Icon icon)
- Description copied from interface:
Menu
- Will get an existing item or create a new item and add it if it does not exist.
- Specified by:
getMenuItem
in interface Menu
- Returns:
getMenuItem
public MenuItem getMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke keyStroke)
- Description copied from interface:
Menu
- Will get an existing item or create a new item and add it if it does not exist.
- Specified by:
getMenuItem
in interface Menu
- Returns:
getMenuItem
public MenuItem getMenuItem(java.lang.String title,
javax.swing.Icon icon,
int acceleratorLetter)
- Description copied from interface:
Menu
- Will get an existing item or create a new item and add it if it does not exist.
- Specified by:
getMenuItem
in interface Menu
- Returns:
getCheckboxMenuItem
public CheckboxMenuItem getCheckboxMenuItem(java.lang.String title,
javax.swing.Icon icon,
int acceleratorLetter)
- Specified by:
getCheckboxMenuItem
in interface Menu
getCheckboxMenuItem
public CheckboxMenuItem getCheckboxMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke accelerator)
- Specified by:
getCheckboxMenuItem
in interface Menu
getMenu
public Menu getMenu(java.lang.String title)
- Description copied from interface:
Menu
- Will get an existing item or create a new item and add it if it does not exist.
- Specified by:
getMenu
in interface Menu
- Returns:
hasMenuItem
public MenuItem hasMenuItem(java.lang.String title)
- Description copied from interface:
Menu
- Return an existing item. Return null if there is no item that exists.
- Specified by:
hasMenuItem
in interface Menu
- Returns:
hasCheckboxMenuItem
public CheckboxMenuItem hasCheckboxMenuItem(java.lang.String title)
makeNewMenu
protected abstract Menu makeNewMenu(java.lang.String title)
makeNewMenuItem
protected abstract MenuItem makeNewMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke keyStroke)
makeNewCheckboxMenuItem
protected abstract CheckboxMenuItem makeNewCheckboxMenuItem(java.lang.String title,
javax.swing.Icon icon,
javax.swing.KeyStroke keyStroke)