net.hivecell.hive.agent.hiveui.treeui
Class TreeUIAgentImpl
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--net.hivecell.hive.agent.AgentImpl
|
+--net.hivecell.hive.agent.EventReceivingAgentImpl
|
+--net.hivecell.hive.agent.hiveui.BaseUIAgentImpl
|
+--net.hivecell.hive.agent.hiveui.BaseGUIAgentImpl
|
+--net.hivecell.hive.agent.hiveui.BaseSwingGUIAgentImpl
|
+--net.hivecell.hive.agent.hiveui.treeui.TreeUIAgentImpl
- public class TreeUIAgentImpl
- extends BaseSwingGUIAgentImpl
a UI that displays the information from the agent
monitoring agent in a tree like format. this class allows
different classes to be used for filtering and displaying the
information
- See Also:
- Serialized Form
Field Summary |
protected java.util.Hashtable |
cellControlAgents
store our server control agents to the different servers so we
can command the agents on the servers |
protected javax.swing.JFrame |
frame
|
protected net.hivecell.hive.agent.hiveui.treeui.GraphTreeFilterer |
gtf
the class that we are using to filter our information into the
jtree |
protected javax.swing.JPanel |
panel
|
protected javax.swing.JScrollPane |
scrollPane
|
Fields inherited from class net.hivecell.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 net.hivecell.hive.agent.AgentImpl |
AGENTKILLED,
AGENTMOVED,
agentThreadGroup,
commandList,
commands,
description,
icon,
iconName,
myAddress,
myCell,
readyFlag,
stopCode,
timeToStop |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
void |
doBehavior()
Do the basic behavior for an agent, the agent's main loop. |
void |
doLocalCleanup()
get rid of all our active references |
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 |
java.lang.String[] |
getMenuNames(Agent a)
|
void |
renderAgentMessage(Agent s,
Agent d)
this method needs to be implemented so agent messaging can be drawn |
void |
renderCellReport(CellReportCellEvent report)
this method needs to be implemented so the server reports go somwhere |
void |
renderConnectAgents(Agent s,
Agent d)
a method which needs to be implemented -- when two agents
connect, this method will be called. |
void |
renderDisconnectAgents(Agent s,
Agent d)
a method which needs to be implemented -- when two agents
disconnect, this method will be called to display the change to
the screen |
void |
renderDisconnectFromAll(Agent a,
Agent[] incoming,
Agent[] outgoing)
this method needs to be implemented for when an agent disconnects from all |
void |
renderNewAgent(Agent a)
a method which needs to be implemented -- this means that
another agent has arrived on the scene and it needs to be drawn
to the UI |
void |
renderRemoveAgent(Agent a,
CellAddress ca,
Agent[] incoming,
Agent[] outgoing)
a method which needs to be implemented -- this means that an
agent has been removed from the scene and this change needs to
be rendered. |
protected void |
renderTree(javax.swing.JTree tree)
|
Methods inherited from class net.hivecell.hive.agent.hiveui.BaseUIAgentImpl |
connectAgentsCommand,
createNewAgentCommand,
disconnectAgentAllCommand,
disconnectAgentsCommand,
getAccessibleVariable,
getAccessibleVariableNames,
getAccessibleVariableType,
getAgentAddress,
getAgentIcon,
getAgentName,
getCellAddress,
getMonitoredCells,
invokeCellMenuCommand,
killAgentCommand,
listIncomingConnections,
listOutgoingConnections,
monitorCell,
moveAgentCommand,
notify,
setAccessibleVariable,
shutdownCellCommand,
stopMonitoringCell |
Methods inherited from class net.hivecell.hive.agent.AgentImpl |
addActionCommand,
blockUntilReady,
configure,
getActionCommands,
getAddress,
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 |
cellControlAgents
protected java.util.Hashtable cellControlAgents
- store our server control agents to the different servers so we
can command the agents on the servers
gtf
protected net.hivecell.hive.agent.hiveui.treeui.GraphTreeFilterer gtf
- the class that we are using to filter our information into the
jtree
frame
protected javax.swing.JFrame frame
panel
protected javax.swing.JPanel panel
scrollPane
protected javax.swing.JScrollPane scrollPane
TreeUIAgentImpl
public TreeUIAgentImpl()
throws java.rmi.RemoteException
doLocalSetup
public void doLocalSetup()
throws AgentInitializationException
- Description copied from class: BaseSwingGUIAgentImpl
- 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 BaseSwingGUIAgentImpl
- Tags copied from class: AgentImpl
- Throws:
- AgentInitializationException - can be thrown by the agent if for some reason it cannot fufil its setup stuff
doBehavior
public void doBehavior()
- Description copied from class: 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 BaseSwingGUIAgentImpl
- Tags copied from class: AgentImpl
- See Also:
timeToStop
,
doLocalSetup
doLocalCleanup
public void doLocalCleanup()
- Description copied from class: BaseUIAgentImpl
- get rid of all our active references
- Overrides:
- doLocalCleanup in class BaseUIAgentImpl
getMenuNames
public java.lang.String[] getMenuNames(Agent a)
- Overrides:
- getMenuNames in class BaseUIAgentImpl
renderNewAgent
public void renderNewAgent(Agent a)
- Description copied from class: BaseUIAgentImpl
- a method which needs to be implemented -- this means that
another agent has arrived on the scene and it needs to be drawn
to the UI
- Overrides:
- renderNewAgent in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
a
- the new agent to be rendered
renderRemoveAgent
public void renderRemoveAgent(Agent a,
CellAddress ca,
Agent[] incoming,
Agent[] outgoing)
- Description copied from class: BaseUIAgentImpl
- a method which needs to be implemented -- this means that an
agent has been removed from the scene and this change needs to
be rendered. this method also includes a list of agents that
this agent was connected to so we can remove those connections
also
- Overrides:
- renderRemoveAgent in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
a
- the agent that we are removing from the sceneca
- the cell address of the agent we are removingincoming
- the agents that are pointing to this agentoutgoing
- the agents that this agent is pointing to
renderConnectAgents
public void renderConnectAgents(Agent s,
Agent d)
- Description copied from class: BaseUIAgentImpl
- a method which needs to be implemented -- when two agents
connect, this method will be called. the two agents should
already be on the graph -- two agents should not need to be
connected if they are not on the graph yet
- Overrides:
- renderConnectAgents in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
s
- the source agentd
- the destination agent
renderDisconnectAgents
public void renderDisconnectAgents(Agent s,
Agent d)
- Description copied from class: BaseUIAgentImpl
- a method which needs to be implemented -- when two agents
disconnect, this method will be called to display the change to
the screen
- Overrides:
- renderDisconnectAgents in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
s
- the source of the disconnectiond
- the destination of the disconnection
renderDisconnectFromAll
public void renderDisconnectFromAll(Agent a,
Agent[] incoming,
Agent[] outgoing)
- Description copied from class: BaseUIAgentImpl
- this method needs to be implemented for when an agent disconnects from all
- Overrides:
- renderDisconnectFromAll in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
a
- the agent that is disconnecting from allincoming
- all the agents that are connected to this agnetoutgoing
- all the agnets that are connected to by this agent
renderAgentMessage
public void renderAgentMessage(Agent s,
Agent d)
- Description copied from class: BaseUIAgentImpl
- this method needs to be implemented so agent messaging can be drawn
- Overrides:
- renderAgentMessage in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
s
- the source of the messaged
- the destination of the messagemessage
- the message
renderCellReport
public void renderCellReport(CellReportCellEvent report)
- Description copied from class: BaseUIAgentImpl
- this method needs to be implemented so the server reports go somwhere
- Overrides:
- renderCellReport in class BaseUIAgentImpl
- Tags copied from class: BaseUIAgentImpl
- Parameters:
message
- the server message
renderTree
protected void renderTree(javax.swing.JTree tree)