com.bluemarsh.jswat.panel
Class JSwatPanel

java.lang.Object
  |
  +--com.bluemarsh.jswat.panel.JSwatPanel
All Implemented Interfaces:
SessionListener
Direct Known Subclasses:
BreakPanel, ClassPanel, LocalsTreePanel, MethodsPanel, StackPanel, ThreadPanel, WatchPanel

public abstract class JSwatPanel
extends java.lang.Object
implements SessionListener

Interface for all JSwat panels to implement.

Author:
Nathan Fiedler

Field Summary
protected static JSwat swat
          Instance of JSwat.
 
Constructor Summary
JSwatPanel()
           
 
Method Summary
 void activate(Session session)
          Called when the Session is about to begin an active debugging session.
 void close(Session session)
          Called when the Session is closing down this panel, generally just after the panel has been removed from the Session.
 void deactivate(Session session)
          Called when the Session is about to end an active debugging session.
static java.awt.Window getParentWindow(java.awt.Component child)
          Finds the parent Window object for the given component.
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swat

protected static JSwat swat
Instance of JSwat.
Constructor Detail

JSwatPanel

public JSwatPanel()
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.
Specified by:
activate in interface SessionListener
Parameters:
session - Session being activated.

close

public void close(Session session)
Called when the Session is closing down this panel, generally just after the panel has been removed from the Session.
Specified by:
close in interface SessionListener
Parameters:
session - Session closing the panel.

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.
Specified by:
deactivate in interface SessionListener
Parameters:
session - Session being deactivated.

getParentWindow

public static java.awt.Window getParentWindow(java.awt.Component child)
Finds the parent Window object for the given component. The parent could be a dialog or a frame, whichever is most closely related to the child.
Parameters:
child - Child component.
Returns:
Window containing the given component, or null if none found.

getUI

public abstract javax.swing.JComponent getUI()
Returns a reference to the UI component.
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.
Specified by:
init in interface SessionListener
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.
Parameters:
session - Debugging Session object.