Changeset 717 for trunk/src/org/expeditee/settings/UserSettings.java
- Timestamp:
- 01/17/14 18:22:43 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/settings/UserSettings.java
r706 r717 41 41 public final static String DEFAULT_PROFILE_NAME = "default"; 42 42 43 /*44 * General settings (no setter functions)45 */46 47 public static final FloatSetting ScaleFactor = new FloatSetting("Scale Factor for drawing (TODO: does this even do anything?)", 1F);48 49 public static final FloatSetting FormatSpacingMin = new FloatSetting("Minimum spacing ratio", null);50 51 public static final FloatSetting FormatSpacingMax = new FloatSetting("Maximum spacing ratio", null);52 53 43 public static final IntegerSetting Gravity = new IntegerSetting("Distance the cursor has to be from a text item to select the text item", 3); 54 55 public static final IntegerSetting LineStraightenThreshold = new IntegerSetting("Threshold for straightening a line (TODO: does this even do anything?)", 15); 56 57 public static final IntegerSetting NoOpThreshold = new IntegerSetting("Distance the cursor may be dragged while clicking before the operation is cancelled", 60); 58 59 public static final IntegerSetting TitlePosition = new IntegerSetting("Position of title item in frame (TODO: find whether this is x-offset or y-offset)", 150); 60 61 public static final IntegerSetting InitialWidth = new IntegerSetting("Initial width of Expeditee window", 1024); 62 63 public static final IntegerSetting InitialHeight = new IntegerSetting("Initial height of Expeditee window", 768); 64 65 public static final StringSetting ProfileName = new StringSetting("Profile name", FrameIO.ConvertToValidFramesetName(System.getProperty("user.name"))); 66 67 public static final StringSetting UserName = new StringSetting("User name", ProfileName.get()); 68 69 public static final BooleanSetting AntiAlias = new BooleanSetting("Whether anti-aliasing should be enabled", false); 70 71 public static final BooleanSetting LineHighlight = new BooleanSetting("Whether lines should be highlighted", false); 72 73 public static final BooleanSetting Logging = new BooleanSetting("Whether logging should be enabled", false); 74 75 public static final BooleanSetting LogStats = new BooleanSetting("Whether stats should be logged", true); 76 77 public static final BooleanSetting Threading = new BooleanSetting("Whether threading should be enabled", true); 78 79 80 /* 81 * Frames 82 */ 83 public static final StringSetting DefaultFrame = new StringSetting("The default frame", null) { 84 @Override 85 public boolean setSetting(Text text) { 86 _value = FrameUtils.getLink(text, _value); 87 return true; 88 } 89 }; 90 91 public static final StringSetting StatisticsFrameset = new StringSetting("The statistics frameset", null); 92 93 public static final StringSetting MenuFrame = new StringSetting("The menu frame", null); 94 44 45 /* 46 * Stuff that goes first 47 */ 95 48 public static final StringSetting HomeFrame = new StringSetting("The home frame", null) { 96 49 @Override … … 113 66 } 114 67 }; 68 public static final StringSetting DefaultFrame = new StringSetting("The default frame", null) { 69 @Override 70 public boolean setSetting(Text text) { 71 _value = FrameUtils.getLink(text, _value); 72 return true; 73 } 74 }; 75 public static final IntegerSetting InitialWidth = new IntegerSetting("Initial width of Expeditee window", 1024); 76 77 public static final IntegerSetting InitialHeight = new IntegerSetting("Initial height of Expeditee window", 768); 78 79 public static final TextSetting ItemTemplate = new TextSetting("Template for normal text items") { 80 @Override 81 public boolean setSetting(Text text) { 82 _value = text.getTemplateForm(); 83 return true; 84 } 85 86 @Override 87 public Text generateText() { 88 return new Text("ItemTemplate"); 89 } 90 }; 91 public static final TextSetting AnnotationTemplate = new TextSetting("Template for annotation text items") { 92 @Override 93 public boolean setSetting(Text text) { 94 _value = text.getTemplateForm(); 95 return true; 96 } 97 @Override 98 public Text generateText() { 99 Text t = new Text("AnnotationTemplate"); 100 t.setColor(Color.gray); 101 return t; 102 } 103 }; 104 105 public static final TextSetting CommentTemplate = new TextSetting("Template for code comment text items") { 106 @Override 107 public boolean setSetting(Text text) { 108 _value = text.getTemplateForm(); 109 return true; 110 } 111 @Override 112 public Text generateText() { 113 Text t = new Text("CommentTemplate"); 114 t.setColor(Color.green.darker()); 115 return t; 116 } 117 }; 118 119 public static final TextSetting StatTemplate = new TextSetting("Template for statistics (e.g. extracted attributes) text items") { 120 @Override 121 public boolean setSetting(Text text) { 122 _value = text.getTemplateForm(); 123 return true; 124 } 125 @Override 126 public Text generateText() { 127 Text t = new Text("StatsTemplate"); 128 t.setColor(Color.BLACK); 129 t.setBackgroundColor(new Color(0.9F, 0.9F, 0.9F)); 130 t.setFamily(Text.MONOSPACED_FONT); 131 t.setSize(14); 132 return t; 133 } 134 }; 135 136 /* 137 * General settings (no setter functions) 138 */ 139 140 public static final FloatSetting ScaleFactor = new FloatSetting("Scale Factor for drawing (TODO: does this even do anything?)", 1F); 141 142 public static final FloatSetting FormatSpacingMin = new FloatSetting("Minimum spacing ratio", null); 143 144 public static final FloatSetting FormatSpacingMax = new FloatSetting("Maximum spacing ratio", null); 145 146 public static final IntegerSetting LineStraightenThreshold = new IntegerSetting("Threshold for straightening a line (TODO: does this even do anything?)", 15); 147 148 public static final IntegerSetting NoOpThreshold = new IntegerSetting("Distance the cursor may be dragged while clicking before the operation is cancelled", 60); 149 150 public static final IntegerSetting TitlePosition = new IntegerSetting("Position of title item in frame (TODO: find whether this is x-offset or y-offset)", 150); 151 152 public static final StringSetting ProfileName = new StringSetting("Profile name", FrameIO.ConvertToValidFramesetName(System.getProperty("user.name"))); 153 154 public static final StringSetting UserName = new StringSetting("User name", ProfileName.get()); 155 156 public static final BooleanSetting AntiAlias = new BooleanSetting("Whether anti-aliasing should be enabled", false); 157 158 public static final BooleanSetting LineHighlight = new BooleanSetting("Whether lines should be highlighted", false); 159 160 public static final BooleanSetting Logging = new BooleanSetting("Whether logging should be enabled", false); 161 162 public static final BooleanSetting LogStats = new BooleanSetting("Whether stats should be logged", true); 163 164 public static final BooleanSetting Threading = new BooleanSetting("Whether threading should be enabled", true); 165 166 167 /* 168 * Frames 169 */ 170 171 public static final StringSetting StatisticsFrameset = new StringSetting("The statistics frameset", null); 172 173 public static final StringSetting MenuFrame = new StringSetting("The menu frame", null); 115 174 116 175 /* … … 197 256 }; 198 257 199 public static final TextSetting ItemTemplate = new TextSetting("Template for normal text items") {258 public static final TextSetting DotTemplate = new TextSetting("Template for dot items") { 200 259 @Override 201 260 public boolean setSetting(Text text) { … … 206 265 @Override 207 266 public Text generateText() { 208 return new Text("ItemTemplate");209 }210 };211 212 public static final TextSetting DotTemplate = new TextSetting("Template for dot items") {213 @Override214 public boolean setSetting(Text text) {215 _value = text.getTemplateForm();216 return true;217 }218 219 @Override220 public Text generateText() {221 267 return new Text("DotTemplate"); 222 }223 };224 225 public static final TextSetting AnnotationTemplate = new TextSetting("Template for annotation text items") {226 @Override227 public boolean setSetting(Text text) {228 _value = text.getTemplateForm();229 return true;230 }231 @Override232 public Text generateText() {233 Text t = new Text("AnnotationTemplate");234 t.setColor(Color.gray);235 return t;236 }237 };238 239 public static final TextSetting CodeCommentTemplate = new TextSetting("Template for code comment text items") {240 @Override241 public boolean setSetting(Text text) {242 _value = text.getTemplateForm();243 return true;244 }245 @Override246 public Text generateText() {247 Text t = new Text("CommentTemplate");248 t.setColor(Color.green.darker());249 return t;250 }251 };252 253 public static final TextSetting StatTemplate = new TextSetting("Template for statistics (e.g. extracted attributes) text items") {254 @Override255 public boolean setSetting(Text text) {256 _value = text.getTemplateForm();257 return true;258 }259 @Override260 public Text generateText() {261 Text t = new Text("StatsTemplate");262 t.setColor(Color.BLACK);263 t.setBackgroundColor(new Color(0.9F, 0.9F, 0.9F));264 t.setFamily(Text.MONOSPACED_FONT);265 t.setSize(14);266 return t;267 268 } 268 269 };
Note:
See TracChangeset
for help on using the changeset viewer.