Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package tools.tracesviewer;
  
  import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;

Author(s):
Olivier Deruelle
Version:
1.2
 
 public class ListenerTracesViewer {
 
     public TracesViewer tracesViewer;
 
     public boolean ANIMATION_STARTED;
     public AboutFrame aboutFrame;
     public HelpBox helpBox;
     public ScriptFrame scriptFrame;

    
Creates new ListenerTraceViewer
 
     public ListenerTracesViewer(TracesViewer tracesViewer) {
         this. = tracesViewer;
          = false;
          = new AboutFrame();
          = new HelpBox();
          = new ScriptFrame();
     }
 
     public void debugActionPerformed(ActionEvent evt) {
         //System.out.println("******************BEGIN******************************");
         //System.out.println(debug.beforeDebug);
         //System.out.println(debug.afterDebug);
         //System.out.println("******************END********************************");
         if (debug == null)
             return;
 
         if (debug.beforeDebug != null
             && debug.beforeDebug != null
             && !debug.beforeDebug.trim().equals("")
             && !debug.afterDebug.trim().equals("")) {
             DebugWindow debugWindow =
                 new DebugWindow(
                     debug.beforeDebug,
                     debug.afterDebug,
                     debug.debugLine);
 
             debugWindow.show();
         }
     }
 
     public void displayAllSessionsMouseEvent(MouseEvent evt) {
     }
 
     public void helpMenuMouseEvent(MouseEvent evt) {
         .show();
     }
 
     public void aboutMenuMouseEvent(MouseEvent evt) {
         ..start();
         .show();
     }
 
     public void animationActionPerformed(ActionEvent evt) {
         if (...size() == 0) {
             new AlertFrame(
                 "Please hit Refresh, first!",
                 .);
         } else if () {
 
             ..stop();
              = false;
         } else {
 
             ..start();
 
              = true;
         }
     }
 
     /*
     public void refreshActionPerformed(ActionEvent evt){
        if (ANIMATION_STARTED)
            new AlertFrame("You must stop the animation before refreshing the traces!",JOptionPane.ERROR_MESSAGE);
        else {
            TracesSessions tracesSessions=tracesViewerLauncher.refreshTracesSessions();
            tracesViewerLauncher.tracesSessionsList.setTracesSessions(tracesSessions);
            tracesViewerLauncher.tracesSessionsList.updateTracesCanvas();
            tracesViewerLauncher.initComboBox();
           if (tracesSessionsDisplayer.isVisible())
               tracesSessionsDisplayer.show(tracesSessions);
       }
    }
     */
    public void refreshActionPerformed(MouseEvent evt) {
        if ()
            new AlertFrame(
                "You must stop the animation before refreshing the traces!",
                .);
        else {
            TracesSessions tracesSessions =
                .refreshTracesSessions();
            ..setTracesSessions(tracesSessions);
            if (.isVisible())
                .show(tracesSessions);
        }
    }
    public void scriptActionPerformed(ActionEvent evt) {
    }
    public void tracesSessionsListStateChanged(ItemEvent e) {
        if () {
            ..stop();
             = false;
        }
    }
New to GrepCode? Check out our FAQ X