g-Eclipse
Release 1.0.0

eu.geclipse.servicejob.ui.preferences
Class MementoHandler

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

public class MementoHandler
extends java.lang.Object

Helper class for handling memento file with information of colors used for showing different Operator's Jobs result.


Constructor Summary
MementoHandler()
           
 
Method Summary
static boolean isChanged()
          Method to access flag indicating that color mapping has changed.
static java.util.Map<ServiceJobStates,Color> loadState()
          Method for loading saved state from memento file or - in absence of such a file - loading default values for colors.
static void saveState(java.util.Map<ServiceJobStates,Color> values)
          Method to serialize color mapping to memento file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MementoHandler

public MementoHandler()
Method Detail

loadState

public static java.util.Map<ServiceJobStates,Color> loadState()
Method for loading saved state from memento file or - in absence of such a file - loading default values for colors.

Returns:
mapping of Operator's Job's states to colors.

saveState

public static void saveState(java.util.Map<ServiceJobStates,Color> values)
Method to serialize color mapping to memento file.

Parameters:
values - map with mapping from Operator's Job's states to colors which should be used to displaying those states.

isChanged

public static boolean isChanged()
Method to access flag indicating that color mapping has changed.

Returns:
true if map has changed, false otherwise

g-Eclipse
Release 1.0.0