com.bluemarsh.jswat.panel
Class LocalsTreePanel

java.lang.Object
  |
  +--com.bluemarsh.jswat.panel.JSwatPanel
        |
        +--com.bluemarsh.jswat.panel.LocalsTreePanel
All Implemented Interfaces:
ContextListener, java.util.EventListener, SessionListener

public class LocalsTreePanel
extends JSwatPanel
implements ContextListener

Class LocalsTreePanel is responsible for displaying a tree of local variables in the current thread.

Author:
David Lum, Nathan Fiedler

Field Summary
protected  javax.swing.JTree localsTree
          JTree containing local variables.
protected  Session session
          Reference of the Session object that calls our refresh method.
protected  javax.swing.JScrollPane uicomp
          Our UI component - scrollable panel
 
Fields inherited from class com.bluemarsh.jswat.panel.JSwatPanel
swat
 
Constructor Summary
LocalsTreePanel()
          Creates a LocalsTreePanel with the default tree.
 
Method Summary
 void activate(Session session)
          Called when the Session is about to begin an active debugging session.
 void contextChanged(ContextChangeEvent cce)
          Invoked when the current context has changed.
 void deactivate(Session session)
          Called when the Session is about to end an active debugging session.
 javax.swing.JComponent getPeer()
          Returns a reference to the peer UI component.
 javax.swing.JComponent getUI()
          Returns a reference to the UI component.
 void init(Session session)
          Called when the Session is ready to initialize this panel, generally just after the panel has been added to the Session.
 void refresh(Session session)
          Update the display on the screen.
protected  void reschedule(Session session)
          Call the refresh() method in a short time.
protected  void setMessage(java.lang.String name)
          Sets the tree to show only a message as referenced by the given resource name.
 
Methods inherited from class com.bluemarsh.jswat.panel.JSwatPanel
close, getParentWindow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localsTree

protected javax.swing.JTree localsTree
JTree containing local variables.

uicomp

protected javax.swing.JScrollPane uicomp
Our UI component - scrollable panel

session

protected Session session
Reference of the Session object that calls our refresh method.
Constructor Detail

LocalsTreePanel

public LocalsTreePanel()
Creates a LocalsTreePanel with the default tree.
Method Detail

activate

public void activate(Session session)
Called when the Session is about to begin an active debugging session. That is, JSwat is about to debug a debuggee VM. Panels are not activated in any particular order.
Overrides:
activate in class JSwatPanel
Parameters:
session - Session being activated.

contextChanged

public void contextChanged(ContextChangeEvent cce)
Invoked when the current context has changed. The context change event identifies which aspect of the context has changed.
Specified by:
contextChanged in interface ContextListener
Parameters:
cce - context change event

deactivate

public void deactivate(Session session)
Called when the Session is about to end an active debugging session. That is, JSwat is about to terminate the connection with the debuggee VM. Panels are not deactivated in any particular order.
Overrides:
deactivate in class JSwatPanel
Parameters:
session - Session being deactivated.

getPeer

public javax.swing.JComponent getPeer()
Returns a reference to the peer UI component. In many cases this is a JList, JTree, or JTable, depending on the type of data being displayed in the panel.
Returns:
peer ui component object

getUI

public javax.swing.JComponent getUI()
Returns a reference to the UI component.
Overrides:
getUI in class JSwatPanel
Returns:
ui component object

init

public void init(Session session)
Called when the Session is ready to initialize this panel, generally just after the panel has been added to the Session.
Overrides:
init in class JSwatPanel
Parameters:
session - Session initializing this panel.

refresh

public void refresh(Session session)
Update the display on the screen. Use the given VM to fetch the desired data.
Overrides:
refresh in class JSwatPanel
Parameters:
session - Debugging Session object.

reschedule

protected void reschedule(Session session)
Call the refresh() method in a short time.
Parameters:
session - owning Session.

setMessage

protected void setMessage(java.lang.String name)
Sets the tree to show only a message as referenced by the given resource name.
Parameters:
name - Name of string resource to display.