Changeset 593 for trunk/src/org/expeditee/gui/AttributeUtils.java
- Timestamp:
- 12/09/13 17:37:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/AttributeUtils.java
r589 r593 52 52 public final List<String> keys = new LinkedList<String>(); 53 53 54 // put an item at the end of the list 54 55 public void put(String attributeName, Method getter, Method setter) { 55 56 if(map.containsKey(attributeName.toLowerCase())) { … … 59 60 keys.add(attributeName.toLowerCase()); 60 61 } 62 map.put(attributeName.toLowerCase(), new Attribute(attributeName, getter, setter)); 63 } 64 65 // put an item at the start of the list 66 public void ins(String attributeName, Method getter, Method setter) { 67 if(map.containsKey(attributeName.toLowerCase())) { 68 System.err.println(this + " already contains key '" + attributeName + "', overwriting value!"); 69 keys.remove(attributeName.toLowerCase()); 70 } 71 // we keep an ordered list of attributes for extraction 72 keys.add(0, attributeName.toLowerCase()); 61 73 map.put(attributeName.toLowerCase(), new Attribute(attributeName, getter, setter)); 62 74 } … … 219 231 // FrameAttribSave has some extra stuff 220 232 _FrameAttribSave.putAll(_FrameAttrib); 221 _FrameAttribSave. put("Version",Frame.class.getMethod("getVersion"),233 _FrameAttribSave.ins("Version",Frame.class.getMethod("getVersion"), 222 234 Frame.class.getMethod("setVersion", pInt)); 223 235 _FrameAttribSave.put("FrozenDate", Frame.class.getMethod("getFrozenDate"), … … 307 319 308 320 // Picture Items 309 _Attrib. put("Image", Picture.class.getMethod("getImageSource"),321 _Attrib.ins("Image", Picture.class.getMethod("getImageSource"), 310 322 Picture.class.getMethod("setImageSource", pString)); 311 323 _Attrib.put("Scale", Picture.class.getMethod("getScaleToSave"),
Note:
See TracChangeset
for help on using the changeset viewer.