// File: ActionDispose.java // Classes: ActionDispose package edu.neu.ccs.demeter.tools.apstudio.graphedit; /** Action to delete the DiagramElements selected in the current * editor, and dispose any underlying Net stuctures. */ public class ActionDispose extends Action { private Selection cur_item; public ActionDispose(Editor e,Document d) { super(e,d); } public String name() { return "Dispose of Objects"; } public void doIt() { cur_item = _document.selection(); if (cur_item == null) return; int size = cur_item.size(); cur_item.dispose(_document); if(size == 1) _editor.showDefaultPropertySheet(_document); } public void undoIt() { } } /* end class ActionDispose */