Changeset 155 in josm for src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
- Timestamp:
- 2006-10-08T17:29:58+02:00 (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r153 r155 42 42 * @author imi 43 43 */ 44 public class LayerList extends ToggleDialog implements LayerChangeListener {44 public class LayerListDialog extends ToggleDialog implements LayerChangeListener { 45 45 46 46 /** … … 57 57 super(tr("Delete"), ImageProvider.get("dialogs", "delete")); 58 58 putValue(SHORT_DESCRIPTION, tr("Delete the selected layer.")); 59 putValue("help", "Dialog/LayerList/Delete"); 59 60 this.layer = layer; 60 61 } … … 79 80 super(tr("Show/Hide"), ImageProvider.get("dialogs", "showhide")); 80 81 putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the selected layer.")); 82 putValue("help", "Dialog/LayerList/ShowHide"); 81 83 this.layer = layer; 82 84 } … … 96 98 /** 97 99 * The merge action. This is only called, if the current selection and its 98 * item below are editable datasets and the merge button is clicked. 100 * item below are editable datasets and the merge button is clicked. 99 101 */ 100 102 private final JButton mergeButton = new JButton(ImageProvider.get("dialogs", "mergedown")); … … 115 117 * Create an layerlist and attach it to the given mapView. 116 118 */ 117 public LayerList (MapFrame mapFrame) {119 public LayerListDialog(MapFrame mapFrame) { 118 120 super(tr("Layers"), "layerlist", tr("Open a list of all loaded layers."), KeyEvent.VK_L, 100); 119 121 instance = new JList(model); … … 123 125 @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 124 126 Layer layer = (Layer)value; 125 JLabel label = (JLabel)super.getListCellRendererComponent(list, 127 JLabel label = (JLabel)super.getListCellRendererComponent(list, 126 128 layer.name, index, isSelected, cellHasFocus); 127 129 Icon icon = layer.getIcon(); … … 158 160 Layer layer = (Layer)instance.getModel().getElementAt(index); 159 161 LayerListPopup menu = new LayerListPopup(instance, layer); 160 menu.show(LayerList .this, e.getX(), e.getY());162 menu.show(LayerListDialog.this, e.getX(), e.getY()); 161 163 } 162 164 @Override public void mousePressed(MouseEvent e) { … … 191 193 upButton.addActionListener(upDown); 192 194 upButton.setActionCommand("up"); 195 upButton.putClientProperty("help", "Dialog/LayerList/Up"); 193 196 buttonPanel.add(upButton); 194 197 … … 196 199 downButton.addActionListener(upDown); 197 200 downButton.setActionCommand("down"); 201 downButton.putClientProperty("help", "Dialog/LayerList/Down"); 198 202 buttonPanel.add(downButton); 199 203 … … 215 219 mapView.removeLayer(lFrom); 216 220 } 217 }); 221 }); 222 mergeButton.putClientProperty("help", "Dialog/LayerList/Merge"); 218 223 buttonPanel.add(mergeButton); 219 224
Note:
See TracChangeset
for help on using the changeset viewer.