moapi.gui
Class GuiController

java.lang.Object
  extended by moapi.gui.GuiController

public class GuiController
extends java.lang.Object

Gui controller for a single mod and all of it's suboption menus Moved from GuiController to Controller

Since:
0.1

Constructor Summary
GuiController()
          Create the controller
 
Method Summary
 void addFormatter(ModOption option, DisplayStringFormatter formatter)
          Add a new formatter for this specific option's output string
 java.lang.String getDisplayString(ModOption o)
          Get the display string for an option, which will use a string formatter to decide the output of the text for a global value
 java.lang.String getDisplayString(ModOption o, boolean localMode)
          Get the display string for an option, which will use a string formatter to decide the output of the text Value is local value if localMode is true, otherwise global
 boolean isWide(ModOption o)
          Check if the given option is in a wide bar format
 void setFormatter(ModOption option, DisplayStringFormatter formatter)
          Set the text formatting class for a specific option's output string and removes all other formatters
 void setWide(ModOption option)
          Sets the named option to show as a full width bar instead of the default half-width
 void setWide(java.lang.String name)
          Sets the named option to show as a full width bar instead of the default half-width
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiController

public GuiController()
Create the controller

Method Detail

setWide

public void setWide(java.lang.String name)
Sets the named option to show as a full width bar instead of the default half-width

Parameters:
name - Name of option to set wide

setWide

public void setWide(ModOption option)
Sets the named option to show as a full width bar instead of the default half-width

Parameters:
option - Option to set wide

isWide

public boolean isWide(ModOption o)
Check if the given option is in a wide bar format

Parameters:
o - Check if this option is wide

setFormatter

public void setFormatter(ModOption option,
                         DisplayStringFormatter formatter)
Set the text formatting class for a specific option's output string and removes all other formatters

Parameters:
option - Option to set a single formatter for
formatter - String formatter

addFormatter

public void addFormatter(ModOption option,
                         DisplayStringFormatter formatter)
Add a new formatter for this specific option's output string

Parameters:
option - Option to add a formatter to
formatter - Formatter to add to this options format queue
Since:
0.6.1

getDisplayString

public java.lang.String getDisplayString(ModOption o)
Get the display string for an option, which will use a string formatter to decide the output of the text for a global value

Parameters:
o - Get display string
Returns:
display string

getDisplayString

public java.lang.String getDisplayString(ModOption o,
                                         boolean localMode)
Get the display string for an option, which will use a string formatter to decide the output of the text Value is local value if localMode is true, otherwise global

Parameters:
o - Get display string
localMode - True if use local valu
Returns:
display string