fipaos.platform.dfgui.swing
Class DFGUIFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--fipaos.platform.dfgui.swing.DFGUIFrame

public class DFGUIFrame
extends JFrame
implements KeyListener

This is a DF GUI, implemented with Java's Swing classes. It gives the user a view of what agents are registered with the DF, and what kind of services they offer - in the future releases there is also functionality to modify this code.


Inner Class Summary
 (package private) classDFGUIFrame.DFGUIModel
          The Tree model used with the DF GUI, which is used to show the real tree structure in the GUI.
 (package private) classDFGUIFrame.DFGUIPopupListener
          Mouse adapter used to detect popup events and show the appropriate popup menus.
 (package private) classDFGUIFrame.DFGUIRenderer
          Internal class for rendering, mainly choosing the icons.
 (package private) classDFGUIFrame.DFGUITreeSelectionListener
          TreeSelectionListener that is used to disable buttons that are not usable with selected tree items.

Inner classes inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame

Inner classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame

Inner classes inherited from class java.awt.Window
Window.AccessibleAWTWindow

Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer

Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent

Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE

Fields inherited from class java.awt.Frame
DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, NORMAL, ICONIFIED

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
DFGUIFrame(SwingDFGUIAgent parent, AgentID df)
          The constructor for the DFGUI frame.

Method Summary
 (package private) voidagentDeregistered(AgentID df, AgentID agent)
          This method is called when agent has deregistered from an df.
 voidkeyPressed(KeyEvent e)
          Invoked when a key has been pressed.
 voidkeyReleased(KeyEvent e)
          Invoked when a key has been released.
 voidkeyTyped(KeyEvent e)
          Invoked when a key has been typed.
 static voidmain(java.lang.String[] agrs)
          Main method for testing.
 (package private) voidnotifyError(String error_message)
          Creates a popup window notifying an error.
 (package private) voidnotifyMessage(String message)
          Shows a system message in the task bar of the GUI window.
 (package private) voidreturnAID(AgentID df_aid)
          This method is envoked by the RegisterWithDFFrame when user wants to add in new DF to be monitored.
 (package private) voidreturnRegister(AgentID new_df, String df)
          This method is envoked by the RegisterWithDFFrame when user wants to register the selected DF with another DF.
 (package private) voidupdateTree()
          This method is envoked by the parent agent when a change has happened with one of the monitored DFs.

Methods inherited from class javax.swing.JFrame
setDefaultCloseOperation, getDefaultCloseOperation, update, setJMenuBar, getJMenuBar, remove, setLayout, getRootPane, getContentPane, setContentPane, getLayeredPane, setLayeredPane, getGlassPane, setGlassPane, getAccessibleContext

Methods inherited from class java.awt.Frame
addNotify, getTitle, setTitle, getIconImage, setIconImage, getMenuBar, setMenuBar, isResizable, setResizable, setState, getState, remove, removeNotify, setCursor, getCursorType, getFrames

Methods inherited from class java.awt.Window
pack, show, hide, dispose, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, removeAll, getLayout, doLayout, layout, invalidate, validate, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, print, paintComponents, printComponents, addContainerListener, removeContainerListener, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, notify, notifyAll, wait, wait, wait

Constructor Detail

DFGUIFrame

public DFGUIFrame(SwingDFGUIAgent parent, AgentID df)
The constructor for the DFGUI frame. Starts up the GUI and loads the agent details for the default DF.
Parameters:
parent - the SwingDFGUIAgent that created the GUI
df - the default DF
Method Detail

agentDeregistered

void agentDeregistered(AgentID df, AgentID agent)
This method is called when agent has deregistered from an df.
Parameters:
df - AgentID of the DF
agent - AgentID of the agent deregistered

keyPressed

public void keyPressed(KeyEvent e)
Invoked when a key has been pressed. Not implemented.
Parameters:
e - the key event detected

keyReleased

public void keyReleased(KeyEvent e)
Invoked when a key has been released. Not implemented.
Parameters:
e - the key event detected

keyTyped

public void keyTyped(KeyEvent e)
Invoked when a key has been typed. This event occurs when a key press is followed by a key release. Used to detect menu hot-keys.
Parameters:
e - the key event detected

main

public static void main(java.lang.String[] agrs)
Main method for testing.
Parameters:
agrs - command line parameters (not used)

notifyError

void notifyError(String error_message)
Creates a popup window notifying an error.
Parameters:
error_message - the error message

notifyMessage

void notifyMessage(String message)
Shows a system message in the task bar of the GUI window.
Parameters:
message - the notify message

returnAID

void returnAID(AgentID df_aid)
This method is envoked by the RegisterWithDFFrame when user wants to add in new DF to be monitored.
Parameters:
df_aid - AID of the new DF

returnRegister

void returnRegister(AgentID new_df, String df)
This method is envoked by the RegisterWithDFFrame when user wants to register the selected DF with another DF.
Parameters:
new_df - new DF the selected DF will be registered with
df - the old DF

updateTree

void updateTree()
This method is envoked by the parent agent when a change has happened with one of the monitored DFs.

Association Links

to Class javax.swing.JMenuBar

to Class javax.swing.JMenu

to Class javax.swing.JMenuItem

to Class javax.swing.JMenuItem

to Class javax.swing.JSeparator

to Class javax.swing.JMenuItem

to Class javax.swing.JSeparator

to Class javax.swing.JMenuItem

to Class javax.swing.JMenu

to Class javax.swing.JMenuItem

to Class javax.swing.JMenuItem

to Class javax.swing.JSeparator

to Class javax.swing.JMenuItem

to Class javax.swing.JMenu

to Class javax.swing.JMenuItem

to Class javax.swing.JPopupMenu

to Class javax.swing.JMenuItem

to Class javax.swing.JMenuItem

to Class javax.swing.JSeparator

to Class javax.swing.JMenuItem

to Class javax.swing.JSeparator

to Class javax.swing.JMenuItem

to Class javax.swing.JMenuItem

to Class javax.swing.JPopupMenu

to Class javax.swing.JMenuItem

to Class javax.swing.JToolBar

to Class javax.swing.JButton

to Class javax.swing.JButton

to Class javax.swing.JSeparator

to Class javax.swing.JButton

to Class javax.swing.JButton

to Class javax.swing.JScrollPane

to Class javax.swing.JTree

to Class javax.swing.JLabel

to Class java.util.Map

to Class fipaos.platform.dfgui.swing.SwingDFGUIAgent

to Class fipaos.platform.dfgui.swing.DFGUIFrame.DFGUIModel

to Class java.awt.event.MouseListener

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String

to Class java.lang.String