Synergy Home Page

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

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
Direct Known Subclasses:
BAddMenuItemCE

public class BRemoveMenuItemCE
extends BWindowCE

When a plugin wishes to remove menu items from a particular menu, this event is reuqired. It works exactly the same way as the BAddMenuItemCE but in the reverse, obviously.

Author:
Tristan Austin
See Also:
Serialized Form

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
BRemoveMenuItemCE(Object source, JMenuItem fMenuItem, Object itemName, Object fMenu)
          Creates a new remove menu item event with the given menu item to remove along with the source and the name of the menu to remove it from.
BRemoveMenuItemCE(Object source, Object fMenu)
          Creates a new remove menu item event with the source and the name of the menu to remove the menu items specified later from.
 
Method Summary
 void addMenuItem(JComponent menuItem)
          This method allows you to add a menu item without specifying a BString object to go with it.
 void addMenuItem(JComponent menuItem, Object itemName)
          This will allow more menu items to be added to the event so be grouped together in the menu
 Vector getMenuItems()
          Gets the list of menu items to add to the specified menu
 Object getMenuName()
          This will return the name for the menu item as an object.
 BString getNameFor(JMenuItem menuItem)
          This will get the BString associated with the given menu item.
 
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
 

Constructor Detail

BRemoveMenuItemCE

public BRemoveMenuItemCE(Object source,
                         Object fMenu)
Creates a new remove menu item event with the source and the name of the menu to remove the menu items specified later from. You can specify additional menu items to be removed from the same menu by using the addMenuItem method or the setMenuItems method.
Parameters:
source - The source of the event
fMenuItem - The menu item to remove
fMenu - The name of the menu to remove from

BRemoveMenuItemCE

public BRemoveMenuItemCE(Object source,
                         JMenuItem fMenuItem,
                         Object itemName,
                         Object fMenu)
Creates a new remove menu item event with the given menu item to remove along with the source and the name of the menu to remove it from. You can specify additional menu items to be removed from the same menu by using the addMenuItem method or the setMenuItems method.
Parameters:
source - The source of the event
fMenuItem - The menu item to remove
fMenu - The name of the menu to remove from
Method Detail

getMenuItems

public Vector getMenuItems()
Gets the list of menu items to add to the specified menu
Parameters:
-  
Returns:
A Vector of menu items to add Please complete the missing tags for getMenuItems
Pre Condition:
 
Post Condition:
 

getNameFor

public BString getNameFor(JMenuItem menuItem)
This will get the BString associated with the given menu item.
Parameters:
menuItem - The menu item to get the name for
Returns:
The name as a BString

getMenuName

public Object getMenuName()
This will return the name for the menu item as an object. The reason it is an object is that it may either be Locale specific or it may simply be a static string.

Either way, calling to string on the object returned will yield the name of the menu.

Parameters:
-  
Returns:
 
Throws:
-  
Pre Condition:
 
Post Condition:
 

addMenuItem

public void addMenuItem(JComponent menuItem,
                        Object itemName)
This will allow more menu items to be added to the event so be grouped together in the menu
Parameters:
menuItem - The menu item to add to the menu specified in the constructor Please complete the missing tags for addMenuItem
Returns:
 
Pre Condition:
 
Post Condition:
 

addMenuItem

public void addMenuItem(JComponent menuItem)
This method allows you to add a menu item without specifying a BString object to go with it. It should be realised that using this alternative implies that you will not have locale support in the menu item
Parameters:
menuItem - The menu item to add

Synergy Home Page