com.hp.hpl.guess
Class Guess

java.lang.Object
  extended bycom.hp.hpl.guess.Guess

public class Guess
extends Object

the main guess system, it contains a Main that does most of what you want, but you can basically build your own application using the stuff in this class. Generally, you will want to do:

 StorageFactory.useDBServer(...) // to set up the database you want
 Guess.configureUI()             // unless you want your own L&F
 Guess.init(...)
 


Field Summary
static BufferedReader errHandle
           
static boolean handleOver
           
static boolean nowarn
           
static BufferedReader outHandle
           
 
Constructor Summary
Guess()
           
 
Method Summary
static boolean allowMultiEdge()
          allow multiple edges
static void checkFrozen(InterpreterAbstraction interp)
           
static void configureUI()
          do some initial setup to the UI look and feel
static void enableMainUI(boolean state)
          enable the main UI window?
static void exceptionHandle(Throwable e2)
           
static AppletContext getAppletContext()
          get the applet context
static boolean getAppletMode()
          are we running inside an applet?
static void getDataBase()
          when a database is unspecified you get walked through a few steps, this should only be run once before the init process (see the main loop for an example)
static FrameListener getFrame()
           
static boolean getGPLFreeMode()
          get the gplfree mode
static Graph getGraph()
          gets the current working graph, if the sytem hasn't been inited you get back null
static InterpreterAbstraction getInterpreter()
          get the interpreter (fake or real depending on useFakeInterpreter setting)
static MainUIWindow getMainUIWindow()
           
static boolean getMTF()
          Are objects being moved to the front when they change
static boolean getSynchronous()
          thread management
static void init(int uiMode, boolean guiMode, boolean textMode)
          the main loop, this will get us running.
static void initHandles()
           
static void initRest(int uiMode, boolean guiMode, boolean textMode)
           
static void initUI(int uiMode, boolean guiMode, boolean textMode)
           
static void main(String[] argv)
          the main loop, this gets used when you're not using the applet version
static void setAppletMode(boolean state, AppletContext ac)
          running inside an applet? true for yes, default is false
static void setCacheDir()
           
static void setGPLFreeMode(boolean state)
          set the gplfree mode
static void setMTF(boolean state)
          should objects in the visualization be moved to the front when they change
static void setSynchronous(boolean state)
          should layouts run in their own threads?
static void shutdown()
          shutdown and exit
static void useFakeInterpreter(boolean state)
          call this first if you want to use the "fake" interpreter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nowarn

public static boolean nowarn

outHandle

public static BufferedReader outHandle

errHandle

public static BufferedReader errHandle

handleOver

public static boolean handleOver
Constructor Detail

Guess

public Guess()
Method Detail

allowMultiEdge

public static boolean allowMultiEdge()
allow multiple edges


enableMainUI

public static void enableMainUI(boolean state)
enable the main UI window?


setGPLFreeMode

public static void setGPLFreeMode(boolean state)
set the gplfree mode


getGPLFreeMode

public static boolean getGPLFreeMode()
get the gplfree mode


setAppletMode

public static void setAppletMode(boolean state,
                                 AppletContext ac)
running inside an applet? true for yes, default is false


getAppletMode

public static boolean getAppletMode()
are we running inside an applet?


getAppletContext

public static AppletContext getAppletContext()
get the applet context


useFakeInterpreter

public static void useFakeInterpreter(boolean state)
call this first if you want to use the "fake" interpreter. The fake one won't let you execute any commands through jython but may be ok if you're just building a simple applet


getInterpreter

public static InterpreterAbstraction getInterpreter()
get the interpreter (fake or real depending on useFakeInterpreter setting)

Returns:
a jython interpreter

getFrame

public static FrameListener getFrame()

getGraph

public static Graph getGraph()
gets the current working graph, if the sytem hasn't been inited you get back null

Returns:
the working graph or null

getMainUIWindow

public static MainUIWindow getMainUIWindow()

setCacheDir

public static void setCacheDir()

main

public static void main(String[] argv)
                 throws Exception
the main loop, this gets used when you're not using the applet version

Parameters:
argv - arguments
Throws:
Exception

getDataBase

public static void getDataBase()
when a database is unspecified you get walked through a few steps, this should only be run once before the init process (see the main loop for an example)


configureUI

public static void configureUI()
do some initial setup to the UI look and feel


exceptionHandle

public static void exceptionHandle(Throwable e2)

init

public static void init(int uiMode,
                        boolean guiMode,
                        boolean textMode)
                 throws Exception
the main loop, this will get us running. You'll usually want either the guiMode or textMode enabled but you can do both or neither.

Parameters:
uiMode - which ui to use (currently VisFactory.PICCOLO,VisFactory.TOUCGRAPH, VisFactory.PREFUSE, or VisFactory.NOVIS)
guiMode - run the interpeter as a seperate console
textMode - run the intepreter in the original console
Throws:
Exception

initHandles

public static void initHandles()
                        throws Exception
Throws:
Exception

setSynchronous

public static void setSynchronous(boolean state)
should layouts run in their own threads?


getSynchronous

public static boolean getSynchronous()
thread management


setMTF

public static void setMTF(boolean state)
should objects in the visualization be moved to the front when they change


getMTF

public static boolean getMTF()
Are objects being moved to the front when they change


initUI

public static void initUI(int uiMode,
                          boolean guiMode,
                          boolean textMode)
                   throws Exception
Throws:
Exception

initRest

public static void initRest(int uiMode,
                            boolean guiMode,
                            boolean textMode)
                     throws Exception
Throws:
Exception

checkFrozen

public static void checkFrozen(InterpreterAbstraction interp)

shutdown

public static void shutdown()
shutdown and exit