Update of /cvsroot/rails/18xx/rails/ui/swing/gamespecific/_18EU
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv3333/rails/ui/swing/gamespecific/_18EU
Modified Files:
GameStatus_18EU.java
Log Message:
Changes related to non-modal dialogs
Index: GameStatus_18EU.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** GameStatus_18EU.java 11 Jan 2010 23:06:18 -0000 1.9
--- GameStatus_18EU.java 14 Jan 2010 20:44:04 -0000 1.10
***************
*** 4,12 ****
import java.util.List;
- import rails.game.City;
import rails.game.PublicCompanyI;
import rails.game.action.MergeCompanies;
import rails.game.action.PossibleAction;
- import rails.game.specific._18EU.StartCompany_18EU;
import rails.ui.swing.GameStatus;
import rails.ui.swing.elements.RadioButtonDialog;
--- 4,10 ----
***************
*** 82,136 ****
}
- /** Start a company - specific procedure for 18EU */
- @Override
- protected PossibleAction processGameSpecificFollowUpActions(
- ActionEvent actor, PossibleAction chosenAction) {
-
- if (chosenAction instanceof StartCompany_18EU) {
-
- StartCompany_18EU action = (StartCompany_18EU) chosenAction;
- List<PublicCompanyI> minors = //
- ((StartCompany_18EU) chosenAction).getMinorsToMerge();
-
- if (minors != null && !minors.isEmpty()) {
- // Up to phase 6, a minor must be exchanged
- String[] options = new String[minors.size()];
- int i = 0;
- for (PublicCompanyI minor : minors) {
- options[i++] =
- "Minor " + minor.getName() + " "
- + minor.getLongName();
- }
- RadioButtonDialog dialog = new RadioButtonDialog (gameUIManager,
- LocalText.getText("PleaseSelect"),
- LocalText.getText(
- "SelectMinorToMerge",
- action.getCertificate().getCompany().getName()),
- options, -1);
- gameUIManager.setCurrentDialog(dialog, action);
- return null;
- } else {
-
- // From phase 6, no minors are involved, but a home station must be chosen
- List<City> cities = action.getAvailableHomeStations();
- if (cities != null && !cities.isEmpty()) {
- String[] options = new String[cities.size()];
- for (int i = 0; i < options.length; i++) {
- options[i] = cities.get(i).toString();
- }
- RadioButtonDialog dialog = new RadioButtonDialog (gameUIManager,
- LocalText.getText("PleaseSelect"),
- LocalText.getText(
- "SelectMinorToMerge",
- action.getCertificate().getCompany().getName()),
- options, -1);
- gameUIManager.setCurrentDialog(dialog, action);
- return null;
-
- }
- }
- }
- return chosenAction;
- }
}
--- 80,83 ----
|