All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.reticular.agents.buyerSeller.BuyerFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----com.reticular.agents.buyerSeller.BuyerFrame

public class BuyerFrame
extends Frame
implements Runnable, Cloneable, ActionListener
Description : Frame provides a simple interface for the message testing agent. This interface has a scrollable text area, a print button, and a quit button.


Variable Index

 o ACCOUNT_LABEL
 o BUTTON_FONT_NAME
 o BUTTON_FONT_SIZE
 o BUTTON_FONT_STYLE
 o EMPTY_STRING
 o FRAME_HEIGHT
 o FRAME_WIDTH
 o INV_TEXT_AREA_COLS
 o INV_TEXT_AREA_ROWS
 o INVENTORY_LABEL
 o MSSG_TEXT_AREA_COLS
 o MSSG_TEXT_AREA_ROWS
 o PRODUCT_CHOICE_LABEL
 o QUANT_TEXT_FIELD_COLS
 o QUANTITY_LABEL
 o QUIT_BUTTON_LABEL
 o SHOP_BUTTON_LABEL
 o TEXT_FONT_NAME
 o TEXT_FONT_SIZE
 o TEXT_FONT_STYLE

Constructor Index

 o BuyerFrame(PacCommSystem, String)
Description : BuyerFrame constructor

Method Index

 o actionPerformed(ActionEvent)
Description : Build a KQML message and send it to the parent agent.
 o addProduct(Product)
Description : Adds an item to the choice
 o clone()
Description :
 o displayAccount(float)
Description : Convert the float to a string and display it in the text field.
 o displayInventory(Product)
Description : Append the string argument to the text area.
 o displayMessage(String)
Description : Append the string argument to the text area.
 o displayPriceQuote(PriceQuote)
Description : Append the string argument to the text area.
 o getCurrentHostName()
Description : Returns the name of the current host machine.
 o main(String[])
PUBLIC METHODS******************************** /** Description :
 o run()
Description :

Variables

 o FRAME_WIDTH
 public static final int FRAME_WIDTH
 o FRAME_HEIGHT
 public static final int FRAME_HEIGHT
 o INV_TEXT_AREA_ROWS
 public static final int INV_TEXT_AREA_ROWS
 o INV_TEXT_AREA_COLS
 public static final int INV_TEXT_AREA_COLS
 o MSSG_TEXT_AREA_ROWS
 public static final int MSSG_TEXT_AREA_ROWS
 o MSSG_TEXT_AREA_COLS
 public static final int MSSG_TEXT_AREA_COLS
 o QUANT_TEXT_FIELD_COLS
 public static final int QUANT_TEXT_FIELD_COLS
 o EMPTY_STRING
 public static final String EMPTY_STRING
 o SHOP_BUTTON_LABEL
 public static final String SHOP_BUTTON_LABEL
 o QUIT_BUTTON_LABEL
 public static final String QUIT_BUTTON_LABEL
 o PRODUCT_CHOICE_LABEL
 public static final String PRODUCT_CHOICE_LABEL
 o QUANTITY_LABEL
 public static final String QUANTITY_LABEL
 o INVENTORY_LABEL
 public static final String INVENTORY_LABEL
 o ACCOUNT_LABEL
 public static final String ACCOUNT_LABEL
 o BUTTON_FONT_NAME
 public static final String BUTTON_FONT_NAME
 o BUTTON_FONT_STYLE
 public static final int BUTTON_FONT_STYLE
 o BUTTON_FONT_SIZE
 public static final int BUTTON_FONT_SIZE
 o TEXT_FONT_NAME
 public static final String TEXT_FONT_NAME
 o TEXT_FONT_STYLE
 public static final int TEXT_FONT_STYLE
 o TEXT_FONT_SIZE
 public static final int TEXT_FONT_SIZE

Constructors

 o BuyerFrame
 public BuyerFrame(PacCommSystem pacCommSystem,
                   String buyerName)
Description : BuyerFrame constructor

Parameters:
pacCommSystem - - PacCommSystem for communication between the agent and the PAC.
buyerName - - String

Methods

 o main
 public static void main(String args[])
PUBLIC METHODS******************************** /** Description :

Returns:
void
 o displayMessage
 public void displayMessage(String string)
Description : Append the string argument to the text area.

Returns:
void
 o displayPriceQuote
 public void displayPriceQuote(PriceQuote quote)
Description : Append the string argument to the text area.

Returns:
void
 o displayInventory
 public void displayInventory(Product product)
Description : Append the string argument to the text area.

Returns:
void
 o displayAccount
 public void displayAccount(float accountValue)
Description : Convert the float to a string and display it in the text field.

Returns:
void
 o addProduct
 public void addProduct(Product product)
Description : Adds an item to the choice

Returns:
void
 o run
 public void run()
Description :

Returns:
void
 o clone
 public Object clone()
Description :

Returns:
Object
Overrides:
clone in class Object
 o actionPerformed
 public void actionPerformed(ActionEvent event)
Description : Build a KQML message and send it to the parent agent. BuyerCallback is registered as an action listener for the two buttons on the interface, so this method will be invoked when either button gets pushed.

Returns:
void
 o getCurrentHostName
 public static String getCurrentHostName()
Description : Returns the name of the current host machine.

Returns:
String

All Packages  Class Hierarchy  This Package  Previous  Next  Index