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)
71 return "10, 0.25, 0.25, 1.5, 0.25, 0.25";
73 return "10, 0.25, 0.25, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25, 0.25";
75 return "10, 0.25, 0.25, 0.25, 1, 0.25, 0.25, 0.25";
77 return "10, 0.5, 1.5, 0.5";
79 throw new IllegalArgumentException("Unknown string preference name: " + name);
84 public ColorDefinition getColorDefinition(String name)
89 return new ColorDefinition(BuiltInColor.COLOR_GREEN);
91 return new ColorDefinition(BuiltInColor.COLOR_CYAN);
93 return new ColorDefinition(BuiltInColor.COLOR_RED);
95 return new ColorDefinition(BuiltInColor.COLOR_YELLOW);
97 return new ColorDefinition(BuiltInColor.COLOR_GRAY);
98 case BACKGROUND_COLOR:
99 return new ColorDefinition(BuiltInColor.COLOR_WHITE);
100 case FOREGROUND_COLOR:
101 return new ColorDefinition(BuiltInColor.COLOR_BLACK);
103 return new ColorDefinition(BuiltInColor.COLOR_BLACK);
105 throw new IllegalArgumentException("Unknown color preference name: " + name);