Ignore:
Timestamp:
2006-10-08T17:29:58+02:00 (18 years ago)
Author:
imi
Message:
  • added online help system
File:
1 moved

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r153 r155  
    4242 * @author imi
    4343 */
    44 public class LayerList extends ToggleDialog implements LayerChangeListener {
     44public class LayerListDialog extends ToggleDialog implements LayerChangeListener {
    4545
    4646        /**
     
    5757                        super(tr("Delete"), ImageProvider.get("dialogs", "delete"));
    5858                        putValue(SHORT_DESCRIPTION, tr("Delete the selected layer."));
     59                        putValue("help", "Dialog/LayerList/Delete");
    5960                        this.layer = layer;
    6061                }
     
    7980                        super(tr("Show/Hide"), ImageProvider.get("dialogs", "showhide"));
    8081                        putValue(SHORT_DESCRIPTION, tr("Toggle visible state of the selected layer."));
     82                        putValue("help", "Dialog/LayerList/ShowHide");
    8183                        this.layer = layer;
    8284                }
     
    9698        /**
    9799         * 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.
    99101         */
    100102        private final JButton mergeButton = new JButton(ImageProvider.get("dialogs", "mergedown"));
     
    115117         * Create an layerlist and attach it to the given mapView.
    116118         */
    117         public LayerList(MapFrame mapFrame) {
     119        public LayerListDialog(MapFrame mapFrame) {
    118120                super(tr("Layers"), "layerlist", tr("Open a list of all loaded layers."), KeyEvent.VK_L, 100);
    119121                instance = new JList(model);
     
    123125                        @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    124126                                Layer layer = (Layer)value;
    125                                 JLabel label = (JLabel)super.getListCellRendererComponent(list, 
     127                                JLabel label = (JLabel)super.getListCellRendererComponent(list,
    126128                                                layer.name, index, isSelected, cellHasFocus);
    127129                                Icon icon = layer.getIcon();
     
    158160                                Layer layer = (Layer)instance.getModel().getElementAt(index);
    159161                                LayerListPopup menu = new LayerListPopup(instance, layer);
    160                                 menu.show(LayerList.this, e.getX(), e.getY());
     162                                menu.show(LayerListDialog.this, e.getX(), e.getY());
    161163                        }
    162164                        @Override public void mousePressed(MouseEvent e) {
     
    191193                upButton.addActionListener(upDown);
    192194                upButton.setActionCommand("up");
     195                upButton.putClientProperty("help", "Dialog/LayerList/Up");
    193196                buttonPanel.add(upButton);
    194197
     
    196199                downButton.addActionListener(upDown);
    197200                downButton.setActionCommand("down");
     201                downButton.putClientProperty("help", "Dialog/LayerList/Down");
    198202                buttonPanel.add(downButton);
    199203
     
    215219                                mapView.removeLayer(lFrom);
    216220                        }
    217                 });             
     221                });
     222                mergeButton.putClientProperty("help", "Dialog/LayerList/Merge");
    218223                buttonPanel.add(mergeButton);
    219224
Note: See TracChangeset for help on using the changeset viewer.