|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
fr.lip6.sma.simulacion.avatar.BubblePanel
public class BubblePanel
Classe pour la bulle d'interaction avec l'assistant.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
private JTextArea |
mAssistantMessage
Référence sur la zone avec le message de l'assistant. |
private Avatar |
mAvatar
Référence sur l'avatar. |
private Image |
mBubbleImage
Image. |
private JPanel |
mDialogZone
Zone avec le message ou la question & la réponse. |
private LocalAgent |
mLocalAgent
Référence sur l'agent. |
private JTextArea |
mPlayerMessage
Référence sur la zone où entrer la réponse. |
private JScrollPane |
mPlayerScroll
Défilement pour le message du joueur. |
private String |
mPreviousAttitude
Attitude précédente de l'avatar. |
private List |
mQueue
Liste des actions à effectuer. |
private String |
mReplyMethod
Méthode à appeler une fois la réponse validée. |
private Map |
mReplyParams
Paramètres passés à l'agent lorsque le bouton est validé. |
private JButton |
mValidateButton
Référence sur le bouton pour valider le message. |
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 |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BubblePanel(LocalAgent inLocalAgent,
Avatar inAvatar)
Constructeur à partir de l'agent local et de l'avatar. |
Method Summary | |
---|---|
void |
askQuestion(String inQuestion,
String inReplyMethod,
Map inParams)
Pose une question. |
private void |
doAskQuestion(String inQuestion,
String inReplyMethod,
Map inParams)
Pose une question. |
private void |
doShowMessage(String inMessage)
Affiche un message. |
void |
hideBubble()
Cache la bulle. |
void |
paintComponent(Graphics inGraphics)
Dessine la bulle. |
private void |
setupBubble()
Prépare l'affichage de la bulle. |
void |
showMessage(String inMessage)
Affiche un message. |
private void |
validateAction()
Méthode appelée lorsque le bouton est cliqué. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final LocalAgent mLocalAgent
private final Avatar mAvatar
private final Image mBubbleImage
private final JPanel mDialogZone
private final JTextArea mAssistantMessage
private final JTextArea mPlayerMessage
private JScrollPane mPlayerScroll
private final JButton mValidateButton
private String mPreviousAttitude
private String mReplyMethod
private Map mReplyParams
private final List mQueue
Constructor Detail |
---|
public BubblePanel(LocalAgent inLocalAgent, Avatar inAvatar)
inLocalAgent
- agent local.inAvatar
- avatar.Method Detail |
---|
private void validateAction()
private void setupBubble()
public void hideBubble()
public void showMessage(String inMessage)
inMessage
- message à afficher.private void doShowMessage(String inMessage)
inMessage
- message à afficher.public void askQuestion(String inQuestion, String inReplyMethod, Map inParams)
inQuestion
- question à poser.inReplyMethod
- message de réponse (envoyé à l'agent).inParams
- paramètres à passer à l'agent.private void doAskQuestion(String inQuestion, String inReplyMethod, Map inParams)
inQuestion
- question à poser.inReplyMethod
- message de réponse (envoyé à l'agent).inParams
- paramètres à passer à l'agent.public void paintComponent(Graphics inGraphics)
paintComponent
in class JComponent
inGraphics
- interface pour le dessin.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |