Changeset 19366 in osm for applications
- Timestamp:
- 2010-01-10T14:18:41+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java
r19282 r19366 97 97 private JTabbedPane tabbedPane = new JTabbedPane(); 98 98 private boolean queuePanelVisible = false; 99 99 100 100 private boolean buttonLabels = Main.pref.getBoolean(ConfigKeys.OSB_BUTTON_LABELS); 101 101 … … 118 118 bugList.setCellRenderer(new OsbBugListCellRenderer()); 119 119 bugListPanel.add(new JScrollPane(bugList), BorderLayout.CENTER); 120 120 121 121 // create dialog buttons 122 122 GridLayout layout = buttonLabels ? new GridLayout(3, 2) : new GridLayout(1, 5); … … 152 152 toggleConnectionMode.doClick(); 153 153 } 154 155 154 156 155 AddCommentAction addCommentAction = new AddCommentAction(this); … … 174 173 buttonPanel.add(addComment); 175 174 buttonPanel.add(closeIssue); 176 175 177 176 queuePanel = new JPanel(new BorderLayout()); 178 177 queuePanel.setName(tr("Queue")); … … 187 186 try { 188 187 ActionQueue.getInstance().processQueue(); 189 188 190 189 // refresh, if the api is enabled 191 190 if(!Main.pref.getBoolean(ConfigKeys.OSB_API_DISABLED)) { … … 226 225 lastNode = listItem.getNode(); 227 226 } 228 227 229 228 // create a new list model 230 229 bugListModel = new DefaultListModel(); … … 237 236 } 238 237 bugList.setModel(bugListModel); 239 238 240 239 // restore the last selection 241 240 if(lastNode != null) { … … 377 376 super.showDialog(); 378 377 } 379 378 380 379 public void showQueuePanel() { 381 380 if(!queuePanelVisible) { … … 389 388 } 390 389 } 391 390 392 391 public void hideQueuePanel() { 393 392 if(queuePanelVisible) { … … 400 399 } 401 400 } 402 401 403 402 public Node getSelectedNode() { 404 403 return ((OsbListItem)bugList.getSelectedValue()).getNode(); 405 404 } 406 405 407 406 public void setSelectedNode(Node node) { 408 407 bugList.setSelectedValue(new OsbListItem(node), true); 409 408 } 410 409 411 410 public void setConnectionMode(boolean offline) { 412 411 refresh.setEnabled(!offline); 413 setTitle("OpenStreetBugs ( " +(offline ? "offline":"online")+ ")");412 setTitle(tr("OpenStreetBugs ({0})", (offline ? tr("offline") : tr("online")))); 414 413 toggleConnectionMode.setSelected(offline); 415 414 }
Note:
See TracChangeset
for help on using the changeset viewer.