Changeset 32580 in osm for applications
- Timestamp:
- 2016-07-05T14:49:06+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryChangesetDialog.java
r32577 r32580 20 20 import javax.swing.SwingUtilities; 21 21 import javax.swing.tree.DefaultMutableTreeNode; 22 import javax.swing.tree.DefaultTreeCellRenderer;23 22 import javax.swing.tree.DefaultTreeModel; 24 23 import javax.swing.tree.TreeSelectionModel; … … 70 69 private MapillaryChangesetDialog() { 71 70 super( 72 tr("Current Mapillary changeset"), "mapillaryhistory.png", tr("Open Mapillary changeset dialog"), 71 tr("Current Mapillary changeset"), 72 "mapillaryhistory.png", 73 tr("Open Mapillary changeset dialog"), 73 74 Shortcut.registerShortcut( 74 75 tr("Mapillary changeset"), tr("Open Mapillary changeset dialog"), KeyEvent.VK_9, Shortcut.NONE 75 ), 200 76 ), 77 200 76 78 ); 77 79 … … 82 84 this.changesetTree.setShowsRootHandles(true); 83 85 this.changesetTree.setRootVisible(false); 84 this.changesetTree.setCellRenderer(new Mapillary CellRenderer());86 this.changesetTree.setCellRenderer(new MapillaryImageTreeCellRenderer()); 85 87 this.changesetTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); 86 88 … … 105 107 */ 106 108 public static synchronized MapillaryChangesetDialog getInstance() { 107 if (instance == null) 109 if (instance == null) { 108 110 instance = new MapillaryChangesetDialog(); 111 } 109 112 return instance; 110 113 } … … 148 151 buildTree(); 149 152 } 150 151 153 } 152 154 … … 166 168 } 167 169 } 168 169 private static class MapillaryCellRenderer extends DefaultTreeCellRenderer {170 171 private static final long serialVersionUID = -3129520241562296901L;172 173 @Override174 public Component getTreeCellRendererComponent(175 JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus176 ) {177 super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);178 setIcon(ImageProvider.get("data/node.png"));179 return this;180 }181 }182 183 170 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryHistoryDialog.java
r32396 r32580 26 26 import javax.swing.event.TreeSelectionListener; 27 27 import javax.swing.tree.DefaultMutableTreeNode; 28 import javax.swing.tree.DefaultTreeCellRenderer;29 28 import javax.swing.tree.DefaultTreeModel; 30 29 import javax.swing.tree.TreeSelectionModel; … … 88 87 this.undoTree.setShowsRootHandles(true); 89 88 this.undoTree.setRootVisible(false); 90 this.undoTree.setCellRenderer(new Mapillary CellRenderer());89 this.undoTree.setCellRenderer(new MapillaryImageTreeCellRenderer()); 91 90 this.undoTree.getSelectionModel().setSelectionMode( 92 91 TreeSelectionModel.SINGLE_TREE_SELECTION); … … 97 96 98 97 this.redoTree.expandRow(0); 99 this.redoTree.setCellRenderer(new Mapillary CellRenderer());98 this.redoTree.setCellRenderer(new MapillaryImageTreeCellRenderer()); 100 99 this.redoTree.setShowsRootHandles(true); 101 100 this.redoTree.setRootVisible(false); … … 227 226 } 228 227 229 private static class MapillaryCellRenderer extends DefaultTreeCellRenderer {230 231 private static final long serialVersionUID = -3129520241562296901L;232 233 @Override234 public Component getTreeCellRendererComponent(235 JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus236 ) {237 super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);238 setIcon(ImageProvider.get("data/node.png"));239 return this;240 }241 }242 243 228 /** 244 229 * Destroys the unique instance of the class.
Note:
See TracChangeset
for help on using the changeset viewer.