org.xith3d.ui.hud.menusystem
Class MenuSystem

java.lang.Object
  extended by org.xith3d.ui.hud.menusystem.MenuSystem

public class MenuSystem
extends java.lang.Object

The MenuSystem is a manager class, that manages instances of MenuGroup, which manage instances of Menu.


Constructor Summary
MenuSystem(HUD hud)
          Creates a new MenuGroup.
MenuSystem(HUD hud, float width, float height)
          Creates a new MenuGroup.
MenuSystem(HUD hud, float width, float height, int menuZIndex)
          Creates a new MenuGroup.
MenuSystem(HUD hud, WidgetContainer parentContainer, float width, float height, int menuZIndex)
          Creates a new MenuGroup.
 
Method Summary
 void addMenuGroup(MenuGroup group)
           
 void addMenuSystemListener(MenuSystemListener l)
          Adds a listner to the MenuSystem, that is notified of MenuSystem state changes.
 Menu findMenu(java.lang.Object menuID)
           
 MenuGroup findMenuGroup(java.lang.Object menuID)
           
protected  boolean fireBeforeMenuSystemStateChanged(java.lang.String currentMenu, java.lang.Object target)
           
protected  boolean fireOnMenuActionPerformed(MenuGroup menuGroup, Menu menu, java.lang.String action)
           
protected  void fireOnMenuSystemEntered()
           
protected  void fireOnMenuSystemExited()
           
protected  void fireOnMenuSystemStateChanged(java.lang.String oldMenu, java.lang.Object target)
           
protected  void fireOnSettingChanged(Menu menu, java.lang.String setting, java.lang.Object value)
           
 Button.Description getAccessorDescription()
           
 WidgetContainer getContainer()
           
 MenuGroup getCurrentMenuGroup()
           
 float getHeight()
           
 HUD getHUD()
           
 org.openmali.vecmath2.Colorf getMenuBackgroundColor()
           
 org.openmali.vecmath2.Colorf getMenuBorderColor()
           
 HUDFont getMenuCaptionFont()
           
 org.openmali.vecmath2.Colorf getMenuCaptionFontColor()
           
 MenuGroup getMenuGroup(int index)
           
 MenuGroup getMenuGroup(java.lang.String name)
           
 int getMenuGroupsCount()
           
 org.jagatoo.input.devices.components.DigitalDeviceComponent getMenuSystemAccessor()
           
 int getMenuZIndex()
           
 float getWidth()
           
 boolean isVisible()
           
protected  void onOtherMenuRequested(java.lang.Object menuID)
           
 void removeMenuSystemListener(MenuSystemListener l)
           
 void setAccessorDescription(Button.Description desc)
           
 void setCurrentMenuGroup(MenuGroup menuGroup)
           
 MenuGroup setCurrentMenuGroup(java.lang.String menuGroupName)
           
 void setMenuBackgroundColor(org.openmali.vecmath2.Colorf color)
           
 void setMenuBorderColor(org.openmali.vecmath2.Colorf color)
           
 void setMenuCaptionFont(HUDFont font)
           
 void setMenuCaptionFontColor(org.openmali.vecmath2.Colorf color)
           
 void setMenuSystemAccessor(org.jagatoo.input.devices.components.DigitalDeviceComponent accessor)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuSystem

public MenuSystem(HUD hud,
                  WidgetContainer parentContainer,
                  float width,
                  float height,
                  int menuZIndex)
Creates a new MenuGroup.

Parameters:
hud - the assotiated HUD
parentContainer - the WidgetContainer, the MenuGroup's Menus are added to. This might be the HUD itself!
width - the design with of the Menus
height - the design height of the Menus
menuZIndex -

MenuSystem

public MenuSystem(HUD hud,
                  float width,
                  float height,
                  int menuZIndex)
Creates a new MenuGroup.

Parameters:
hud - the assotiated HUD
width - the design with of the Menus
height - the design height of the Menus
menuZIndex -

MenuSystem

