org.gswing.components.common
Class Properties

java.lang.Object
  extended by org.gswing.components.common.Properties

public class Properties
extends Object

Purpose: Reads the properties files and sets global properties.


Constructor Summary
Properties(IPropertyManagement propManager)
          Constructor.
Properties(URL url, String propertiesFile)
          Constructor.
 
Method Summary
static String getHome()
          Get the path of the installation directory.
static Color getPartyColour(String party)
          Get the colour of a party from the map.
 boolean readProperties()
          Read and load the property file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Properties

public Properties(IPropertyManagement propManager)
Constructor.

Parameters:
propManager - The property manager.

Properties

public Properties(URL url,
                  String propertiesFile)
Constructor.

Parameters:
url - The base URL where gswing is installed.
propertiesFile - The properties file name.
Method Detail

readProperties

public boolean readProperties()
Read and load the property file.

Returns:
True if file is successfully read.

getHome

public static String getHome()
Get the path of the installation directory.


getPartyColour

public static Color getPartyColour(String party)
Get the colour of a party from the map. Grey and White are reserved for Independent and Others respectively. An unknown party is black.

Parameters:
party - The party abbreviation.
Returns:
The party colour.


Copyright © 2008. All Rights Reserved.