Changeset 32395 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/EditChosenRelationAction.java
- Timestamp:
- 2016-06-24T09:10:57+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/EditChosenRelationAction.java
r30145 r32395 1 // License: GPL. For details, see LICENSE file. 1 2 package relcontext.actions; 2 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.awt.event.ActionEvent; 7 5 8 import javax.swing.AbstractAction; 9 6 10 import org.openstreetmap.josm.Main; 7 11 import org.openstreetmap.josm.data.osm.Relation; 8 12 import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor; 9 13 import org.openstreetmap.josm.tools.ImageProvider; 14 10 15 import relcontext.ChosenRelation; 11 16 import relcontext.ChosenRelationListener; … … 13 18 /** 14 19 * Opens an editor for chosen relation. 15 * 20 * 16 21 * @author Zverik 17 22 */ … … 19 24 private ChosenRelation rel; 20 25 21 public EditChosenRelationAction( ChosenRelation rel) {26 public EditChosenRelationAction(ChosenRelation rel) { 22 27 super(); 23 // putValue(NAME, "E"); 28 // putValue(NAME, "E"); 24 29 putValue(SMALL_ICON, ImageProvider.get("dialogs/mappaint", "pencil")); 25 30 putValue(SHORT_DESCRIPTION, tr("Open relation editor for the chosen relation")); … … 29 34 } 30 35 31 public void actionPerformed( ActionEvent e ) { 36 @Override 37 public void actionPerformed(ActionEvent e) { 32 38 Relation relation = rel.get(); 33 if (relation == null ) return;39 if (relation == null ) return; 34 40 RelationEditor.getEditor(Main.main.getEditLayer(), relation, null).setVisible(true); 35 41 } 36 42 37 public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) { 43 @Override 44 public void chosenRelationChanged(Relation oldRelation, Relation newRelation) { 38 45 setEnabled(newRelation != null); 39 46 }
Note:
See TracChangeset
for help on using the changeset viewer.
