agentland.gui
Class GuiManagerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.gui.GuiManagerAgent
- All Implemented Interfaces:
- Agent, Good, GuiManager, Managed, MetagluePrimitives, Remote, Serializable, Spy
- public class GuiManagerAgent
- extends ManagedAgent
- implements GuiManager
This is a first cut at the gui manger agent -- the agent that will
manage guis from various agents on a screen. The gui manger should
take advantage of all the tools available at a given platform and
try to arrange guis in some reasonable manner. This manger puts
every gui in its own window. In the future I imagine that most
simple guis would be put into a single window thus creating a sort
of command center on the screen.
- See Also:
AgentAgent
,
GuiManager
, Serialized Form
Method Summary |
boolean |
addGui(GuiMaker maker)
Adds a gui maker to the list of guis this agent manages. |
void |
addGuiSpy(String name)
Notifications subscribed to through this method will be sent to
tellGui method; this method should be called by guiMakers |
void |
addSecretGui(Secret s)
This method receives gui registration requests from notifier |
protected String |
getUniqueName(GuiMaker maker)
|
void |
killGui(GuiMaker owner)
Permanently remove the gui maker and its gui |
void |
requestGui(AgentID aid)
Contacts specified agent and asks it for its gui object |
void |
tellGui(Secret secret)
This method receives secrets that the gui makers subscribed to;
at the moment it forwards every secret to every gui
maker. |
Methods inherited from class agentland.resource.ManagedAgent |
connect, getAlert, getNeed, isAvailable, isAvailable, reliesOn, reliesOn, replace, replace, request, request, request, requestAgent, requestAgent, resources, resourcesByAgentID, setNeed, tiedTo, yank, yank, yank |
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou |
Methods inherited from interface agentland.util.Spy |
tell |
topFamily
protected GuiFamily topFamily
families
protected Hashtable families
guis
protected HashSet guis
GuiManagerAgent
public GuiManagerAgent()
throws RemoteException
requestGui
public void requestGui(AgentID aid)
throws RemoteException
- Contacts specified agent and asks it for its gui object
- Specified by:
requestGui
in interface GuiManager
addGui
public boolean addGui(GuiMaker maker)
throws RemoteException
- Adds a gui maker to the list of guis this agent manages.
- Specified by:
addGui
in interface GuiManager
- Following copied from interface:
agentland.gui.GuiManager
- Returns:
- True if all is good; false if gui could not be added
(e.g. if this gui is already being displayed)
addSecretGui
public void addSecretGui(Secret s)
throws RemoteException
- This method receives gui registration requests from notifier
- Specified by:
addSecretGui
in interface GuiManager
getUniqueName
protected String getUniqueName(GuiMaker maker)
addGuiSpy
public void addGuiSpy(String name)
- Notifications subscribed to through this method will be sent to
tellGui method; this method should be called by guiMakers
- Parameters:
name
- name of the secret a gui wants to hear about
tellGui
public void tellGui(Secret secret)
throws RemoteException
- This method receives secrets that the gui makers subscribed to;
at the moment it forwards every secret to every gui
maker. Stephen things it is wrong so one day we will fix it.
- Specified by:
tellGui
in interface GuiManager
killGui
public void killGui(GuiMaker owner)
- Permanently remove the gui maker and its gui