1 32 33 package com.jeantessier.dependencyfinder.gui; 34 35 import javax.swing.*; 36 37 import com.jeantessier.classreader.*; 38 import com.jeantessier.metrics.*; 39 40 public class MetricsVerboseListener extends VerboseListener implements MetricsListener { 41 public MetricsVerboseListener(StatusLine statusLine, JProgressBar progressBar) { 42 super(statusLine, progressBar); 43 } 44 45 public void endSession(LoadEvent event) { 46 } 48 49 public void beginSession(MetricsEvent event) { 50 } 52 53 public void beginClass(MetricsEvent event) { 54 getStatusLine().showInfo("Computing metrics for " + event.getClassfile() + " ..."); 55 } 56 57 public void beginMethod(MetricsEvent event) { 58 } 60 61 public void endMethod(MetricsEvent event) { 62 } 64 65 public void endClass(MetricsEvent event) { 66 getProgressBar().setValue(getProgressBar().getValue() + 1); 67 } 68 69 public void endSession(MetricsEvent event) { 70 getProgressBar().setValue(0); 71 getProgressBar().setStringPainted(false); 72 } 73 } 74 | Popular Tags |