jade.gui
Class AclGui

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--jade.gui.AclGui

public class AclGui
extends javax.swing.JPanel

The AclGui class extends the Swing JPanel class by adding all the controls required to properly edit/show the fields of an an ACL message compliant to the FIPA 97 specs.

There are basically two ways of using the AclGui class.

Version:
$Date: 2003/02/26 15:35:13 $ $Revision: 2.15 $
Author:
Giovanni Caire - CSELT
See Also:
ACLMessage, Serialized Form

Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
AclGui(java.awt.Component owner)
          Ordinary AclGui constructor.
 
Method Summary
static ACLMessage editMsgInDialog(ACLMessage msg, java.awt.Frame parent)
          Pops up a dialog window including an editing-enabled AclGui panel and displays the specified ACL message in it.
 ACLMessage getMsg()
          Get the ACL message currently displayed by the AclGui panel
 void paint(java.awt.Graphics g)
          Paint the AclGui panel
 void setEnabled(boolean enabledFlag)
          Enables/disables the editability of all the controls in an AclGui panel (default is enabled)
 void setMsg(ACLMessage msg)
          Displays the specified ACL message into the AclGui panel
 void setSenderEnabled(boolean enabledFlag)
          Enables/disables the editability of the sender field of an AclGui panel (default is enabled)
static void showMsgInDialog(ACLMessage msg, java.awt.Frame parent)
          Pops up a dialog window including an editing-disabled AclGui panel and displays the specified ACL message in it.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AclGui

public AclGui(java.awt.Component owner)
Ordinary AclGui constructor.
See Also:
ACLMessage.ACLMessage(int)
Method Detail

setMsg

public void setMsg(ACLMessage msg)
Displays the specified ACL message into the AclGui panel
Parameters:
msg - The ACL message to be displayed
See Also:
getMsg()

getMsg

public ACLMessage getMsg()
Get the ACL message currently displayed by the AclGui panel
Returns:
The ACL message currently displayed by the AclGui panel as an ACLMessage object
See Also:
setMsg(ACLMessage msg)

setEnabled

public void setEnabled(boolean enabledFlag)
Enables/disables the editability of all the controls in an AclGui panel (default is enabled)
Overrides:
setEnabled in class javax.swing.JComponent
Parameters:
enabledFlag - If true enables editability
See Also:
setSenderEnabled(boolean enabledFlag)

setSenderEnabled

public void setSenderEnabled(boolean enabledFlag)
Enables/disables the editability of the sender field of an AclGui panel (default is enabled)
Parameters:
enabledFlag - If true enables editability
See Also:
setEnabled(boolean enabledFlag)

paint

public void paint(java.awt.Graphics g)
Paint the AclGui panel
Overrides:
paint in class javax.swing.JComponent

showMsgInDialog

public static void showMsgInDialog(ACLMessage msg,
                                   java.awt.Frame parent)
Pops up a dialog window including an editing-disabled AclGui panel and displays the specified ACL message in it.
Parameters:
m - The ACL message to be displayed
parent - The parent window of the dialog window
See Also:
editMsgInDialog(ACLMessage msg, Frame parent)

editMsgInDialog

public static ACLMessage editMsgInDialog(ACLMessage msg,
                                         java.awt.Frame parent)
Pops up a dialog window including an editing-enabled AclGui panel and displays the specified ACL message in it. The dialog window also includes an OK and a Cancel button to accept or discard the performed editing.
Parameters:
m - The ACL message to be initially displayed
parent - The parent window of the dialog window
Returns:
The ACL message displayed in the dialog window or null depending on whether the user close the window by clicking the OK or Cancel button
See Also:
showMsgInDialog(ACLMessage msg, Frame parent)