    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.

##

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

##

AgentFrame(AgentContext, String)
  Constructor for an AgentFrame.

##

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

##

name

     protected String name

context

     protected AgentContext context

outgoing

     protected int outgoing

incoming

     protected int incoming

sent

     protected int sent

received

     protected int received

vrp

     protected ViewResourcePanel vrp

lrp

     protected LoadResourcePanel lrp

vmp

     protected ViewMessagePanel vmp

lmp

     protected LoadMessagePanel lmp

cmp

     protected ComposeMessagePanel cmp

smp

     protected SystemMessagesPanel smp

Controls

     protected MenuBar Controls

Action

     protected Menu Action

Quit

     protected MenuItem Quit

Messages

     protected Menu Messages

ViewMessage

     protected MenuItem ViewMessage

LoadMessage

     protected MenuItem LoadMessage

ComposeMessage

     protected MenuItem ComposeMessage

Resources

     protected Menu Resources

ViewResource

     protected MenuItem ViewResource

LoadResource

     protected MenuItem LoadResource

Help

     protected Menu Help

HelpAbout

     protected MenuItem HelpAbout

SystemStatPanel

     protected Panel SystemStatPanel

NumReceived

     protected Label NumReceived

NumSent

     protected Label NumSent

OutgoingLength

     protected Label OutgoingLength

IncomingLength

     protected Label IncomingLength

SystemMessageStorage

     protected Vector SystemMessageStorage

##

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.

##

getAgent

     protected Agent getAgent()

  Returns:
    Agent contained by context.

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

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.

QuitAction

     protected void QuitAction()

  Called when "Quit" is selected from the menu bar.

terminate

     protected void terminate()

  Called by the AgentContext to dispose of the gui.

terminatePanels

     protected void terminatePanels()

  Terminates all of the panels.

terminatePanel

     protected void terminatePanel(InterfacePanel p)

  Terminates a specific panel.

killPanel

     protected void killPanel(InterfacePanel p)

  Sets the InterfacePanel's reference to null.

SystemMessagesAction

     protected void SystemMessagesAction()

  Create a SystemMessagesPanel.

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.

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.

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.

resourceChanged

     public void resourceChanged(String type)

  Called when some Agent resource has changed.

  Parameters:
    type - String identifying the type of the resource.

informPanel

     protected void informPanel(InterfacePanel p,
                                String type)

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.

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.

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.

addSystemMessage

     public void addSystemMessage(String message)

  Displays the message in the SystemMessages TextArea.

  Parameters:
    message - The message to output.

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