org.apache.batik.apps.svgbrowser

Class JSVGViewerFrame.Debugger

protected static class JSVGViewerFrame.Debugger extends Object

Rhino debugger class.
Field Summary
protected static intATTACH_TO_METHOD
protected static ClasscontextFactoryClass
The Rhino ContextFactory class.
protected static intCLEAR_ALL_BREAKPOINTS_METHOD
protected static ClassdebuggerClass
The Rhino debugger class.
protected static ConstructordebuggerConstructor
Rhino debugger class constructor.
protected ObjectdebuggerInstance
The Rhino debugger instance.
protected static Method[]debuggerMethods
Rhino debugger class methods.
protected static intDETACH_METHOD
protected static intDISPOSE_METHOD
protected static MethodgetContextFactoryMethod
The {@code getContextFactory} method on the {@link org.apache.batik.script.rhino.RhinoInterpreter} class.
protected static intGET_DEBUG_FRAME_METHOD
protected static intGO_METHOD
protected static booleanisPresent
Whether the Rhino debugger classes are present.
protected static ClassrhinoInterpreterClass
The RhinoInterpreter class.
protected JSVGViewerFramesvgFrame
The JSVGViewerFrame.
protected static intSET_EXIT_ACTION_METHOD
Constructor Summary
Debugger(JSVGViewerFrame frame, String url)
Creates a new Debugger.
Method Summary
voidattach()
Attaches the debugger to the canvas' current interpreter.
voidattachTo(Object contextFactory)
Calls {@code attachTo} on {@link #debuggerInstance}.
voidclearAllBreakpoints()
Calls {@code clearAllBreakpoints} on {@link #debuggerInstance}.
voiddetach()
Calls {@code detach} on {@link #debuggerInstance}.
voiddispose()
Calls {@code dispose} on {@link #debuggerInstance}.
protected ObjectgetContextFactory(Object rhinoInterpreter)
Calls {@code getContextFactory} on the given instance of {@link org.apache.batik.script.rhino.RhinoInterpreter}.
protected JFramegetDebugFrame()
Calls {@code getDebugFrame} on {@link #debuggerInstance}.
voidgo()
Calls {@code go} on {@link #debuggerInstance}.
voidinitialize()
Initializes the debugger by massaging the GUI and attaching it to the Rhino interpreter's {@link org.mozilla.javascript.ContextFactory}.
voidsetDocumentURL(String url)
Sets the document URL to use in the window title.
protected voidsetExitAction(Runnable r)
Calls {@code setExitAction} on {@link #debuggerInstance}.

Field Detail

ATTACH_TO_METHOD

protected static final int ATTACH_TO_METHOD

contextFactoryClass

protected static Class contextFactoryClass
The Rhino ContextFactory class.

CLEAR_ALL_BREAKPOINTS_METHOD

protected static final int CLEAR_ALL_BREAKPOINTS_METHOD

debuggerClass

protected static Class debuggerClass
The Rhino debugger class.

debuggerConstructor

protected static Constructor debuggerConstructor
Rhino debugger class constructor.

debuggerInstance

protected Object debuggerInstance
The Rhino debugger instance.

debuggerMethods

protected static Method[] debuggerMethods
Rhino debugger class methods.

DETACH_METHOD

protected static final int DETACH_METHOD

DISPOSE_METHOD

protected static final int DISPOSE_METHOD

getContextFactoryMethod

protected static Method getContextFactoryMethod
The {@code getContextFactory} method on the {@link org.apache.batik.script.rhino.RhinoInterpreter} class.

GET_DEBUG_FRAME_METHOD

protected static final int GET_DEBUG_FRAME_METHOD

GO_METHOD

protected static final int GO_METHOD

isPresent

protected static boolean isPresent
Whether the Rhino debugger classes are present.

rhinoInterpreterClass

protected static Class rhinoInterpreterClass
The RhinoInterpreter class.

svgFrame

protected JSVGViewerFrame svgFrame
The JSVGViewerFrame.

SET_EXIT_ACTION_METHOD

protected static final int SET_EXIT_ACTION_METHOD

Constructor Detail

Debugger

public Debugger(JSVGViewerFrame frame, String url)
Creates a new Debugger.

Method Detail

attach

public void attach()
Attaches the debugger to the canvas' current interpreter.

attachTo

public void attachTo(Object contextFactory)
Calls {@code attachTo} on {@link #debuggerInstance}.

clearAllBreakpoints

public void clearAllBreakpoints()
Calls {@code clearAllBreakpoints} on {@link #debuggerInstance}.

detach

public void detach()
Calls {@code detach} on {@link #debuggerInstance}.

dispose

public void dispose()
Calls {@code dispose} on {@link #debuggerInstance}.

getContextFactory

protected Object getContextFactory(Object rhinoInterpreter)
Calls {@code getContextFactory} on the given instance of {@link org.apache.batik.script.rhino.RhinoInterpreter}.

getDebugFrame

protected JFrame getDebugFrame()
Calls {@code getDebugFrame} on {@link #debuggerInstance}.

go

public void go()
Calls {@code go} on {@link #debuggerInstance}.

initialize

public void initialize()
Initializes the debugger by massaging the GUI and attaching it to the Rhino interpreter's {@link org.mozilla.javascript.ContextFactory}.

setDocumentURL

public void setDocumentURL(String url)
Sets the document URL to use in the window title.

setExitAction

protected void setExitAction(Runnable r)
Calls {@code setExitAction} on {@link #debuggerInstance}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.