All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaAgent.context.AgentFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----JavaAgent.context.AgentFrame

public class AgentFrame
extends Frame
AgentFrame provides a graphical interface for an Agent.


Copyright (c) 1995, H. Robert Frost, Stanford University. All rights reserved.

Copyright (c) 1996, H. Robert Frost, Enterprise Integration Technologies, Inc. All rights reserved.

RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and in similar clauses in the FAR and NASA FAR supplement.

This software is bound by the terms and conditions listed in the attached LICENSE file.



Variable Index

 o Action
 o cmp
 o ComposeMessage
 o context
 o Controls
 o Help
 o HelpAbout
 o incoming
 o IncomingLength
 o lmp
 o LoadMessage
 o LoadResource
 o lrp
 o Messages
 o name
 o NumReceived
 o NumSent
 o outgoing
 o OutgoingLength
 o Quit
 o received
 o Resources
 o sent
 o smp
 o SystemMessageStorage
 o SystemStatPanel
 o ViewMessage
 o ViewResource
 o vmp
 o vrp

Constructor Index

 o AgentFrame(AgentContext, String)
Constructor for an AgentFrame.

Method Index

 o action(Event, Object)
Called when an event happens in the AgentFrame.
 o addPanel(Panel)
Takes a panel created by the Agent and passed through the MessageOutput object and displays it in a new top-level window.
 o addSystemMessage(String)
Displays the message in the SystemMessages TextArea.
 o ComposeMessageAction()
Called when "Compose Message" is selected from the menu bar.
 o CreateNewFrame(Panel, int, int, String)
Generic method for creating a new top-level window with the specified width, height and name to contain the specified panel.
 o getAgent()
 o HelpAboutAction()
Called when "About Java(tm) Agent" is selected from the menu bar.
 o informPanel(InterfacePanel, String)
 o killPanel(InterfacePanel)
Sets the InterfacePanel's reference to null.
 o LoadMessageAction()
Called when "Load Messages" is selected from the menu bar.
 o LoadResourceAction()
Called when "Load Resources" is selected from the menu bar.
 o QuitAction()
Called when "Quit" is selected from the menu bar.
 o resourceChanged(String)
Called when some Agent resource has changed.
 o SystemMessagesAction()
Create a SystemMessagesPanel.
 o terminate()
Called by the AgentContext to dispose of the gui.
 o terminatePanel(InterfacePanel)
Terminates a specific panel.
 o terminatePanels()
Terminates all of the panels.
 o ViewMessageAction()
Called when "View Messages" is selected from the menu bar.
 o ViewResourceAction()
Called when "View Resources" is selected from the menu bar.

Variables

 o name
 protected String name
 o context
 protected AgentContext context
 o outgoing
 protected int outgoing
 o incoming
 protected int incoming
 o sent
 protected int sent
 o received
 protected int received
 o vrp
 protected ViewResourcePanel vrp
 o lrp
 protected LoadResourcePanel lrp
 o vmp
 protected ViewMessagePanel vmp
 o lmp
 protected LoadMessagePanel lmp
 o cmp
 protected ComposeMessagePanel cmp
 o smp
 protected SystemMessagesPanel smp
 o Controls
 protected MenuBar Controls
 o Action
 protected Menu Action
 o Quit
 protected MenuItem Quit
 o Messages
 protected Menu Messages
 o ViewMessage
 protected MenuItem ViewMessage
 o LoadMessage
 protected MenuItem LoadMessage
 o ComposeMessage
 protected MenuItem ComposeMessage
 o Resources
 protected Menu Resources
 o ViewResource
 protected MenuItem ViewResource
 o LoadResource
 protected MenuItem LoadResource
 o Help
 protected Menu Help
 o HelpAbout
 protected MenuItem HelpAbout
 o SystemStatPanel
 protected Panel SystemStatPanel
 o NumReceived
 protected Label NumReceived
 o NumSent
 protected Label NumSent
 o OutgoingLength
 protected Label OutgoingLength
 o IncomingLength
 protected Label IncomingLength
 o SystemMessageStorage
 protected Vector SystemMessageStorage

Constructors

 o AgentFrame
 protected AgentFrame(AgentContext context,
                      String title)
Constructor for an AgentFrame. Creates GUI components.

Parameters:
context - AgentContext which created this gui.
title - Title for the frame.

Methods

 o getAgent
 protected Agent getAgent()
Returns:
Agent contained by context.
 o action
 public boolean action(Event evt,
                       Object arg)
Called when an event happens in the AgentFrame. Used to take action on menu bar selections.

Parameters:
evt - The event which triggered the method call.
arg - Who called the method. For buttons, string name of button.
Overrides:
action in class Component
 o CreateNewFrame
 protected void CreateNewFrame(Panel p,
                               int width,
                               int height,
                               String name)
Generic method for creating a new top-level window with the specified width, height and name to contain the specified panel.

 o QuitAction
 protected void QuitAction()
Called when "Quit" is selected from the menu bar.

 o terminate
 protected void terminate()
Called by the AgentContext to dispose of the gui.

 o terminatePanels
 protected void terminatePanels()
Terminates all of the panels.

 o terminatePanel
 protected void terminatePanel(InterfacePanel p)
Terminates a specific panel.

 o killPanel
 protected void killPanel(InterfacePanel p)
Sets the InterfacePanel's reference to null.

 o SystemMessagesAction
 protected void SystemMessagesAction()
Create a SystemMessagesPanel.

 o ComposeMessageAction
 protected void ComposeMessageAction()
Called when "Compose Message" is selected from the menu bar. Creates a new top-level frame for the interactive creations of a KQML message. Has a default message to start with.

 o ViewMessageAction
 protected void ViewMessageAction()
Called when "View Messages" is selected from the menu bar. Creates a new top-level frame for the interactive viewing of received KQML messages.

 o LoadMessageAction
 protected void LoadMessageAction()
Called when "Load Messages" is selected from the menu bar. Creates a new top-level frame which allows the user to select a file from which to load a set of messages.

 o resourceChanged
 public void resourceChanged(String type)
Called when some Agent resource has changed.

Parameters:
type - String identifying the type of the resource.
 o informPanel
 protected void informPanel(InterfacePanel p,
                            String type)
 o ViewResourceAction
 protected void ViewResourceAction()
Called when "View Resources" is selected from the menu bar. Creates a new top-level frame which allows the user to view the resources currently possessed by the Agent.

 o LoadResourceAction
 protected void LoadResourceAction()
Called when "Load Resources" is selected from the menu bar. Creates a new top-level frame which allows the user to load new resources from somewhere on the Internet.

 o HelpAboutAction
 protected void HelpAboutAction()
Called when "About Java(tm) Agent" is selected from the menu bar. Creates a new top-level frame which tells the user about the Functionality of the Java(tm) Agent.

 o addSystemMessage
 public void addSystemMessage(String message)
Displays the message in the SystemMessages TextArea.

Parameters:
message - The message to output.
 o addPanel
 public void addPanel(Panel p)
Takes a panel created by the Agent and passed through the MessageOutput object and displays it in a new top-level window.


All Packages  Class Hierarchy  This Package  Previous  Next  Index