View Javadoc

1   package nl.tudelft.goal.ut2004.visualizer.gui.action;
2   
3   import java.awt.event.ActionEvent;
4   
5   import javax.swing.AbstractAction;
6   import javax.swing.Action;
7   import javax.swing.JDialog;
8   
9   public class ShowDialogueAction extends AbstractAction {
10  
11  	protected final JDialog dialog;
12  
13  	public ShowDialogueAction(JDialog dialog, String name, String description) {
14  		this.dialog = dialog;
15  
16  		putValue(Action.SHORT_DESCRIPTION, description);
17  		putValue(Action.NAME, name);
18  
19  	}
20  
21  	@Override
22  	public void actionPerformed(ActionEvent e) {
23  		dialog.setVisible(true);
24  	}
25  
26  }