com.bluemarsh.jswat.panel
Class MethodsPanel

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

public class MethodsPanel
extends JSwatPanel
implements ContextListener, java.awt.event.MouseListener

Class MethodsPanel is responsible for displaying the methods in the 'this' object in the current stack frame.

Author:
Michael Swartzendruber

Field Summary
protected  ContextManager contextManager
          Handy reference to the Session's ContextManager.
protected  Session owningSession
          Handy reference to the Session that owns us.
protected  javax.swing.JTable table
          Our table component - displays the stack frames
protected  com.sun.jdi.ReferenceType thisClass
          'this' object's class; may be null.
protected  javax.swing.JScrollPane uicomp
          Our UI component - scrollable pane
 
Fields inherited from class com.bluemarsh.jswat.panel.JSwatPanel
swat
 
Constructor Summary
MethodsPanel()
          Constructs a new MethodsPanel with the default text area.
 
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 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 mouseClicked(java.awt.event.MouseEvent e)
          Invoked when the mouse has been clicked on a component.
 void mouseEntered(java.awt.event.MouseEvent e)
          Invoked when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent e)
          Invoked when the mouse exits a component.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on a component.
 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

uicomp

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

table

protected javax.swing.JTable table
Our table component - displays the stack frames

owningSession

protected Session owningSession
Handy reference to the Session that owns us.

contextManager

protected ContextManager contextManager
Handy reference to the Session's ContextManager.

thisClass

protected com.sun.jdi.ReferenceType thisClass
'this' object's class; may be null.
Constructor Detail

MethodsPanel

public MethodsPanel()
Constructs a new MethodsPanel with the default text area.
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.

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.
Overrides:
close in class JSwatPanel
Parameters:
session - Session closing the panel.

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.

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.

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

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. We use this to take action on the table.
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
e - Mouse event.

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
e - Mouse event.

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
e - Mouse event.

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component.
Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
e - Mouse event.

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component.
Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
e - Mouse event.

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.