Changeset 11 in josm for src/org/openstreetmap/josm/gui


Ignore:
Timestamp:
2005-10-04T20:36:42+02:00 (20 years ago)
Author:
imi
Message:

changed direct resource access to Class.getResource()

Location:
src/org/openstreetmap/josm/gui
Files:
4 edited

Legend:

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

    r9 r11  
    4545        public class AutoScaleAction extends AbstractAction {
    4646                public AutoScaleAction() {
    47                         super("Auto Scale", new ImageIcon("images/autoscale.png"));
     47                        super("Auto Scale", new ImageIcon(Main.class.getResource("/images/autoscale.png")));
    4848                        putValue(MNEMONIC_KEY, KeyEvent.VK_A);
    4949                }
  • src/org/openstreetmap/josm/gui/PreferenceDialog.java

    r6 r11  
    4343        class OkAction extends AbstractAction {
    4444                public OkAction() {
    45                         super("Ok", new ImageIcon("images/ok.png"));
     45                        super("Ok", new ImageIcon(Main.class.getResource("/images/ok.png")));
    4646                        putValue(MNEMONIC_KEY, KeyEvent.VK_ENTER);
    4747                }
  • src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r8 r11  
    7171                getContentPane().add(new JScrollPane(displaylist), BorderLayout.CENTER);
    7272
    73                 JButton button = new JButton("Select", new ImageIcon("images/mapmode/selection.png"));
     73                JButton button = new JButton("Select", new ImageIcon(Main.class.getResource("/images/mapmode/selection.png")));
    7474                button.addActionListener(new ActionListener(){
    7575                        public void actionPerformed(ActionEvent e) {
  • src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r8 r11  
    2828        public ToggleDialog(String title, String name, String iconName, int mnemonic, String tooltip) {
    2929                super(Main.main, title, false);
    30                 putValue(SMALL_ICON, new ImageIcon("images/dialogs/"+iconName+".png"));
     30                putValue(SMALL_ICON, new ImageIcon(Main.class.getResource("/images/dialogs/"+iconName+".png")));
    3131                putValue(NAME, name);
    3232                putValue(MNEMONIC_KEY, mnemonic);
Note: See TracChangeset for help on using the changeset viewer.