Changeset 23923 in osm for applications/editors
- Timestamp:
- 2010-10-30T18:43:15+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/AddressEdit
- Files:
-
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/AddressEdit/.classpath
r23806 r23923 2 2 <classpath> 3 3 <classpathentry kind="src" path="src"/> 4 <classpathentry kind="src" path="images/dialogs"/> 5 <classpathentry excluding="dialogs/" kind="src" path="images"/> 4 6 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> 5 7 <classpathentry kind="lib" path="J:/Dokumente und Einstellungen/Oliver/Eigene Dateien/Java/Josm-svn/core/dist/3529/josm-tested.jar" sourcepath="J:/Dokumente und Einstellungen/Oliver/Eigene Dateien/Java/Josm-svn/core/src"/> 6 <classpathentry kind="output" path="bin"/> 8 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 9 <classpathentry kind="output" path="build"/> 7 10 </classpath> -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AbstractAddressEditAction.java
r23915 r23923 58 58 public void setContainer(AddressEditContainer container) { 59 59 this.container = container; 60 updateEnabledState( container);60 updateEnabledState(); 61 61 } 62 62 63 63 /** 64 * Updates 'enabled' state depending on the given selection event. 65 * @param ev 66 * @return 64 * @return the event 67 65 */ 68 public void updateEnabledState(AddressEditSelectionEvent ev) { 69 // If the tree selection changes, we will get a new event. So this is safe. 70 super.updateEnabledState(); 71 this.event = ev; // save for later use. 72 if (ev != null) { 73 updateEnabledState(ev); 66 protected AddressEditSelectionEvent getEvent() { 67 return event; 68 } 69 70 /** 71 * @param event the event to set 72 */ 73 protected void setEvent(AddressEditSelectionEvent event) { 74 this.event = event; 75 } 76 77 /* (non-Javadoc) 78 * @see org.openstreetmap.josm.actions.JosmAction#updateEnabledState() 79 */ 80 @Override 81 protected void updateEnabledState() { 82 if (this.event != null) { 83 updateEnabledState(this.event); 84 } else { 85 if (container != null) { 86 updateEnabledState(container); 87 } else { 88 super.updateEnabledState(); 89 } 74 90 } 75 91 } … … 81 97 */ 82 98 protected abstract void updateEnabledState(AddressEditContainer container); 99 100 /** 101 * Updates 'enabled' state depending on the given address container object. 102 * @param container The address container (maybe null). 103 * @return 104 */ 105 protected abstract void updateEnabledState(AddressEditSelectionEvent event); 83 106 84 107 /* (non-Javadoc) -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AddressEditDialog.java
r23921 r23923 126 126 unresolvedPanel.setMinimumSize(new Dimension(350, 200)); 127 127 128 JPanel unresolvedButtons = new JPanel(new FlowLayout()); 129 SideButton assign = new SideButton(resolveAction); 130 unresolvedButtons.add(assign); 131 SideButton guess = new SideButton(guessAddressAction); 132 unresolvedButtons.add(guess); 133 SideButton applyAllGuesses = new SideButton(applyAllGuessesAction); 134 unresolvedButtons.add(applyAllGuesses); 135 unresolvedPanel.add(unresolvedButtons, BorderLayout.SOUTH); 128 129 try { 130 JPanel unresolvedButtons = new JPanel(new FlowLayout()); 131 SideButton assign = new SideButton(resolveAction); 132 unresolvedButtons.add(assign); 133 SideButton guess = new SideButton(guessAddressAction); 134 unresolvedButtons.add(guess); 135 SideButton applyAllGuesses = new SideButton(applyAllGuessesAction); 136 unresolvedButtons.add(applyAllGuesses); 137 unresolvedPanel.add(unresolvedButtons, BorderLayout.SOUTH); 138 } catch (Exception e) { 139 e.printStackTrace(); 140 } 141 136 142 137 143 /* Map Panel */ -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/ApplyAllGuessesAction.java
r23922 r23923 28 28 public ApplyAllGuessesAction() { 29 29 //super(tr("Apply all guesses"), "applyguesses_24", "Turns all guesses into the corresponding tag values."); 30 super(tr("Apply all guesses"), null, "Turns all guesses into the corresponding tag values.");30 super(tr("Apply all guesses"), "applyguesses_24", "Turns all guesses into the corresponding tag values."); 31 31 } 32 32 … … 61 61 } 62 62 } 63 64 @Override 65 protected void updateEnabledState(AddressEditSelectionEvent event) { 66 // do nothing here 67 } 63 68 } -
applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/GuessAddressDataAction.java
r23915 r23923 30 30 31 31 public GuessAddressDataAction() { 32 super(tr("Guess address data") );32 super(tr("Guess address data"), "guessstreets_24", "Tries to guess the street name by picking the name of the closest way."); 33 33 } 34 34
Note:
See TracChangeset
for help on using the changeset viewer.