public MenuSystem(HUD hud,
                  float width,
                  float height)
Creates a new MenuGroup.

Parameters:
hud - the assotiated HUD
width - the design with of the Menus
height - the design height of the Menus

MenuSystem

public MenuSystem(HUD hud)
Creates a new MenuGroup.

Parameters:
hud - the assotiated HUD
Method Detail

setMenuSystemAccessor

public void setMenuSystemAccessor(org.jagatoo.input.devices.components.DigitalDeviceComponent accessor)

getMenuSystemAccessor

public final org.jagatoo.input.devices.components.DigitalDeviceComponent getMenuSystemAccessor()

getHUD

public final HUD getHUD()
Returns:
the assotiated HUD.

getContainer

public final WidgetContainer getContainer()
Returns:
the WidgetContainer, the MenuGroup's Menus are added to. This might be the HUD itself!

getWidth

public final float getWidth()

getHeight

public final float getHeight()

getMenuZIndex

public final int getMenuZIndex()

setVisible

public void setVisible(boolean visible)

isVisible

public final boolean isVisible()

getMenuCaptionFontColor

public final org.openmali.vecmath2.Colorf getMenuCaptionFontColor()

setAccessorDescription

public final void setAccessorDescription(Button.Description desc)

setMenuBackgroundColor

public final void setMenuBackgroundColor(org.openmali.vecmath2.Colorf color)

getMenuBackgroundColor

public final org.openmali.vecmath2.Colorf getMenuBackgroundColor()

setMenuBorderColor

public final void setMenuBorderColor(org.openmali.vecmath2.Colorf color)

getMenuBorderColor

public final org.openmali.vecmath2.Colorf getMenuBorderColor()

setMenuCaptionFont

public final void setMenuCaptionFont(HUDFont font)

getMenuCaptionFont

public final HUDFont getMenuCaptionFont()

setMenuCaptionFontColor

public final void setMenuCaptionFontColor(org.openmali.vecmath2.Colorf color)

getAccessorDescription

public final Button.Description getAccessorDescription()

addMenuGroup

public void addMenuGroup(MenuGroup group)

getMenuGroup

public final MenuGroup getMenuGroup(int index)

getMenuGroup

public final MenuGroup getMenuGroup(java.lang.String name)

getMenuGroupsCount

public final int getMenuGroupsCount()

setCurrentMenuGroup

public void setCurrentMenuGroup(MenuGroup menuGroup)

setCurrentMenuGroup

public MenuGroup setCurrentMenuGroup(java.lang.String menuGroupName)

getCurrentMenuGroup

public final MenuGroup getCurrentMenuGroup()

findMenuGroup

public MenuGroup findMenuGroup(java.lang.Object menuID)

findMenu

public Menu findMenu(java.lang.Object menuID)

addMenuSystemListener

public final void addMenuSystemListener(MenuSystemListener l)
Adds a listner to the MenuSystem, that is notified of MenuSystem state changes.

Parameters:
l -

removeMenuSystemListener

public final void removeMenuSystemListener(MenuSystemListener l)

fireBeforeMenuSystemStateChanged

protected boolean fireBeforeMenuSystemStateChanged(java.lang.String currentMenu,
                                                   java.lang.Object target)

fireOnMenuSystemStateChanged

protected void fireOnMenuSystemStateChanged(java.lang.String oldMenu,
                                            java.lang.Object target)

fireOnSettingChanged

protected void fireOnSettingChanged(Menu menu,
                                    java.lang.String setting,
                                    java.lang.Object value)

fireOnMenuActionPerformed

protected boolean fireOnMenuActionPerformed(MenuGroup menuGroup,
                                            Menu menu,
                                            java.lang.String action)

fireOnMenuSystemEntered

protected void fireOnMenuSystemEntered()

fireOnMenuSystemExited

protected void fireOnMenuSystemExited()

onOtherMenuRequested

protected void onOtherMenuRequested(java.lang.Object menuID)