|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--jade.tools.sniffer.MMCanvas
Manages agents and messages on both canvas. It holds an agent list, a message list and all necessary methods for adding, removing and drawing these object. It also registers ad handles events from mouse
JPanel
,
MouseListener
, Serialized FormInner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
AgentList |
al
|
MessageList |
ml
|
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 | |
MMCanvas(boolean type,
MainWindow mWnd,
PanelCanvas panCan,
MainPanel mPan,
MMCanvas other)
|
Method Summary | |
void |
addAgent(Agent agent)
|
void |
addMessage(Message mess)
Adds a message to canvas message then repaints the canvas |
AgentList |
getAgentList()
Returns an handler to the agent list. |
MessageList |
getMessageList()
Returns an handler to the message list. |
boolean |
isPresent(java.lang.String agName)
Looks if an agent is present on Agent Canvas |
void |
mouseClicked(java.awt.event.MouseEvent evt)
This method is invoked every time a user double-click on a blue arrow in the message canvas: the double-click occurs on a blue arrow in the message canavs, a dialog box is displayed with the entire message. |
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
void |
mouseExited(java.awt.event.MouseEvent evt)
|
void |
mouseMoved(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
Method invoked everytime the use clicks on a blue arrow: it updates the TextMessage component displaying the type of the message. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
void |
paintComponent(java.awt.Graphics g)
|
void |
rAgfromNoSniffVector(Agent agent)
Adds an agent to canvas agent then repaints it |
void |
recMessage(Message newMess)
Returns new messages and put them into canvas agent |
void |
removeAgent(java.lang.String agentName)
Removes an agent from the canvas agent then repaints it |
void |
removeAllAgents()
Removes all the agents and messages from their lists then repaints the canvas |
void |
removeAllMessages()
Removes all the messages in the message list then repaints the canvas |
void |
repaintNoSniffedAgent(Agent agent)
|
Agent |
selAgent(java.awt.event.MouseEvent evt)
Returns an Agent if an Agent has been selected form the user, otherwise returns null. |
Message |
selMessage(java.awt.event.MouseEvent evt)
|
void |
setAgentList(AgentList savedList)
Set the agent list handler as the parameter passed then repaints the canvas |
void |
setMessageList(MessageList savedList)
Set the message list handler as the parameter passed then repaints the canvas |
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,
paint,
paintBorder,
paintChildren,
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,
setEnabled,
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 |
Field Detail |
public AgentList al
public MessageList ml
Constructor Detail |
public MMCanvas(boolean type, MainWindow mWnd, PanelCanvas panCan, MainPanel mPan, MMCanvas other)
Method Detail |
public void paintComponent(java.awt.Graphics g)
public void mousePressed(java.awt.event.MouseEvent evt)
evt
- mouse eventpublic void mouseClicked(java.awt.event.MouseEvent evt)
evt
- mouse eventpublic void mouseEntered(java.awt.event.MouseEvent evt)
public void mouseExited(java.awt.event.MouseEvent evt)
public void mouseReleased(java.awt.event.MouseEvent evt)
public void mouseDragged(java.awt.event.MouseEvent evt)
public void mouseMoved(java.awt.event.MouseEvent evt)
public Message selMessage(java.awt.event.MouseEvent evt)
public Agent selAgent(java.awt.event.MouseEvent evt)
evt
- mouse eventpublic void rAgfromNoSniffVector(Agent agent)
agent
- agent to be addpublic void addAgent(Agent agent)
public void removeAgent(java.lang.String agentName)
agentName
- agent to be removedpublic void removeAllAgents()
public void repaintNoSniffedAgent(Agent agent)
public void addMessage(Message mess)
mess
- message to be addedpublic void removeAllMessages()
public boolean isPresent(java.lang.String agName)
agName
- agent name to look forpublic AgentList getAgentList()
public MessageList getMessageList()
public void setAgentList(AgentList savedList)
savedList
- new list of agentspublic void setMessageList(MessageList savedList)
savedList
- new list of messagespublic void recMessage(Message newMess)
newMess
- new message
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |