Changeset 2947 in josm for trunk/src/org


Ignore:
Timestamp:
2010-02-06T22:38:42+01:00 (14 years ago)
Author:
Gubaer
Message:

fixed order of command buttons, added online help button
fixed relative help topic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r2824 r2947  
    88import java.awt.FlowLayout;
    99import java.awt.event.ActionEvent;
    10 import java.awt.event.KeyEvent;
    1110import java.awt.event.WindowAdapter;
    1211import java.awt.event.WindowEvent;
     
    2019import javax.swing.AbstractListModel;
    2120import javax.swing.Action;
    22 import javax.swing.ActionMap;
    2321import javax.swing.BorderFactory;
    24 import javax.swing.InputMap;
    25 import javax.swing.JComponent;
    2622import javax.swing.JDialog;
    2723import javax.swing.JLabel;
     
    3127import javax.swing.JScrollPane;
    3228import javax.swing.JSplitPane;
    33 import javax.swing.KeyStroke;
    3429import javax.swing.ListSelectionModel;
    3530import javax.swing.event.ListSelectionEvent;
     
    4237import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    4338import org.openstreetmap.josm.gui.SideButton;
     39import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
     40import org.openstreetmap.josm.gui.help.HelpUtil;
    4441import org.openstreetmap.josm.tools.ImageProvider;
    4542import org.openstreetmap.josm.tools.WindowGeometry;
     
    8178        JPanel pnl = new JPanel();
    8279        pnl.setLayout(new FlowLayout());
    83         pnl.add(new SideButton(new CancelAction()));
    8480        ContinueAction continueAction = new ContinueAction();
    8581        pnl.add(btnContinue = new SideButton(continueAction));
     
    8783        lstDeletedPrimitives.getSelectionModel().addListSelectionListener(continueAction);
    8884        lstSelectedPrimitives.getSelectionModel().addListSelectionListener(continueAction);
     85
     86        pnl.add(new SideButton(new CancelAction()));
     87        pnl.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Dialog/UploadSelection"))));
    8988        return pnl;
    9089    }
     
    112111        );
    113112        setTitle(tr("Select objects to upload"));
    114         ActionMap am = getRootPane().getActionMap();
    115         InputMap im = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    116         im.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "help");
    117         am.put("help", Main.main.menu.help);
    118         getRootPane().putClientProperty("help", "Dialog/UploadSelection");
     113        HelpUtil.setHelpContext(getRootPane(), HelpUtil.ht("/Dialog/UploadSelection"));
    119114    }
    120115
Note: See TracChangeset for help on using the changeset viewer.