Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.mit.media.hive.agent.hiveui
Class BaseSwingGUIAgentImpl  view BaseSwingGUIAgentImpl download BaseSwingGUIAgentImpl.java

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byedu.mit.media.hive.agent.AgentImpl
                  extended byedu.mit.media.hive.agent.EventReceivingAgentImpl
                      extended byedu.mit.media.hive.agent.hiveui.BaseUIAgentImpl
                          extended byedu.mit.media.hive.agent.hiveui.BaseGUIAgentImpl
                              extended byedu.mit.media.hive.agent.hiveui.BaseSwingGUIAgentImpl
All Implemented Interfaces:
edu.mit.media.hive.agent.Agent, edu.mit.media.hive.rdf.Describable, java.util.EventListener, edu.mit.media.hive.agent.EventReceivingAgent, java.rmi.Remote, edu.mit.media.hive.event.RemoteEventListener, java.io.Serializable

public abstract class BaseSwingGUIAgentImpl
extends BaseGUIAgentImpl

this class is the next level up on top of the base ui agent -- the purpose of this is so we have a standard way to get the popup boxes that we like


Field Summary
protected  edu.mit.media.hive.shadow.cell.ComponentManagerShadow cms
          a handle to the CMS so we don't need to look it up every time.
 
Fields inherited from class edu.mit.media.hive.agent.hiveui.BaseGUIAgentImpl
acms
 
Fields inherited from class edu.mit.media.hive.agent.hiveui.BaseUIAgentImpl
ag, agentAddresses, ama, cellControlAgents, changeMonitoringCellCmd, changeShowCellAgentsCmd, connectCmd, defaultCellCmds, defaultCmds, disconnectAllCmd, disconnectCmd, killCellCmd, killCmd, menu, monitoredCells, moveCmd, propertiesCmd, variablePropertyManipulators
 
Fields inherited from class edu.mit.media.hive.agent.EventReceivingAgentImpl
agentSubscriptions
 
Fields inherited from class edu.mit.media.hive.agent.AgentImpl
AGENTKILLED, AGENTMOVED, agentThreadGroup, commandList, commands, description, icon, iconName, myCell, readyFlag, stopCode, timeToStop
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
BaseSwingGUIAgentImpl()
           
 
Method Summary
protected  void constructMenus()
          a helper function that reads the RDF files and stuff and creates the default menus that we are going to use
private  javax.swing.JMenuItem createMenuItem(edu.mit.media.hive.support.menu.MenuElement me)
          recursive function meant for creating the menu items
 void doBehavior()
          Do the basic behavior for an agent, the agent's main loop.
 void doLocalSetup()
          do our local setup which just involves letting the BaseUIAgent do its stuff, and then we can lookup our agent component manager shadow
 javax.swing.JMenuBar getMenuBar()
          a function that will return an AWT menu that is constructed off the information that is in the menu object
 void showConfigureAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
          method to bring up a variable sheet editor
 void showCreateAgentByNameDialogBox()
          method to bring up a dialog box to create an agent by its java class name
 void showCreateAgentDialogBox(java.lang.String agent)
          method to bring up the dialog box with the agent icon and stuff like that
 void showMoveAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
          method to bring up the dialog box with the agent icon for movement
 void showShutdownCellDialogBox()
          method to bring up a dialog box containing which servers we want to shut down
 void showStartMonitorCellDialogBox()
          method to bring up a dialog box to start monitoring another cell
 void showStopMonitorCellDialogBox()
          method to bring up a dialog box containing which server we want to stop monitoring
 
Methods inherited from class edu.mit.media.hive.agent.hiveui.BaseGUIAgentImpl
invokeMenuCommand
 
Methods inherited from class edu.mit.media.hive.agent.hiveui.BaseUIAgentImpl
connectAgentsCommand, createNewAgentCommand, disconnectAgentAllCommand, disconnectAgentsCommand, doLocalCleanup, getAccessibleVariable, getAccessibleVariableNames, getAccessibleVariableType, getAgentAddress, getAgentIcon, getAgentName, getCellAddress, getMenuNames, getMonitoredCells, invokeCellMenuCommand, killAgentCommand, monitorCell, moveAgentCommand, notify, renderAgentMessage, renderCellReport, renderConnectAgents, renderDisconnectAgents, renderDisconnectFromAll, renderNewAgent, renderRemoveAgent, setAccessibleVariable, shutdownCellCommand, stopMonitoringCell
 
