00001 package dionarap; 00002 00003 import java.awt.event.ActionEvent; 00004 import java.awt.event.ActionListener; 00005 00006 import javax.swing.JButton; 00007 00008 import de.fhwgt.dionarap.controller.DionaRapController; 00009 00017 public class ListenerWaffe implements ActionListener { 00018 00019 @Override 00020 public void actionPerformed(ActionEvent e) { 00021 JButton source = (JButton)e.getSource(); 00022 Hauptfenster hf = (Hauptfenster)(source.getTopLevelAncestor().getParent()); 00023 00024 DionaRapController controller = hf.getController(); 00025 controller.shoot(); 00026 } 00027 }