rero.bridges.menu
Class MenuBridge

java.lang.Object
  extended byrero.bridges.menu.MenuBridge
All Implemented Interfaces:
Environment, Function, Loadable

public class MenuBridge
extends Object
implements Environment, Function, Loadable


Field Summary
protected static String HELP_MENU
           
protected  LinkedHashMap menubarMenus
           
protected  HashMap menus
           
protected static Stack ParentMenu
           
protected static String WINDOW_MENU
           
 
Constructor Summary
MenuBridge()
           
 
Method Summary
 void bindFunction(ScriptInstance si, String type, String description, Block code)
           
 Scalar evaluate(String function, ScriptInstance script, Stack locals)
           
static void FinishParent()
           
static MenuBridgeParent GetParent()
           
 JPopupMenu getPopupMenu(String description, HashMap data)
           
 JPopupMenu getPrimaryPopup(String description)
           
 void installMenubar(JMenuBar bar)
           
protected static boolean isSpecialMenu(String name)
           
protected static boolean isTopLevel(String name)
          returns true if the specified menu name is one of the top level menus we use in the client
 boolean scriptLoaded(ScriptInstance si)
           
 boolean scriptUnloaded(ScriptInstance si)
           
static void SetParent(MenuBridgeParent m)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINDOW_MENU

protected static String WINDOW_MENU

HELP_MENU

protected static String HELP_MENU

ParentMenu

protected static Stack ParentMenu

menubarMenus

protected LinkedHashMap menubarMenus

menus

protected HashMap menus
Constructor Detail

MenuBridge

public MenuBridge()
Method Detail

SetParent

public static void SetParent(MenuBridgeParent m)

GetParent

public static MenuBridgeParent GetParent()

FinishParent

public static void FinishParent()

isTopLevel

protected static boolean isTopLevel(String name)
returns true if the specified menu name is one of the top level menus we use in the client


isSpecialMenu

protected static boolean isSpecialMenu(String name)

bindFunction

public void bindFunction(ScriptInstance si,
                         String type,
                         String description,
                         Block code)
Specified by:
bindFunction in interface Environment

evaluate

public Scalar evaluate(String function,
                       ScriptInstance script,
                       Stack locals)
Specified by:
evaluate in interface Function

scriptLoaded

public boolean scriptLoaded(ScriptInstance si)
Specified by:
scriptLoaded in interface Loadable

getPopupMenu

public JPopupMenu getPopupMenu(String description,
                               HashMap data)

getPrimaryPopup

public JPopupMenu getPrimaryPopup(String description)

installMenubar

public void installMenubar(JMenuBar bar)

scriptUnloaded

public boolean scriptUnloaded(ScriptInstance si)
Specified by:
scriptUnloaded in interface Loadable