|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.event.WindowAdapter | +--AgentGUI
Project: DECAF
Class: AgentGUI
Description: This class is meant to make Agent GUI creation easier.
Field Summary | |
private java.lang.String |
agentName
|
private java.util.Hashtable |
checks
|
private javax.swing.JDesktopPane |
desktop
|
private java.util.Hashtable |
frames
|
private javax.swing.JCheckBoxMenuItem |
income
|
private javax.swing.JInternalFrame |
incoming
|
private int |
MAXX
|
private int |
MAXY
|
private javax.swing.JMenuBar |
menuBar
|
private java.util.Hashtable |
scrolls
|
private java.util.Hashtable |
textAreas
|
private javax.swing.JMenu |
view
|
private int |
winxy
|
Constructor Summary | |
AgentGUI(java.lang.String agentName)
Constructor that takes only the name of the agent, and sets up a blank desktop. |
|
AgentGUI(java.lang.String agentName,
java.lang.String windows)
Constructor to set up a desktop with text windows. |
Method Summary | |
void |
addMenu(javax.swing.JMenu menu)
Add a menu to the menu bar. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Listens to the check boxes in the view menu. |
void |
message(java.lang.String name,
java.lang.String message)
Prints a message to the specified text message window. |
void |
newWindow(javax.swing.JInternalFrame newframe)
Insert a customized window onto the desktop. |
void |
newWindow(java.lang.String name)
Insert a text message window on the desktop. |
void |
removeMenu(java.lang.String name)
Remove a menu from the menu bar. |
void |
removeWindow(java.lang.String name)
Remove a window from the desktop. |
private void |
setupDesktop()
|
private void |
setupDesktop(java.lang.String windows)
|
private void |
setupMenuBar()
|
void |
windowClosing(java.awt.event.WindowEvent e)
Sends a KQML shutdown message when the close button is pressed. |
Methods inherited from class java.awt.event.WindowAdapter |
windowActivated,
windowClosed,
windowDeactivated,
windowDeiconified,
windowIconified,
windowOpened |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int MAXX
private int MAXY
private java.lang.String agentName
private javax.swing.JDesktopPane desktop
private javax.swing.JInternalFrame incoming
private javax.swing.JMenuBar menuBar
private javax.swing.JMenu view
private javax.swing.JCheckBoxMenuItem income
private java.util.Hashtable frames
private java.util.Hashtable textAreas
private java.util.Hashtable scrolls
private java.util.Hashtable checks
private int winxy
Constructor Detail |
public AgentGUI(java.lang.String agentName)
agentName
- The name of the agent appears in the window title.public AgentGUI(java.lang.String agentName, java.lang.String windows)
agentName
- The name of the agent appears in the window title.windows
- A '|' separated list of window names.Method Detail |
public void windowClosing(java.awt.event.WindowEvent e)
e
- A window event.private void setupDesktop()
private void setupDesktop(java.lang.String windows)
private void setupMenuBar()
public void addMenu(javax.swing.JMenu menu)
menu
- The menu to be added.public void removeMenu(java.lang.String name)
menu
- The name of the menu to be removed.public void removeWindow(java.lang.String name)
name
- The name of the window to be removed.public void newWindow(javax.swing.JInternalFrame newframe)
newframe
- The frame to be added.public void newWindow(java.lang.String name)
name
- The title of the window.public void itemStateChanged(java.awt.event.ItemEvent e)
e
- An item event indicating a state change.public void message(java.lang.String name, java.lang.String message)
name
- The name of the window.message
- The message to be displayed.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |