de.fhg.igd.atlas.ui
Class AgentTracerGui

java.lang.Object
  extended byde.fhg.igd.atlas.ui.AgentTracerGui
All Implemented Interfaces:
ActionListener, EventListener, Listener, MouseListener, Runnable, WindowListener

public class AgentTracerGui
extends Object
implements Runnable, Listener, ActionListener, WindowListener, MouseListener

Provides a GUI for the AgentTracer which traces the contact addresses of agents in a certain watch list. This Agent Tracer Gui (AgentTracerGui) is used to display the tracked agents together with their current contact address. It's possible to delete entries from the watch list and to set the update time of the agent tracer daemon.

Version:
"$Id: AgentTracerGui.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
AgentTracer

Field Summary
protected  AgentTracer agentTracer_
           
protected  JFrame commandFrame_
           
protected  SortedMap contactAddresses_
           
protected  JMenuItem deleteItem_
           
protected  byte[][] entries_
           
private  Object guiEventLock_
           
protected  String namePrefix_
           
protected  JPopupMenu popupMenuContext_
           
protected  JPopupMenu popupMenuGlobal_
           
protected  JMenuItem refreshItem_
           
private  boolean running_
           
protected  JScrollPane scrollPane_
           
protected  JMenuItem setUpdateTimeItem_
           
protected  JMenuItem setUpdateTimeItem2_
           
protected  JTable table_
           
private  Object updateLock_
           
private  Object waitLock_
           
protected  String windowName_
           
 
Constructor Summary
AgentTracerGui()
          Default constructor to create an instance of this class.
 
Method Summary
 void actionPerformed(ActionEvent a)
          Catches action events from setUpdateTimeItem_, setUpdateTimeItem2_, refreshItem_ and deleteItem_.
private  void initGUI()
          Initialize the GUI with a table to display the database entries.
static void main(String[] argv)
          Starts the GUI from command line.
 void mouseClicked(MouseEvent e)
          Catches mouse events within table_ and scrollPain_ used to open an close a context menu.
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void notifiedOf(Object obj)
          This method is called from the proxy's or server's event reflector and informs the class of changes of their database's state.
 void run()
          Searches the AgentTracer locally and opens a GUI.
private  void updateGUI()
          Updates the GUI by requesting the current agent tracer data.
 void windowActivated(WindowEvent e)
           
 void windowClosed(WindowEvent e)
          Called after main window has been closed.
 void windowClosing(WindowEvent e)
          Disposes the main window.
 void windowDeactivated(WindowEvent e)
           
 void windowDeiconified(WindowEvent e)
           
 void windowIconified(WindowEvent e)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandFrame_

protected transient JFrame commandFrame_

scrollPane_

protected transient JScrollPane scrollPane_

table_

protected transient JTable table_

popupMenuGlobal_

protected transient JPopupMenu popupMenuGlobal_

setUpdateTimeItem2_

protected transient JMenuItem setUpdateTimeItem2_

popupMenuContext_

protected transient JPopupMenu popupMenuContext_

setUpdateTimeItem_

protected transient JMenuItem setUpdateTimeItem_

refreshItem_

protected transient JMenuItem refreshItem_

deleteItem_

protected transient JMenuItem deleteItem_

agentTracer_

protected transient AgentTracer agentTracer_

entries_

protected transient byte[][] entries_

contactAddresses_

protected transient SortedMap contactAddresses_

namePrefix_

protected transient String namePrefix_

windowName_

protected transient String windowName_

guiEventLock_

private transient Object guiEventLock_

updateLock_

private transient Object updateLock_

waitLock_

private transient Object waitLock_

running_

private transient boolean running_
Constructor Detail

AgentTracerGui

public AgentTracerGui()
Default constructor to create an instance of this class.

Method Detail

run

public void run()
Searches the AgentTracer locally and opens a GUI.

Specified by:
run in interface Runnable

initGUI

private void initGUI()
Initialize the GUI with a table to display the database entries.


updateGUI

private void updateGUI()
Updates the GUI by requesting the current agent tracer data.


actionPerformed

public void actionPerformed(ActionEvent a)
Catches action events from setUpdateTimeItem_, setUpdateTimeItem2_, refreshItem_ and deleteItem_. Used to handle the buttons and context menu items.

Specified by:
actionPerformed in interface ActionListener
Parameters:
a - The action event.

mouseClicked

public void mouseClicked(MouseEvent e)
Catches mouse events within table_ and scrollPain_ used to open an close a context menu.

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - The mouse event.

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

windowClosed

public void windowClosed(WindowEvent e)
Called after main window has been closed. Notifies the GUI of this event, that the GUI can terminate (without storing the update time).

Specified by:
windowClosed in interface WindowListener
Parameters:
e - The window event.

windowClosing

public void windowClosing(WindowEvent e)
Disposes the main window.

Specified by:
windowClosing in interface WindowListener
Parameters:
e - The window event.

windowActivated

public void windowActivated(WindowEvent e)
Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Specified by:
windowIconified in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener

notifiedOf

public void notifiedOf(Object obj)
This method is called from the proxy's or server's event reflector and informs the class of changes of their database's state.

Specified by:
notifiedOf in interface Listener
Parameters:
obj - The object describing the action.

main

public static void main(String[] argv)
Starts the GUI from command line.

Parameters:
argv - The command line parameters.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.