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 ColorDefinition getColorDefinition(String name)
69 return new ColorDefinition(BuiltInColor.COLOR_GREEN);
71 return new ColorDefinition(BuiltInColor.COLOR_CYAN);
73 return new ColorDefinition(BuiltInColor.COLOR_RED);
75 return new ColorDefinition(BuiltInColor.COLOR_YELLOW);
77 return new ColorDefinition(BuiltInColor.COLOR_GRAY);
78 case BACKGROUND_COLOR:
79 return new ColorDefinition(BuiltInColor.COLOR_WHITE);
80 case FOREGROUND_COLOR:
81 return new ColorDefinition(BuiltInColor.COLOR_BLACK);
83 return new ColorDefinition(BuiltInColor.COLOR_BLACK);
85 throw new IllegalArgumentException("Unknown color preference name: " + name);