|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
fr.lip6.sma.simulacion.app.LocalizedWindow
fr.lip6.sma.simulacion.app.ApplicationWindow
fr.lip6.sma.simulacion.app.GameApplicationWindow
fr.lip6.sma.simulacion.app.SetupWindow
public abstract class SetupWindow
Classe pour la fenêtre de configuration de l'application.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
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 Map |
mAvatarZones
Liste des zones pour chacun des avatars. |
private JPanel |
mButtonsZone
Zone with the buttons. |
private AgentListManager |
mListManager
Gestionnaire de la liste des agents sur le réseau. |
private LocalAgent |
mLocalAgent
Agent local enregistré sur le réseau (ou null). |
private JPanel |
mMainPane
Main pane. |
private SortedSet |
mPlayerAgentNames
Liste (triée) des noms des agents utilisables pour jouer. |
private JButton |
mQuitButton
"Quit" button. |
private String |
mSelectedAvatarName
Avatar sélectionné ou null si aucun avatar n'est choisi. |
private JButton |
mSetupButton
"Setup" button. |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SetupWindow(GameApplication inApplication)
Constructeur à partir d'une référence sur l'application. |
Method Summary | |
---|---|
void |
avatarZoneMouseClicked(MouseEvent inEvent)
Méthode appelée lorsqu'un clic survient dans la zone de l'avatar. |
private boolean |
canAvatarBeSelected(String inAvatarName)
Détermine si un avatar peut être choisi. |
private JPanel |
createAvatarZones()
Crée les vues sur les avatars dans un JPanel. |
void |
dispose()
Méthode appelée lorsque la fenêtre est fermée. |
private void |
handleOutClick()
Méthode invoquée lorsqu'un clic est fait en dehors de toute zone est fait. |
private void |
handleZoneClick(String inAvatarName)
Méthode invoquée lorsqu'une zone d'avatar est cliquée. |
private void |
initComponents()
Méthode pour initialiser les composants au démarrage de l'application. |
void |
listChanged()
Méthode appelée lorsque la liste a été modifiée. |
private void |
mQuitButtonActionPerformed(ActionEvent inEvent)
Méthode invoquée lorsque le bouton "Quit" de la fenêtre est cliqué. |
private void |
mSetupButtonActionPerformed(ActionEvent inEvent)
Méthode invoquée lorsque le bouton "Setup" de la fenêtre est cliqué. |
void |
registrationFailed(LocalAgent inLocalAgent)
Méthode appelée lorsque l'enregistrement a échoué. |
void |
registrationSucceeded(LocalAgent inLocalAgent)
Méthode appelée lorsque l'enregistrement a réussi. |
private void |
selectAvatar(String inAvatarName)
Méthode invoquée pour marquer qu'un avatar est choisi. |
private void |
unselectAvatar()
Méthode invoquée pour marquer que l'avatar courant n'est plus choisi. |
private void |
updateNonSelectableItems()
Méthode invoquée pour activer/désactiver les agents en fonction de la liste des avatars que l'on peut choisir. |
Methods inherited from class fr.lip6.sma.simulacion.app.GameApplicationWindow |
---|
getGameApplication |
Methods inherited from class fr.lip6.sma.simulacion.app.ApplicationWindow |
---|
doAbout, doQuit, getApplication |
Methods inherited from class fr.lip6.sma.simulacion.app.LocalizedWindow |
---|
addNotify, centerWindow, localizeAbstractButton, localizeComponent, localizeCompoundBorder, localizeContainer, localizeFrame, localizeJComponent, localizeJProgressBar, localizeLabel, localizeMenuElement, localizeString, localizeTextComponent, pack, resetDefaultLocale, thisWindowClosing |
Methods inherited from class java.awt.Frame |
---|
finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private final JPanel mMainPane
private final JPanel mButtonsZone
private final JButton mQuitButton
private final JButton mSetupButton
private final SortedSet mPlayerAgentNames
private final Map mAvatarZones
private final AgentListManager mListManager
private String mSelectedAvatarName
null
si aucun avatar n'est choisi.
private LocalAgent mLocalAgent
Constructor Detail |
---|
public SetupWindow(GameApplication inApplication)
inApplication
- référence sur l'application simulacionMethod Detail |
---|
private void initComponents()
private JPanel createAvatarZones()
public final void registrationSucceeded(LocalAgent inLocalAgent)
registrationSucceeded
in interface AgentListClient
inLocalAgent
- agent enregistré avec succès.public void registrationFailed(LocalAgent inLocalAgent)
registrationFailed
in interface AgentListClient
inLocalAgent
- agent qui n'a pas pu être enregistré.public void listChanged()
listChanged
in interface AgentListClient
private void mSetupButtonActionPerformed(ActionEvent inEvent)
inEvent
- événement du clic (ignoré)private void mQuitButtonActionPerformed(ActionEvent inEvent)
inEvent
- événement du clic (ignoré)public void avatarZoneMouseClicked(MouseEvent inEvent)
inEvent
- événement du clicprivate void handleZoneClick(String inAvatarName)
inAvatarName
- nom de l'avatar correspondant.private void handleOutClick()
private void selectAvatar(String inAvatarName)
unselectAvatar
auparavant.
inAvatarName
- nom de l'avatar choisiunselectAvatar()
private void unselectAvatar()
private void updateNonSelectableItems()
private boolean canAvatarBeSelected(String inAvatarName)
inAvatarName
- nom de l'avatar
true
si l'avatar peut être choisi,
false
sinon.public void dispose()
dispose
in class ApplicationWindow
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |