Ignore:
Timestamp:
2006-04-25T00:11:38+02:00 (20 years ago)
Author:
imi
Message:
  • added Applet version of JOSM (unfinished)
  • fixed display bug if --no-fullscreen and --geometry was specified
File:
1 edited

Legend:

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

    r94 r98  
    4040import org.openstreetmap.josm.data.osm.OsmPrimitive;
    4141import org.openstreetmap.josm.gui.MapFrame;
    42 import org.openstreetmap.josm.gui.MapView;
    4342import org.openstreetmap.josm.tools.ImageProvider;
    4443
     
    9594
    9695                final JOptionPane optionPane = new JOptionPane(p, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
    97                 final JDialog dlg = optionPane.createDialog(Main.main, "Change values?");
     96                final JDialog dlg = optionPane.createDialog(Main.parent, "Change values?");
    9897                dlg.addWindowFocusListener(new WindowFocusListener(){
    9998                        public void windowGainedFocus(WindowEvent e) {
     
    124123                if (value.equals(""))
    125124                        value = null; // delete the key
    126                 mv.editLayer().add(new ChangePropertyCommand(sel, key, value));
     125                Main.main.editLayer().add(new ChangePropertyCommand(sel, key, value));
    127126
    128127                if (value == null)
     
    163162                JTextField values = new JTextField();
    164163                p2.add(values, BorderLayout.CENTER);
    165                 int answer = JOptionPane.showConfirmDialog(Main.main, p,
     164                int answer = JOptionPane.showConfirmDialog(Main.parent, p,
    166165                                "Change values?", JOptionPane.OK_CANCEL_OPTION);
    167166                if (answer != JOptionPane.OK_OPTION)
     
    171170                if (value.equals(""))
    172171                        return;
    173                 mv.editLayer().add(new ChangePropertyCommand(sel, key, value));
     172                Main.main.editLayer().add(new ChangePropertyCommand(sel, key, value));
    174173                selectionChanged(sel); // update table
    175174        }
     
    182181                String key = data.getValueAt(row, 0).toString();
    183182                Collection<OsmPrimitive> sel = Main.ds.getSelected();
    184                 mv.editLayer().add(new ChangePropertyCommand(sel, key, null));
     183                Main.main.editLayer().add(new ChangePropertyCommand(sel, key, null));
    185184                selectionChanged(sel); // update table
    186185        }
     
    201200         */
    202201        private final JTable propertyTable = new JTable(data);
    203         /**
    204          * The map view this dialog operates on.
    205          */
    206         private final MapView mv;
    207202       
    208203        /**
     
    211206        public PropertiesDialog(MapFrame mapFrame) {
    212207                super("Properties", "propertiesdialog", "Property for selected objects.", KeyEvent.VK_P);
    213                 mv = mapFrame.mapView;
    214208
    215209                setPreferredSize(new Dimension(320,150));
     
    248242                                else if (e.getActionCommand().equals("Edit")) {
    249243                                        if (sel == -1)
    250                                                 JOptionPane.showMessageDialog(Main.main, "Please select the row to edit.");
     244                                                JOptionPane.showMessageDialog(Main.parent, "Please select the row to edit.");
    251245                                        else
    252246                                                edit(sel);
    253247                                } else if (e.getActionCommand().equals("Delete")) {
    254248                                        if (sel == -1)
    255                                                 JOptionPane.showMessageDialog(Main.main, "Please select the row to delete.");
     249                                                JOptionPane.showMessageDialog(Main.parent, "Please select the row to delete.");
    256250                                        else
    257251                                                delete(sel);
Note: See TracChangeset for help on using the changeset viewer.