g-Eclipse
Release 1.0.0

eu.geclipse.servicejob.ui.preferences
Class PreferencesManager

java.lang.Object
  extended by eu.geclipse.servicejob.ui.preferences.PreferencesManager

public class PreferencesManager
extends java.lang.Object

Class managing preferences of mapping of Operator's Job's states to colors which should be used for displaying those states.
Singleton class.


Method Summary
 Color getColor(java.lang.String result)
          Gets color which should be used for displaying given status of Operator's Job.
 java.util.Map<ServiceJobStates,Color> getColorMapping()
          Method for accessing map with mapping from Operator's Job's states to colors which should be used for displaying those states.
static PreferencesManager getManager()
          Method for accessing singleton object of PreferencesManager class.
 void saveState(java.util.Map<ServiceJobStates,Color> map)
          Serializes given mapping of Operator's Job statuses to colors to memento file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getManager

public static PreferencesManager getManager()
Method for accessing singleton object of PreferencesManager class.

Returns:
the only existing PreferencesManager object

getColorMapping

public java.util.Map<ServiceJobStates,Color> getColorMapping()
Method for accessing map with mapping from Operator's Job's states to colors which should be used for displaying those states.

Returns:
map loaded from memento file or - in absence of this file - default values.

getColor

public Color getColor(java.lang.String result)
Gets color which should be used for displaying given status of Operator's Job.

Parameters:
result - string representation of Operator's Job status
Returns:
color which should be used for presenting given status to user

saveState

public void saveState(java.util.Map<ServiceJobStates,Color> map)
Serializes given mapping of Operator's Job statuses to colors to memento file.

Parameters:
map - for serialization - mapping from Operator's Job's statuses to colors which should be used for dysplaying those statuses

g-Eclipse
Release 1.0.0