1 package net.mograsim.logic.model.preferences;
3 import net.mograsim.preferences.ColorDefinition;
4 import net.mograsim.preferences.ColorDefinition.BuiltInColor;
5 import net.mograsim.preferences.DefaultPreferences;
7 public class DefaultRenderPreferences extends DefaultPreferences implements RenderPreferences
10 public boolean getBoolean(String name)
16 case DEBUG_OPEN_HLSSHELL:
19 throw new IllegalArgumentException("Unknown boolean preference name: " + name);
24 public int getInt(String name)
28 case DEBUG_HLSSHELL_DEPTH:
37 throw new IllegalArgumentException("Unknown int preference name: " + name);
42 public double getDouble(String name)
46 case LINE_DASH_IMPROVEMENT_FACTOR:
48 case DEFAULT_LINE_WIDTH:
50 case WIRE_WIDTH_SINGLEBIT:
52 case WIRE_WIDTH_MULTIBIT:
54 case SUBMODEL_ZOOM_ALPHA_0:
56 case SUBMODEL_ZOOM_ALPHA_1:
59 throw new IllegalArgumentException("Unknown double preference name: " + name);
64 public String getString(String name)
69 throw new IllegalArgumentException("Unknown string preference name: " + name);
74 public ColorDefinition getColorDefinition(String name)
79 return new ColorDefinition(BuiltInColor.COLOR_GREEN);
81 return new ColorDefinition(BuiltInColor.COLOR_CYAN);
83 return new ColorDefinition(BuiltInColor.COLOR_RED);
85 return new ColorDefinition(BuiltInColor.COLOR_YELLOW);
87 return new ColorDefinition(BuiltInColor.COLOR_GRAY);
88 case BACKGROUND_COLOR:
89 return new ColorDefinition(BuiltInColor.COLOR_WHITE);
90 case FOREGROUND_COLOR:
91 return new ColorDefinition(BuiltInColor.COLOR_BLACK);
93 return new ColorDefinition(BuiltInColor.COLOR_BLACK);
95 throw new IllegalArgumentException("Unknown color preference name: " + name);