1 package net.mograsim.preferences;
3 import org.eclipse.swt.graphics.Color;
5 public abstract class Preferences
7 private static Preferences currentPreferences;
9 public static void setPreferences(Preferences preferences)
11 if (preferences == null)
12 throw new NullPointerException();
13 currentPreferences = preferences;
16 public static Preferences current()
18 if (currentPreferences == null)
19 currentPreferences = new DefaultPreferences();
20 return currentPreferences;
23 public abstract ColorDefinition getColorDefinition(String name);
25 public Color getColor(String name)
27 return ColorManager.current().toColor(getColorDefinition(name));