org.browsecode.helpers.menus
Class MenuItemAppleOSX

java.lang.Object
  extended by org.browsecode.helpers.menus.MenuItemStub
      extended by org.browsecode.helpers.menus.MenuItemAppleOSX
All Implemented Interfaces:
MenuItem
Direct Known Subclasses:
MenuItemAppleOSX.AboutMenuItem, MenuItemAppleOSX.PrefsMenuItem, MenuItemAppleOSX.QuitMenuItem

public abstract class MenuItemAppleOSX
extends MenuItemStub

Menu items for special menu items under Mac OS X. To use, do "new MenuItemAppleOSX.PrefsMenuItem()", "new MenuItemAppleOSX.QuitMenuItem()", or "new MenuItemAppleOSX.AboutMenuItem()"


Nested Class Summary
static class MenuItemAppleOSX.AboutMenuItem
           
static class MenuItemAppleOSX.PrefsMenuItem
           
static class MenuItemAppleOSX.QuitMenuItem
           
 
Nested classes/interfaces inherited from interface org.browsecode.helpers.menus.MenuItem
MenuItem.MenuItemSelectedListener
 
Constructor Summary
MenuItemAppleOSX(MenuBarHelper menuBarHelper)
           
 
Method Summary
 boolean fireAction()
           
 java.lang.String getVisibleTitle()
          Get the visible title of the menu item.
 boolean setEnabledDisabled()
          If you have enabled or disabled this menu item, call this.
protected  void setVisibleTitleAfterTranslation(java.lang.String title)
          Implement this to set the visible title.
 
Methods inherited from class org.browsecode.helpers.menus.MenuItemStub
addActionListener, canAListenerHandleAction, fireAction, getFont, getMenuBarHelper, getTitle, removeActionListener, setBackgroundColor, setFont, setForegroundColor, setTitle, setToolTipText, setVisibleTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuItemAppleOSX

public MenuItemAppleOSX(MenuBarHelper menuBarHelper)
Method Detail

fireAction

public boolean fireAction()

setEnabledDisabled

public boolean setEnabledDisabled()
Description copied from interface: MenuItem
If you have enabled or disabled this menu item, call this. Note that you do not need to pass the state in, because it will check in MenuItemSelectedListener.canHandleActionNow() -- make sure you have added one and that it's returning the correct thing.

Returns:
whether or not it can be disabled and re-enabled. In general, this returns true. For some items that can't be disabled, it returns false.

setVisibleTitleAfterTranslation

protected void setVisibleTitleAfterTranslation(java.lang.String title)
Description copied from class: MenuItemStub
Implement this to set the visible title. Don't override setVisibleTitle, override this one -- so that you will be setting the translated text for the menu.

Specified by:
setVisibleTitleAfterTranslation in class MenuItemStub

getVisibleTitle

public java.lang.String getVisibleTitle()
Description copied from interface: MenuItem
Get the visible title of the menu item. This is the current title and is language dependent. For example, if you want the "Undo" menu item to change from "Undo" to "Undo text insert", set it here. This will make the MenuItem's title stay as "Undo" for reference, but visibly it will show "Undo text insert"

Returns: