PkgAgentSystem.GUI
Class GUIAgentBase
java.lang.Object
|
+--java.lang.Thread
|
+--FIM.Util.Threads.CancellableThread
|
+--PkgAgentSystem.AgentBase
|
+--PkgAgentSystem.GUI.GUIAgentBase
- public class GUIAgentBase
- extends AgentBase
This class is parent for all agents, who can display a graphical user interface. Provides
a simple representation (box with name of agent). Can also display the log
in a window and save it to the disk.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
- See Also:
- Serialized Form
Methods inherited from class PkgAgentSystem.AgentBase |
addMessage,
addOwnExperience,
addPermissionListener,
agentMain,
broadcastMessage,
createConversationAllowed,
currentLocation,
endConversation,
firePermissionChange,
getAgentName,
getAgentSystem,
getArchivedConversation,
getArchivedConversationIDs,
getExperiences,
getIdentity,
getKeyAndCertificate,
getKeyAndCertificates,
getKeyPair,
getKeyPairs,
getLog,
getOngoingConversation,
getOngoingConversationIDs,
initialize,
logMessage,
move,
newConversation,
onAfterDePersist,
onAfterMoving,
onBeforeMoving,
onBeforePersist,
persist,
registerConversation,
registerReplaceConversation,
removeKeyAndCertificate,
removeKeyPair,
removePermissionListener,
replyToChallenge,
replyToChallenge,
run,
sendMessage,
setAgentIdentity,
setAgentSystem,
setKeyAndCertificate,
setKeyPair,
startConversation,
stopAgent,
verifySignedMessage,
writeExperiencesTo,
writeLogTo |
Methods inherited from class java.lang.Thread |
,
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
GUIAgentBase
public GUIAgentBase()
getVisualization
public final JPanel getVisualization()
- Returns the visualization of the agent.
- Returns:
- a
JPanel
with the visualization of the agent
createVisualization
protected JPanel createVisualization()
- Creates the visualization for the agent. Standard representation is a white box with the
name of the agent in it.
- Returns:
- a
JPanel
with the visualization of the agent
showLog
protected void showLog()
- Shows the log in a window.
The user can close it or save the log to the disk.
- See Also:
LogDialog
saveLog
protected void saveLog()
- Saves the log to a file.
Opens a dialog for the user to select the location and enter the filename.
Note, that the agent needs the permission to write a file to this location
and the permission to write that many bytes!
showDialog
protected void showDialog()
- Shows the main dialog of the agent.
Subclasses should implement a dialog to view/modify their main data, so the user can
change their tasks. Only very simple agents can imlement their UI in the visualization
and this is discouraged.
Submit a bug
Copyright 2000 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.