edu.mit.csail.sdg.alloy4whole
Class SimpleGUI

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4whole.SimpleGUI
All Implemented Interfaces:
Listener, java.awt.event.ComponentListener, java.util.EventListener

public final class SimpleGUI
extends java.lang.Object
implements java.awt.event.ComponentListener, Listener

Simple graphical interface for accessing various features of the analyzer.

Except noted below, methods in this class can only be called by the AWT event thread.

The methods that might get called from other threads are:
(1) the run() method in SatRunner is launched from a fresh thread
(2) the run() method in the instance watcher (in constructor) is launched from a fresh thread


Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.mit.csail.sdg.alloy4.Listener
Listener.Event
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent e)
          Called when this window is hidden.
 void componentMoved(java.awt.event.ComponentEvent e)
          Called when this window is moved.
 void componentResized(java.awt.event.ComponentEvent e)
          Called when this window is resized.
 void componentShown(java.awt.event.ComponentEvent e)
          Called when this window is shown.
 java.lang.Object do_action(java.lang.Object sender, Listener.Event e)
          This method is called when the given zero-argument-event occurs.
 java.lang.Object do_action(java.lang.Object sender, Listener.Event e, java.lang.Object arg)
          This method is called when the given single-argument-event occurs.
static void main(java.lang.String[] args)
          Main method that launches the program; this method might be called by an arbitrary thread.
static java.lang.String slightlyShorterFilename(java.lang.String name)
          Helper method that returns a hopefully very short name for a file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

slightlyShorterFilename

public static java.lang.String slightlyShorterFilename(java.lang.String name)
Helper method that returns a hopefully very short name for a file name.


componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Called when this window is resized.

Specified by:
componentResized in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Called when this window is moved.

Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Called when this window is shown.

Specified by:
componentShown in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Called when this window is hidden.

Specified by:
componentHidden in interface java.awt.event.ComponentListener

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method that launches the program; this method might be called by an arbitrary thread.

Throws:
java.lang.Exception

do_action

public java.lang.Object do_action(java.lang.Object sender,
                                  Listener.Event e)
This method is called when the given zero-argument-event occurs.

Specified by:
do_action in interface Listener

do_action

public java.lang.Object do_action(java.lang.Object sender,
                                  Listener.Event e,
                                  java.lang.Object arg)
This method is called when the given single-argument-event occurs.

Specified by:
do_action in interface Listener