org.mars_sim.msp.ui.standard
Class UIConfig

java.lang.Object
  extended by org.mars_sim.msp.ui.standard.UIConfig

public class UIConfig
extends java.lang.Object


Field Summary
static UIConfig INSTANCE
           
static java.lang.String TOOL
           
static java.lang.String UNIT
           
 
Method Summary
 java.awt.Dimension getInternalWindowDimension(java.lang.String windowName)
          Gets the size of an internal window.
 java.awt.Point getInternalWindowLocation(java.lang.String windowName)
          Gets the origin location of an internal window on the desktop.
 java.util.List<java.lang.String> getInternalWindowNames()
          Gets all of the internal window names.
 java.lang.String getInternalWindowType(java.lang.String windowName)
          Gets the internal window type.
 int getInternalWindowZOrder(java.lang.String windowName)
          Gets the z order of an internal window on the desktop.
 java.awt.Dimension getMainWindowDimension()
          Gets the size of the main window.
 java.awt.Point getMainWindowLocation()
          Gets the screen location of the main window origin.
 float getVolume()
          Gets the sound volume level.
 boolean isInternalWindowConfigured(java.lang.String windowName)
          Checks if internal window is configured.
 boolean isInternalWindowDisplayed(java.lang.String windowName)
          Checks if an internal window is displayed.
 boolean isMute()
          Checks if sound volume is set to mute.
 void parseFile()
          Loads and parses the XML save file.
 void saveFile(MainWindow window)
          Creates an XML document for the UI configuration and saves it to a file.
 boolean useNativeLookAndFeel()
          Checks if UI should use native or default look & feel.
 boolean useUIDefault()
          Checks if UI should use default configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final UIConfig INSTANCE

TOOL

public static final java.lang.String TOOL
See Also:
Constant Field Values

UNIT

public static final java.lang.String UNIT
See Also:
Constant Field Values
Method Detail

parseFile

public void parseFile()
Loads and parses the XML save file.


saveFile

public void saveFile(MainWindow window)
Creates an XML document for the UI configuration and saves it to a file.

Parameters:
window - the main window.

useUIDefault

public boolean useUIDefault()
Checks if UI should use default configuration.

Returns:
true if default.

useNativeLookAndFeel

public boolean useNativeLookAndFeel()
Checks if UI should use native or default look & feel.

Returns:
true if native.

getMainWindowLocation

public java.awt.Point getMainWindowLocation()
Gets the screen location of the main window origin.

Returns:
location.

getMainWindowDimension

public java.awt.Dimension getMainWindowDimension()
Gets the size of the main window.

Returns:
size.

getVolume

public float getVolume()
Gets the sound volume level.

Returns:
volume (0 (silent) to 1 (loud)).

isMute

public boolean isMute()
Checks if sound volume is set to mute.

Returns:
true if mute.

isInternalWindowDisplayed

public boolean isInternalWindowDisplayed(java.lang.String windowName)
Checks if an internal window is displayed.

Parameters:
windowName - the window name.
Returns:
true if displayed.

getInternalWindowLocation

public java.awt.Point getInternalWindowLocation(java.lang.String windowName)
Gets the origin location of an internal window on the desktop.

Parameters:
windowName - the window name.
Returns:
location.

getInternalWindowZOrder

public int getInternalWindowZOrder(java.lang.String windowName)
Gets the z order of an internal window on the desktop.

Parameters:
windowName - the window name.
Returns:
z order (lower number represents higher up)

getInternalWindowDimension

public java.awt.Dimension getInternalWindowDimension(java.lang.String windowName)
Gets the size of an internal window.

Parameters:
windowName - the window name.
Returns:
size.

getInternalWindowType

public java.lang.String getInternalWindowType(java.lang.String windowName)
Gets the internal window type.

Parameters:
windowName - the window name.
Returns:
"unit" or "tool".

isInternalWindowConfigured

public boolean isInternalWindowConfigured(java.lang.String windowName)
Checks if internal window is configured.

Parameters:
windowName - the window name.
Returns:
true if configured.

getInternalWindowNames

public java.util.List<java.lang.String> getInternalWindowNames()
Gets all of the internal window names.

Returns:
list of window names.