1 32 33 package com.jeantessier.dependencyfinder.gui; 34 35 import java.awt.event.*; 36 import java.util.*; 37 38 import javax.swing.*; 39 40 public class NewDependencyGraphAction extends AbstractAction implements Runnable { 41 private DependencyFinder model = null; 42 43 public NewDependencyGraphAction(DependencyFinder model) { 44 this.model = model; 45 46 putValue(Action.LONG_DESCRIPTION, "Clear current dependency graph"); 47 putValue(Action.NAME, "New"); 48 putValue(Action.SMALL_ICON, new ImageIcon(getClass().getResource("icons/new.gif"))); 49 } 50 51 public void actionPerformed(ActionEvent e) { 52 new Thread (this).start(); 53 } 54 55 public void run() { 56 model.getStatusLine().showInfo(""); 57 58 model.clearDependencyResult(); 59 model.clearClosureResult(); 60 model.clearMetricsResult(); 61 62 model.setNewDependencyGraph(); 63 } 64 } 65 | Popular Tags |