| Revision 2,
745 bytes
checked in by jdalbey, 10 years ago
(diff) |
|
Initial Import of project files
|
| Line | |
|---|
| 1 | package tmcsim.cadsimulator.viewer.actions; |
|---|
| 2 | |
|---|
| 3 | import java.awt.event.ActionEvent; |
|---|
| 4 | |
|---|
| 5 | import javax.swing.AbstractAction; |
|---|
| 6 | |
|---|
| 7 | import tmcsim.cadsimulator.viewer.CADSimulatorViewer; |
|---|
| 8 | |
|---|
| 9 | /** |
|---|
| 10 | * Abstract action to exit the CADSimulator. When the action is performed |
|---|
| 11 | * the CADSimulatorView.closeViewer() method is called. |
|---|
| 12 | * |
|---|
| 13 | * @author Matthew Cechini |
|---|
| 14 | * @version |
|---|
| 15 | */ |
|---|
| 16 | @SuppressWarnings("serial") |
|---|
| 17 | public class ExitAction extends AbstractAction { |
|---|
| 18 | |
|---|
| 19 | /** Reference to the CADSimulatorViewer. */ |
|---|
| 20 | private CADSimulatorViewer theViewer; |
|---|
| 21 | |
|---|
| 22 | public ExitAction(CADSimulatorViewer viewer) { |
|---|
| 23 | super("Exit"); |
|---|
| 24 | |
|---|
| 25 | theViewer = viewer; |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | public void actionPerformed(ActionEvent arg0) { |
|---|
| 29 | theViewer.closeViewer(); |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.