Changeset 712
- Timestamp:
- 01/16/14 16:22:06 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Help.java
r710 r712 44 44 private static final String commandPadding = " "; 45 45 private static final String padding = " "; 46 private static final String emptyPadding = commandPadding + padding; 46 47 47 48 private static final String command(int mod, int button) { … … 71 72 return "Draw line/arrow"; 72 73 case line: 74 if(FreeItems.isDrawingPolyLine()) return "Spot-weld polyline"; 73 75 if((mod & shift) != 0) return "Extend shape"; 74 76 case dot: … … 94 96 return "Draw rectangle"; 95 97 case line: 98 if(FreeItems.isDrawingPolyLine()) return "Spot-weld & continue"; 96 99 if((mod & shift) != 0) return "Add line"; 100 break; 101 case dot: 102 if((mod & shift) == 0)return "Extend line"; 103 break; 104 } 105 if((other & cursor) != 0) return "Stamp copy"; 106 if((mod & shift) != 0) return "Draw rectangle"; 107 if(context == Context.polygon) return "Copy enclosed items"; 108 return "Copy item"; 109 } 110 111 private static final String left_right(Context context, int mod, int other) { 112 switch(context) { 113 case widget: return null; 97 114 default: 98 if((other & cursor) != 0) return "Stamp copy"; 99 if((mod & shift) != 0) return "Draw rectangle"; 100 if(context == Context.polygon) return "Copy enclosed items"; 101 return "Copy item"; 102 } 103 } 104 105 private static final String left_right(Context context, int mod, int other) { 106 switch(context) { 107 case widget: return null; 108 default: 109 if((other & cursor) == 0 && (context != Context.polygon)) return "Extract attributes"; 115 if((other & cursor) == 0) return "Extract attributes"; 116 return null; 117 case polygon: 110 118 case background: 111 119 return "Auto format"; … … 219 227 String dr = drag_right(context, mod, other); 220 228 221 if(l != null || m != null || r != null || lr != null) status += " Click:"; 222 if(l != null) status += command(mod, left) + l + padding.substring(l.length()); 223 if(m != null) status += command(mod, middle) + m + padding.substring(m.length()); 224 if(r != null) status += command(mod, right) + r + padding.substring(r.length()); 225 if(lr != null) status += command(mod, left | right) + lr + padding.substring(lr.length()); 226 if(mr != null) status += command(mod, middle | right) + mr + padding.substring(mr.length()); 227 if(dl != null || dm != null || dr != null) status += "\n Drag: "; 228 if(dl != null) status += command(mod, left) + dl + padding.substring(dl.length()); 229 if(dm != null) status += command(mod, middle) + dm + padding.substring(dm.length()); 230 if(dr != null) status += command(mod, right) + dr + padding.substring(dr.length()); 231 if(iw != null) status += "\n Widget: " + iw.getClass().getSimpleName(); 229 if(l != null || m != null || r != null || lr != null || mr != null) status += " Click:"; 230 status += (l != null ? command(mod, left) + l + padding.substring(l.length()) : emptyPadding); 231 status += (m != null ? command(mod, middle) + m + padding.substring(m.length()) : emptyPadding); 232 status += (r != null ? command(mod, right) + r + padding.substring(r.length()) : emptyPadding); 233 status += (lr != null ? command(mod, left | right) + lr + padding.substring(lr.length()) : emptyPadding); 234 status += (mr != null ? command(mod, middle | right) + mr + padding.substring(mr.length()) : emptyPadding); 235 if(iw != null) { 236 status += "\n Widget: " + iw.getClass().getSimpleName(); 237 } else { 238 if(dl != null || dm != null || dr != null) status += "\n Drag: "; 239 status += (dl != null ? command(mod, left) + dl + padding.substring(dl.length()) : emptyPadding); 240 status += (dm != null ? command(mod, middle) + dm + padding.substring(dm.length()) : emptyPadding); 241 status += (dr != null ? command(mod, right) + dr + padding.substring(dr.length()) : emptyPadding); 242 } 232 243 233 244
Note:
See TracChangeset
for help on using the changeset viewer.