Synergy Home Page

au.edu.swin.synergy.plugin.mod13.event
Class BAddMenuItemCE

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--au.edu.swin.synergy.kernel.BCommandEvent
              |
              +--au.edu.swin.synergy.plugin.mod13.event.BWindowCE
                    |
                    +--au.edu.swin.synergy.plugin.mod13.event.BRemoveMenuItemCE
                          |
                          +--au.edu.swin.synergy.plugin.mod13.event.BAddMenuItemCE

public class BAddMenuItemCE
extends BRemoveMenuItemCE

See Also:
Serialized Form

Field Summary
static String kAdminMenu
          Adds items to a menu called Admin
static String kEditMenu
          Adds items to a menu called Edit
static String kFileMenu
          Adds items to a menu called File
static String kMessagingMenu
          Adds items to a menu called Messaging
static String kModellerMenu
          Adds items to a menu called Modeller
static String kProjectMenu
          Adds items to a menu called Project
static String kWindowMenu
          Adds items to a menu called Window
 
Fields inherited from class au.edu.swin.synergy.kernel.BCommandEvent
connectionID, index, kBroadcast, kClient, kClientDone, kLocal, kServer, kServerDone, networkStatus, serialVersionUID
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
BAddMenuItemCE(Object source, JMenuItem fMenuItem, Object itemName, Object fMenu)
          Creates a new add menu item event with the source, the locale sensitive name of the menu it is to go in and the locale sensitive name of the menu item.
BAddMenuItemCE(Object source, Object fMenu)
          Creates a new add menu item event with the source, the locale sensitive name of the menu it is to go in.
 
Method Summary
 void addSeparator()
          This will put a separator in the menu item in the location relative to calls to addMenuItem.
 int getLocationPolicy()
          This will indicate the location policy for the menu that may be created as a result of adding these menu items.
 BString getPreferredMenuMnemonic()
          This will return the preferred mnemonic for this menu.
 int setLocationPolicy(int locationPolicy)
          This will set the location policy for the menu that may be created as a result of adding these menu items.
 void setPreferredMenuMnemonic(BString preferredMenuMnemonic)
          You can set the mnemonic you prefer for this menu here.
 
Methods inherited from class au.edu.swin.synergy.plugin.mod13.event.BRemoveMenuItemCE
addMenuItem, addMenuItem, getMenuItems, getMenuName, getNameFor
 
Methods inherited from class au.edu.swin.synergy.kernel.BCommandEvent
decrementThreadCount, doComplete, doInit, getAutoComplete, getCompletionObject, getCompletionStatus, getConnectionID, getIndex, getNetworkStatus, getPipe, getUndoable, setAutoComplete, setCompletionObject, setCompletionStatus, setConnectionID, setIndex, setNetworkStatus, setPipe, setThreadCount, setUndoable
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kFileMenu

public static String kFileMenu
Adds items to a menu called File

kEditMenu

public static String kEditMenu
Adds items to a menu called Edit

kWindowMenu

public static String kWindowMenu
Adds items to a menu called Window

kProjectMenu

public static String kProjectMenu
Adds items to a menu called Project

kAdminMenu

public static final String kAdminMenu
Adds items to a menu called Admin

kMessagingMenu

public static final String kMessagingMenu
Adds items to a menu called Messaging

kModellerMenu

public static final String kModellerMenu
Adds items to a menu called Modeller
Constructor Detail

BAddMenuItemCE

public BAddMenuItemCE(Object source,
                      Object fMenu)
Creates a new add menu item event with the source, the locale sensitive name of the menu it is to go in. It is assumed that you will add menu items individuall through the addMenuItem() method. Not doing so will result in a menu with no items being created.
Parameters:
source - The source of the event
fMenu - The name of the menu to add it to

BAddMenuItemCE

public BAddMenuItemCE(Object source,
                      JMenuItem fMenuItem,
                      Object itemName,
                      Object fMenu)
Creates a new add menu item event with the source, the locale sensitive name of the menu it is to go in and the locale sensitive name of the menu item.
Parameters:
source - The source of the event
fMenu - The name of the menu to add it to
menuItemName - The name of the menu item itself
Method Detail

setLocationPolicy

public int setLocationPolicy(int locationPolicy)
This will set the location policy for the menu that may be created as a result of adding these menu items.
Parameters:
locationPolicy - The menu location policy

getLocationPolicy

public int getLocationPolicy()
This will indicate the location policy for the menu that may be created as a result of adding these menu items.
Returns:
The menu location policy

setPreferredMenuMnemonic

public void setPreferredMenuMnemonic(BString preferredMenuMnemonic)
You can set the mnemonic you prefer for this menu here. It should be noted that if another menu already has the mnemonic specified it will be changed to the next available mnemonic.
Parameters:
preferredMnemonic - The preferred mnemonic for this menu

getPreferredMenuMnemonic

public BString getPreferredMenuMnemonic()
This will return the preferred mnemonic for this menu.
Returns:
The preferred mnemonic

addSeparator

public void addSeparator()
This will put a separator in the menu item in the location relative to calls to addMenuItem.

eg. event.addMenuItem(blah1, nameBlah);
event.addMenuItem(blah2, nameBlah);
event.addMenuItem(blah3, nameBlah);
event.addSeparator();
event.addMenuItem(blah4, nameBlah);

Will result in a separator in the menu between menu item blah3 and blah4


Synergy Home Page