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.
-
ACCOUNT_LABEL
-
-
BUTTON_FONT_NAME
-
-
BUTTON_FONT_SIZE
-
-
BUTTON_FONT_STYLE
-
-
EMPTY_STRING
-
-
FRAME_HEIGHT
-
-
FRAME_WIDTH
-
-
INV_TEXT_AREA_COLS
-
-
INV_TEXT_AREA_ROWS
-
-
INVENTORY_LABEL
-
-
MSSG_TEXT_AREA_COLS
-
-
MSSG_TEXT_AREA_ROWS
-
-
PRODUCT_CHOICE_LABEL
-
-
QUANT_TEXT_FIELD_COLS
-
-
QUANTITY_LABEL
-
-
QUIT_BUTTON_LABEL
-
-
SHOP_BUTTON_LABEL
-
-
TEXT_FONT_NAME
-
-
TEXT_FONT_SIZE
-
-
TEXT_FONT_STYLE
-
-
BuyerFrame(PacCommSystem, String)
- Description : BuyerFrame constructor
-
actionPerformed(ActionEvent)
- Description : Build a KQML message and send it to the parent agent.
-
addProduct(Product)
- Description : Adds an item to the choice
-
clone()
- Description :
-
displayAccount(float)
- Description : Convert the float to a string and display it in the
text field.
-
displayInventory(Product)
- Description : Append the string argument to the text area.
-
displayMessage(String)
- Description : Append the string argument to the text area.
-
displayPriceQuote(PriceQuote)
- Description : Append the string argument to the text area.
-
getCurrentHostName()
- Description : Returns the name of the current host machine.
-
main(String[])
- PUBLIC METHODS********************************
/**
Description :
-
run()
- Description :
FRAME_WIDTH
public static final int FRAME_WIDTH
FRAME_HEIGHT
public static final int FRAME_HEIGHT
INV_TEXT_AREA_ROWS
public static final int INV_TEXT_AREA_ROWS
INV_TEXT_AREA_COLS
public static final int INV_TEXT_AREA_COLS
MSSG_TEXT_AREA_ROWS
public static final int MSSG_TEXT_AREA_ROWS
MSSG_TEXT_AREA_COLS
public static final int MSSG_TEXT_AREA_COLS
QUANT_TEXT_FIELD_COLS
public static final int QUANT_TEXT_FIELD_COLS
EMPTY_STRING
public static final String EMPTY_STRING
SHOP_BUTTON_LABEL
public static final String SHOP_BUTTON_LABEL
QUIT_BUTTON_LABEL
public static final String QUIT_BUTTON_LABEL
PRODUCT_CHOICE_LABEL
public static final String PRODUCT_CHOICE_LABEL
QUANTITY_LABEL
public static final String QUANTITY_LABEL
INVENTORY_LABEL
public static final String INVENTORY_LABEL
ACCOUNT_LABEL
public static final String ACCOUNT_LABEL
BUTTON_FONT_NAME
public static final String BUTTON_FONT_NAME
BUTTON_FONT_STYLE
public static final int BUTTON_FONT_STYLE
BUTTON_FONT_SIZE
public static final int BUTTON_FONT_SIZE
TEXT_FONT_NAME
public static final String TEXT_FONT_NAME
TEXT_FONT_STYLE
public static final int TEXT_FONT_STYLE
TEXT_FONT_SIZE
public static final int TEXT_FONT_SIZE
BuyerFrame
public BuyerFrame(PacCommSystem pacCommSystem,
String buyerName)
- Description : BuyerFrame constructor
- Parameters:
- pacCommSystem - - PacCommSystem for communication between the agent
and the PAC.
- buyerName - - String
main
public static void main(String args[])
- PUBLIC METHODS********************************
/**
Description :
- Returns:
- void
displayMessage
public void displayMessage(String string)
- Description : Append the string argument to the text area.
- Returns:
- void
displayPriceQuote
public void displayPriceQuote(PriceQuote quote)
- Description : Append the string argument to the text area.
- Returns:
- void
displayInventory
public void displayInventory(Product product)
- Description : Append the string argument to the text area.
- Returns:
- void
displayAccount
public void displayAccount(float accountValue)
- Description : Convert the float to a string and display it in the
text field.
- Returns:
- void
addProduct
public void addProduct(Product product)
- Description : Adds an item to the choice
- Returns:
- void
run
public void run()
- Description :
- Returns:
- void
clone
public Object clone()
- Description :
- Returns:
- Object
- Overrides:
- clone in class Object
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
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