1 package nl.tudelft.goal.ut2004.visualizer.gui.action; 2 3 import java.awt.Component; 4 import java.awt.Graphics; 5 import java.awt.event.ActionEvent; 6 7 import javax.swing.AbstractAction; 8 import javax.swing.Action; 9 import javax.swing.Icon; 10 import javax.swing.JDialog; 11 12 import nl.tudelft.goal.ut2004.visualizer.controller.ServerController; 13 import nl.tudelft.goal.ut2004.visualizer.gui.dialogs.ChangeGameSpeedDialog; 14 15 import cz.cuni.amis.pogamut.ut2004.server.IUT2004Server; 16 import cz.cuni.amis.utils.flag.FlagListener; 17 18 public class ShowDialogueAction extends AbstractAction { 19 20 protected final JDialog dialog; 21 22 public ShowDialogueAction(JDialog dialog, String name, String description) { 23 this.dialog = dialog; 24 25 putValue(Action.SHORT_DESCRIPTION, description); 26 putValue(Action.NAME, name); 27 28 } 29 30 @Override 31 public void actionPerformed(ActionEvent e) { 32 dialog.setVisible(true); 33 } 34 35 }