Changeset 29727 in osm for applications/editors/josm/plugins/czechaddress/src
- Timestamp:
- 2013-06-29T03:52:07+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java
r27834 r29727 26 26 import org.openstreetmap.josm.gui.MapFrame; 27 27 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 28 import org.openstreetmap.josm.gui.util.GuiHelper; 28 29 import org.openstreetmap.josm.plugins.Plugin; 29 30 import org.openstreetmap.josm.plugins.PluginInformation; … … 163 164 ManagerDialog dialog = new ManagerDialog(); 164 165 if (dialog.countAutomaticRenameProposals() > 0) 165 dialog.s etVisible(true);166 dialog.showDialog(); 166 167 } 167 168 … … 192 193 public void pluginStatusChanged(int message) { 193 194 if (message == MESSAGE_DATABASE_LOADED) { 194 czechMenu = Main.main.menu.addMenu(marktr("Adress"), KeyEvent.VK_Z, 4, ht("/Plugin/CzechAddress")); 195 menuItems.add(MainMenu.add(czechMenu, new PointManipulatorAction())); 196 menuItems.add(MainMenu.add(czechMenu, new GroupManipulatorAction())); 197 menuItems.add(MainMenu.add(czechMenu, new ConflictResolveAction())); 198 menuItems.add(MainMenu.add(czechMenu, new ManagerAction())); 199 menuItems.add(MainMenu.add(czechMenu, new HelpAction())); 195 GuiHelper.runInEDTAndWait(new Runnable() { 196 @Override public void run() { 197 czechMenu = Main.main.menu.addMenu(marktr("Adress"), KeyEvent.VK_Z, 4, ht("/Plugin/CzechAddress")); 198 menuItems.add(MainMenu.add(czechMenu, new PointManipulatorAction())); 199 menuItems.add(MainMenu.add(czechMenu, new GroupManipulatorAction())); 200 menuItems.add(MainMenu.add(czechMenu, new ConflictResolveAction())); 201 menuItems.add(MainMenu.add(czechMenu, new ManagerAction())); 202 menuItems.add(MainMenu.add(czechMenu, new HelpAction())); 203 } 204 }); 200 205 return; 201 206 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ConflictResolveAction.java
r27852 r29727 3 3 import java.awt.event.ActionEvent; 4 4 import java.awt.event.KeyEvent; 5 5 6 import org.openstreetmap.josm.actions.JosmAction; 6 7 import org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin; … … 39 40 */ 40 41 public void actionPerformed(ActionEvent e) { 41 ConflictResolver.getInstance().s etVisible(true);42 ConflictResolver.getInstance().showDialog(); 42 43 } 43 44 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/GroupManipulatorAction.java
r27878 r29727 1 1 package org.openstreetmap.josm.plugins.czechaddress.actions; 2 3 import org.openstreetmap.josm.plugins.czechaddress.gui.GroupManipulatorDialog;4 2 5 3 import java.awt.event.ActionEvent; … … 8 6 import org.openstreetmap.josm.actions.JosmAction; 9 7 import org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin; 8 import org.openstreetmap.josm.plugins.czechaddress.gui.GroupManipulatorDialog; 10 9 import org.openstreetmap.josm.tools.Shortcut; 11 10 … … 41 40 public void actionPerformed(ActionEvent e) { 42 41 if (CzechAddressPlugin.getLocation() == null) return; 43 GroupManipulatorDialog.getInst ence().setVisible(true);42 GroupManipulatorDialog.getInstance().setVisible(true); 44 43 } 45 44 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ManagerAction.java
r28340 r29727 25 25 @Override 26 26 public void actionPerformed(ActionEvent e) { 27 (new ManagerDialog()).setVisible(true);27 new ManagerDialog().showDialog(); 28 28 } 29 29 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java
r27852 r29727 52 52 if (CzechAddressPlugin.getLocation() == null) return; 53 53 54 PointManipulatorDialog dialog = new PointManipulatorDialog(primitive); 55 dialog.setVisible(true); 54 new PointManipulatorDialog(primitive).showDialog(); 56 55 } 57 56 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java
r27852 r29727 7 7 import java.util.Collection; 8 8 import java.util.Collections; 9 import java.util.LinkedList; 9 10 import java.util.List; 10 import java.util.LinkedList;11 11 12 12 import javax.swing.JOptionPane; -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java
r23190 r29727 8 8 import java.util.logging.Level; 9 9 import java.util.logging.Logger; 10 10 11 import javax.swing.ComboBoxModel; 11 12 import javax.swing.DefaultComboBoxModel; 12 import javax.swing.event.ListDataListener;13 13 import javax.swing.Icon; 14 14 import javax.swing.JButton; 15 15 import javax.swing.event.ListDataEvent; 16 import javax.swing.event.ListDataListener; 17 16 18 import org.openstreetmap.josm.Main; 17 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 23 25 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.House; 24 26 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.Street; 27 import org.openstreetmap.josm.plugins.czechaddress.gui.utils.UniversalListRenderer; 25 28 import org.openstreetmap.josm.plugins.czechaddress.intelligence.Reasoner; 26 29 import org.openstreetmap.josm.plugins.czechaddress.intelligence.ReasonerListener; 27 import org.openstreetmap.josm.plugins.czechaddress.gui.utils.UniversalListRenderer;28 30 import org.openstreetmap.josm.tools.ImageProvider; 29 31 … … 218 220 mainField.setSelectedIndex(index); 219 221 mainField.repaint(); 220 s etVisible(true);222 showDialog(); 221 223 } 222 224 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java
r27870 r29727 1 1 package org.openstreetmap.josm.plugins.czechaddress.gui; 2 3 import static org.openstreetmap.josm.tools.I18n.tr;4 2 5 3 import java.awt.Component; … … 21 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 20 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 21 import org.openstreetmap.josm.gui.util.GuiHelper; 23 22 import org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin; 24 23 import org.openstreetmap.josm.plugins.czechaddress.MapUtils; … … 88 87 89 88 if (message == MESSAGE_DATABASE_LOADED) { 90 relocateButton.setEnabled(true); 89 GuiHelper.runInEDTAndWait(new Runnable() { 90 @Override public void run() { 91 relocateButton.setEnabled(true); 92 } 93 }); 91 94 return; 92 95 } … … 95 98 DataSet.addSelectionListener(this); 96 99 97 streetModel.setParent(CzechAddressPlugin.getLocation()); 98 relocateButton.setText("Změnit místo"); 99 streetComboBox.setEnabled(true); 100 houseList.setEnabled(true); 101 keepOddityCheckBox.setEnabled(true); 100 GuiHelper.runInEDTAndWait(new Runnable() { 101 @Override public void run() { 102 streetModel.setParent(CzechAddressPlugin.getLocation()); 103 relocateButton.setText("Změnit místo"); 104 streetComboBox.setEnabled(true); 105 houseList.setEnabled(true); 106 keepOddityCheckBox.setEnabled(true); 107 } 108 }); 102 109 return; 103 110 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/GroupManipulatorDialog.java
r23190 r29727 33 33 34 34 private static GroupManipulatorDialog singleton = null; 35 public static GroupManipulatorDialog getInst ence() {35 public static GroupManipulatorDialog getInstance() { 36 36 if (singleton == null) 37 37 singleton = new GroupManipulatorDialog(); … … 57 57 setContent(mainPanel); 58 58 setButtonIcons(new String[] {"ok.png", "cancel.png"}); 59 setDefaultButton(1); 60 setCancelButton(2); 59 61 setupDialog(); 60 62 setDefaultCloseOperation(DISPOSE_ON_CLOSE); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
r29661 r29727 41 41 42 42 public static ElementWithStreets selectLocation() { 43 LocationSelector ls = new LocationSelector(); 44 ls.setVisible(true); 43 LocationSelector ls = (LocationSelector) new LocationSelector().showDialog(); 45 44 46 45 if (ls.getValue() == 1) … … 58 57 setButtonIcons(new String[] {"ok.png", "cancel.png"}); 59 58 setDefaultButton(1); 59 setCancelButton(2); 60 60 setupDialog(); 61 61 -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java
r26509 r29727 74 74 setContent(mainPanel); 75 75 setButtonIcons(new String[] {"ok.png", "cancel.png"}); 76 setDefaultButton(1); 77 setCancelButton(2); 76 78 setupDialog(); 77 79 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java
r23190 r29727 82 82 setContent(mainPanel, false); 83 83 setButtonIcons(new String[] { "ok.png", "cancel.png" }); 84 setDefaultButton(1); 85 setCancelButton(2); 84 86 setupDialog(); 85 87 setDefaultCloseOperation(DISPOSE_ON_CLOSE); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/EditorFactory.java
r15649 r29727 31 31 32 32 public static boolean editStreet(Street street) { 33 StreetEditor dialog = new StreetEditor(street); 34 dialog.setVisible(true); 33 StreetEditor dialog = (StreetEditor) new StreetEditor(street).showDialog(); 35 34 if (dialog.getValue() == 1) { 36 35 Reasoner r = Reasoner.getInstance(); … … 49 48 50 49 public static boolean editHouse(House house) { 51 HouseEditor dialog = new HouseEditor(house); 52 dialog.setVisible(true); 50 HouseEditor dialog = (HouseEditor) new HouseEditor(house).showDialog(); 53 51 if (dialog.getValue() == 1) { 54 52 Reasoner r = Reasoner.getInstance(); … … 66 64 67 65 public static boolean editSuburb(Suburb suburb) { 68 SuburbEditor dialog = new SuburbEditor(suburb); 69 dialog.setVisible(true); 66 SuburbEditor dialog = (SuburbEditor) new SuburbEditor(suburb).showDialog(); 70 67 if (dialog.getValue() == 1) { 71 68 suburb.setName(dialog.getSuburbName()); -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/HouseEditor.java
r18408 r29727 36 36 setContent(mainPanel); 37 37 this.setButtonIcons(new String[] {"ok.png", "cancel.png"}); 38 setDefaultButton(1); 39 setCancelButton(2); 38 40 setupDialog(); 39 41 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/StreetEditor.java
r18408 r29727 2 2 3 3 import javax.swing.DefaultComboBoxModel; 4 4 5 import org.openstreetmap.josm.Main; 5 6 import org.openstreetmap.josm.gui.ExtendedDialog; 6 import org.openstreetmap.josm.gui.preferences.PreferenceDialog;7 7 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.AddressElement; 8 8 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.House; … … 47 47 setContent(mainPanel); 48 48 this.setButtonIcons(new String[] {"ok.png", "cancel.png"}); 49 setDefaultButton(1); 50 setCancelButton(2); 49 51 setupDialog(); 50 52 } -
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java
r23190 r29727 2 2 3 3 import javax.swing.DefaultComboBoxModel; 4 4 5 import org.openstreetmap.josm.Main; 5 6 import org.openstreetmap.josm.gui.ExtendedDialog; … … 55 56 setContent(mainPanel); 56 57 this.setButtonIcons(new String[] {"ok.png", "cancel.png"}); 58 setDefaultButton(1); 59 setCancelButton(2); 57 60 setupDialog(); 58 61 }
Note:
See TracChangeset
for help on using the changeset viewer.