source: josm/src/org/openstreetmap/josm/gui/annotation/ForwardActionListener.java@ 178

Last change on this file since 178 was 178, checked in by imi, 17 years ago
  • fixed display of tooltip shortcuts
  • added icon=... to annotation presets
  • added support for putting annotation presets in the toolbar
File size: 822 bytes
Line 
1package org.openstreetmap.josm.gui.annotation;
2
3import java.awt.event.ActionEvent;
4import java.awt.event.ActionListener;
5
6import org.openstreetmap.josm.gui.dialogs.PropertiesDialog;
7
8/**
9 * Just an ActionListener that forwards calls to actionPerformed to some other
10 * listener doing some refresh stuff on the way.
11 * @author imi
12 */
13public final class ForwardActionListener implements ActionListener {
14 public final AnnotationPreset preset;
15
16 private final PropertiesDialog propertiesDialog;
17
18 public ForwardActionListener(PropertiesDialog propertiesDialog, AnnotationPreset preset) {
19 this.propertiesDialog = propertiesDialog;
20 this.preset = preset;
21 }
22
23 public void actionPerformed(ActionEvent e) {
24 this.propertiesDialog.annotationPresets.setSelectedIndex(0);
25 e.setSource(this);
26 preset.actionPerformed(e);
27 }
28}
Note: See TracBrowser for help on using the repository browser.