Methods inherited from class edu.mit.media.hive.agent.EventReceivingAgentImpl
connectTo, diePlease, disconnectFrom, disconnectFromAll, listAllIncomingConnections, notify, subscribeTo
 
Methods inherited from class edu.mit.media.hive.agent.AgentImpl
addActionCommand, blockUntilReady, configure, doBehaviour, getActionCommands, getCell, getComponentManagerShadow, getDescription, getIcon, getIconName, getName, getThreadGroup, invokeActionCommand, isReady, isTimeToStop, listAllOutgoingConnections, loadIcon, moveTo, onDying, onMoving, setCell, setDescription, setIconName, setIsReady, setThreadGroup, setTimeToStop, waitUntilDeath
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.mit.media.hive.agent.Agent
blockUntilReady, configure, getActionCommands, getCell, getDescription, getIcon, getName, invokeActionCommand, isReady, listAllOutgoingConnections
 
Methods inherited from interface edu.mit.media.hive.rdf.Describable
setDescription
 

Field Detail

cms

protected edu.mit.media.hive.shadow.cell.ComponentManagerShadow cms
a handle to the CMS so we don't need to look it up every time.

Constructor Detail

BaseSwingGUIAgentImpl

public BaseSwingGUIAgentImpl()
                      throws java.rmi.RemoteException
Method Detail

doLocalSetup

public void doLocalSetup()
do our local setup which just involves letting the BaseUIAgent do its stuff, and then we can lookup our agent component manager shadow

Overrides:
doLocalSetup in class BaseGUIAgentImpl

doBehavior

public void doBehavior()
Description copied from class: edu.mit.media.hive.agent.AgentImpl
Do the basic behavior for an agent, the agent's main loop. Override this to provide your particular agent's behavior. Note: the doBehavior loop should not exit. Please call waitUntilDeath() at the end of this method, this will prevent the Cell from believing this agent prematurely exited.

Overrides:
doBehavior in class BaseGUIAgentImpl

constructMenus

protected void constructMenus()
a helper function that reads the RDF files and stuff and creates the default menus that we are going to use

Overrides:
constructMenus in class BaseGUIAgentImpl

getMenuBar

public javax.swing.JMenuBar getMenuBar()
a function that will return an AWT menu that is constructed off the information that is in the menu object


createMenuItem

private javax.swing.JMenuItem createMenuItem(edu.mit.media.hive.support.menu.MenuElement me)
recursive function meant for creating the menu items


showShutdownCellDialogBox

public void showShutdownCellDialogBox()
method to bring up a dialog box containing which servers we want to shut down

Specified by:
showShutdownCellDialogBox in class BaseGUIAgentImpl

showStartMonitorCellDialogBox

public void showStartMonitorCellDialogBox()
method to bring up a dialog box to start monitoring another cell

Specified by:
showStartMonitorCellDialogBox in class BaseGUIAgentImpl

showStopMonitorCellDialogBox

public void showStopMonitorCellDialogBox()
method to bring up a dialog box containing which server we want to stop monitoring

Specified by:
showStopMonitorCellDialogBox in class BaseGUIAgentImpl

showCreateAgentByNameDialogBox

public void showCreateAgentByNameDialogBox()
method to bring up a dialog box to create an agent by its java class name

Specified by:
showCreateAgentByNameDialogBox in class BaseGUIAgentImpl

showCreateAgentDialogBox

public void showCreateAgentDialogBox(java.lang.String agent)
method to bring up the dialog box with the agent icon and stuff like that

Specified by:
showCreateAgentDialogBox in class BaseGUIAgentImpl

showMoveAgentDialogBox

public void showMoveAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
method to bring up the dialog box with the agent icon for movement

Specified by:
showMoveAgentDialogBox in class BaseGUIAgentImpl

showConfigureAgentDialogBox

public void showConfigureAgentDialogBox(edu.mit.media.hive.agent.Agent agent)
method to bring up a variable sheet editor

Specified by:
showConfigureAgentDialogBox in class BaseGUIAgentImpl