pnuts.tools
Class VisualDebuggerView

java.lang.Object
  extended by pnuts.tools.VisualDebuggerView
Direct Known Subclasses:
VisualDebugger

public class VisualDebuggerView
extends java.lang.Object


Field Summary
static java.lang.String actionSuffix
           
static java.lang.String clearAction
           
static java.lang.String closeAction
           
static java.lang.String contAction
           
static java.lang.String imageSuffix
           
static java.lang.String inspectAction
           
static java.lang.String labelSuffix
           
protected  VisualDebuggerModel model
           
static java.lang.String nextAction
           
static java.lang.String openAction
           
static java.lang.String shortcutSuffix
           
static java.lang.String stepAction
           
static java.lang.String stepUpAction
           
static java.lang.String tipSuffix
           
 
Constructor Summary
VisualDebuggerView()
           
VisualDebuggerView(java.util.ResourceBundle resourceBundle)
           
 
Method Summary
protected  javax.swing.JMenu createMenu(java.lang.String key)
          Create a menu for the app.
protected  javax.swing.JMenuBar createMenubar()
          Create the menubar for the app.
protected  javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
          Create a menu item for the specified command
protected  javax.swing.JTextArea createTextArea()
          Create an editor to represent the given document.
protected  javax.swing.JButton createToolbarButton(java.lang.String key)
          Create a button to go inside of the toolbar.
 void exitGUI()
           
protected  javax.swing.JFrame getJFrame()
          Returns a JFrame The default behavior of this method creates and returns a JFrame object.
 VisualDebuggerModel getModel()
           
protected  java.net.URL getResource(java.lang.String key)
           
protected  java.lang.String getResourceString(java.lang.String nm)
           
protected  java.lang.String getTitleString(java.lang.Object source)
          Returns the title string Subclasses may override this method to customize the window title.
 void open(java.lang.String filename)
          Opens a local file in a window
 void startGUI()
           
 void update(java.lang.Object source, int beginLine, SimpleNode node, Context c)
          Updates the view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSuffix

public static final java.lang.String imageSuffix
See Also:
Constant Field Values

labelSuffix

public static final java.lang.String labelSuffix
See Also:
Constant Field Values

actionSuffix

public static final java.lang.String actionSuffix
See Also:
Constant Field Values

tipSuffix

public static final java.lang.String tipSuffix
See Also:
Constant Field Values

shortcutSuffix

public static final java.lang.String shortcutSuffix
See Also:
Constant Field Values

openAction

public static final java.lang.String openAction
See Also:
Constant Field Values

stepAction

public static final java.lang.String stepAction
See Also:
Constant Field Values

stepUpAction

public static final java.lang.String stepUpAction
See Also:
Constant Field Values

nextAction

public static final java.lang.String nextAction
See Also:
Constant Field Values

contAction

public static final java.lang.String contAction
See Also:
Constant Field Values

closeAction

public static final java.lang.String closeAction
See Also:
Constant Field Values

inspectAction

public static final java.lang.String inspectAction
See Also:
Constant Field Values

clearAction

public static final java.lang.String clearAction
See Also:
Constant Field Values

model

protected VisualDebuggerModel model
Constructor Detail

VisualDebuggerView

public VisualDebuggerView()

VisualDebuggerView

public VisualDebuggerView(java.util.ResourceBundle resourceBundle)
Method Detail

getModel

public VisualDebuggerModel getModel()

getJFrame

protected javax.swing.JFrame getJFrame()
Returns a JFrame The default behavior of this method creates and returns a JFrame object. Subclasses may override this method to define a different way of getting JFrame.


startGUI

public void startGUI()

exitGUI

public void exitGUI()

getTitleString

protected java.lang.String getTitleString(java.lang.Object source)
Returns the title string Subclasses may override this method to customize the window title.

Parameters:
source - the script source
Returns:
the title string

update

public void update(java.lang.Object source,
                   int beginLine,
                   SimpleNode node,
                   Context c)
Updates the view


open

public void open(java.lang.String filename)
Opens a local file in a window

Parameters:
filename - the file name

createToolbarButton

protected javax.swing.JButton createToolbarButton(java.lang.String key)
Create a button to go inside of the toolbar. By default this will load an image resource. The image filename is relative to the classpath (including the '.' directory if its a part of the classpath), and may either be in a JAR file or a separate file.

Parameters:
key - The key in the resource file to serve as the basis of lookups.

createMenubar

protected javax.swing.JMenuBar createMenubar()
Create the menubar for the app. By default this pulls the definition of the menu from the associated resource file.

Returns:
a JMenuBar

createMenu

protected javax.swing.JMenu createMenu(java.lang.String key)
Create a menu for the app. By default this pulls the definition of the menu from the associated resource file.

Parameters:
key - name of a menu group

createMenuItem

protected javax.swing.JMenuItem createMenuItem(java.lang.String cmd)
Create a menu item for the specified command

Parameters:
cmd - the command name
Returns:
the JMenuItem

getResourceString

protected java.lang.String getResourceString(java.lang.String nm)

getResource

protected java.net.URL getResource(java.lang.String key)

createTextArea

protected javax.swing.JTextArea createTextArea()
Create an editor to represent the given document.