Changeset 13649 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/JosmImageView.java
- Timestamp:
- 2018-04-19T22:34:52+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/JosmImageView.java
r12620 r13649 44 44 public JosmImageView(Element elem) throws NoSuchFieldException { 45 45 super(elem); 46 imageField = ImageView.class.getDeclaredField("image");47 stateField = ImageView.class.getDeclaredField("state");48 widthField = ImageView.class.getDeclaredField("width");49 heightField = ImageView.class.getDeclaredField("height");46 imageField = getDeclaredField("image"); 47 stateField = getDeclaredField("state"); 48 widthField = getDeclaredField("width"); 49 heightField = getDeclaredField("height"); 50 50 Utils.setObjectsAccessible(imageField, stateField, widthField, heightField); 51 } 52 53 private static Field getDeclaredField(String name) throws NoSuchFieldException { 54 try { 55 return ImageView.class.getDeclaredField(name); 56 } catch (SecurityException e) { 57 Logging.log(Logging.LEVEL_ERROR, "Unable to access field by reflection", e); 58 return null; 59 } 51 60 } 52 61
Note:
See TracChangeset
for help on using the changeset viewer.