|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.nipax.hippo.pexeso.NewGameDlg
public class NewGameDlg
Creates modal dialog to select players for new game. Lets user to select players (AI) and then
calls Playground.init
, Playground.add_AI
and Playground.start
Also remembers last slelection for next time of creating this dialog.
Kaffe has problem with showing combo boxes (I don't know why). They apear OK, but changing the value isn't what one would expect. The popup window somehow floats.
Playground.init(int, int)
,
Playground.add_AI(cz.nipax.hippo.pexeso.AI, cz.nipax.hippo.pexeso.AI)
,
Playground.start()
Field Summary | |
---|---|
private static boolean |
beastmode
Remembers beast mode. |
private javax.swing.JComboBox |
cbox1
The combobox for selecting first's player AI. |
private static int |
cbox1_sel
Remembers selection of first player's AI. |
private javax.swing.JComboBox |
cbox2
The combobox for selecting second's player AI. |
private static int |
cbox2_sel
Remembers selection of second player's AI. |
private javax.swing.JDialog |
dialog
The dialog window. |
private javax.swing.JCheckBox |
chbox_beast
Checkbox for beastmode. |
private javax.swing.JCheckBox |
chbox_ts
Checkbox for turn switch |
private Playground |
pg
The playground for which this dialog selects players. |
private static boolean |
turnswitch
Remembers turn switch mode |
Constructor Summary | |
---|---|
NewGameDlg()
Simple constructor that set all to null. |
Method Summary | |
---|---|
private javax.swing.JComboBox |
createCombo()
Creates new combobox object filled with AI names. |
void |
createGUI(javax.swing.JFrame frame,
Playground pg_in)
Creates and shows the modal dialog. |
private AI |
getAI(int ID)
Creates AI object from selection of combobox. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static int cbox1_sel
cbox1
private static int cbox2_sel
cbox2
private static boolean beastmode
private static boolean turnswitch
private javax.swing.JDialog dialog
private javax.swing.JComboBox cbox1
private javax.swing.JComboBox cbox2
private javax.swing.JCheckBox chbox_beast
private javax.swing.JCheckBox chbox_ts
private Playground pg
Playground
Constructor Detail |
---|
public NewGameDlg()
Method Detail |
---|
private AI getAI(int ID)
createCombo()
ID
- from which AI is created
AI
private javax.swing.JComboBox createCombo()
getAI(int)
public void createGUI(javax.swing.JFrame frame, Playground pg_in)
frame
- the main app frame, parent of this dialogpg_in
- Where to add new AI and start new game. If user
clicks cancel button, no method from pg_in
is called.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |