Skip to content

Commit 5b13c1e

Browse files
committed
removed default values
1 parent c38f337 commit 5b13c1e

8 files changed

Lines changed: 154 additions & 148 deletions

File tree

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/controller/FixturesController.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public void updateFixtures(ActionEvent actionperformed){
7777
tempint = 0;
7878
if (chkAllFixtures.isSelected()) {
7979
tourStage.setText("PENDING FIXTURES");
80+
pendingRounds = new Round[tournament.getPendingRounds().length];
8081
pendingRounds = tournament.getPendingRounds();
8182
compName = null;
8283
VS = null;

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/controller/GroupStageScreenController.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void radioSelected(ActionEvent event) {
8989
tourType = 2;
9090
txtnoOfrounds.setText("2");
9191
txtnoOfrounds.editableProperty().set(false);
92-
noofround.setText(String.valueOf(((Integer.valueOf(txtnoOfcomps.getText()) - 1)*2)));
92+
noofround.setText(txtnoOfcomps.getText()== null || txtnoOfcomps.getText().equals("")? "0": String.valueOf(((Integer.valueOf(txtnoOfcomps.getText()) - 1)*2)));
9393
noofround.setVisible(true);
9494
txtnoOfrounds.setVisible(false);
9595
message = "In a robin tournament, each competitor plays every other competitor once. The no of rounds is determined by the no of competitors. The winner is determined by the ranking table which is based on the no of Wins, Draws , Goals Scored etc";
@@ -98,7 +98,7 @@ public void radioSelected(ActionEvent event) {
9898
tourType = 3;
9999
txtnoOfrounds.setText("2");
100100
txtnoOfrounds.setVisible(false);
101-
noofround.setText(String.valueOf(((Integer.valueOf(txtnoOfcomps.getText()) - 1)*2)*2));
101+
noofround.setText(txtnoOfcomps.getText()== null || txtnoOfcomps.getText().equals("")? "0": String.valueOf(((Integer.valueOf(txtnoOfcomps.getText()) - 1)*2)));
102102
noofround.setVisible(true);
103103
txtTourHighlight.setText("DOUBLE ROUND");
104104
message = "In a robin tournament, each competitor plays every other competitor twice.The no of rounds is determined by the no of competitors. Most association football leagues in the world are organized on a double round-robin basis, in which every team plays all others in its league once at home and once away.";

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/controller/InputCompetitorController.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import javafx.scene.Parent;
4343
import javafx.scene.Scene;
4444
import javafx.scene.control.Button;
45-
import javafx.scene.control.CheckBox;
4645
import javafx.scene.control.Label;
4746
import javafx.scene.control.TextField;
4847
import javafx.scene.image.Image;
@@ -310,8 +309,8 @@ public void next(ActionEvent event) throws MalformedURLException, URISyntaxExcep
310309

311310
file[i] = clickToaddImageFile;
312311

313-
System.out.println("from to string of url 1");
314-
System.out.println(url1.toString());
312+
//System.out.println("from to string of url 1");
313+
//System.out.println(url1.toString());
315314
// file[i] = new File(url1.toURI());
316315
imageTracker[i] = i;// track the location in which Click to add image is used
317316
}

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/controller/TournamentTypeScreenController.java‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class TournamentTypeScreenController {
3535
@FXML private RadioButton rbGroup;
3636
@FXML private AnchorPane rootPane;
3737
@FXML private CheckBox goalsScored;
38+
private String tournamentAppName;
3839

3940

4041
private String message;
@@ -86,28 +87,33 @@ public void previous(ActionEvent event) throws IOException {
8687

8788
@FXML
8889
public void next(ActionEvent event) throws IOException {
90+
if(tournamentName.getText().trim().equals("") || tournamentName.getText() == null) {
91+
tournamentAppName = "Tournament";
92+
}else
93+
tournamentAppName = tournamentName.getText();
8994
//((Node) event.getSource()).getScene().getWindow().hide();
9095
//Stage primaryStage = new Stage();
9196
FXMLLoader loader = new FXMLLoader();
9297
Pane root = loader.load(getClass().getResource(Paths.viewpath+nextFxml).openStream());
9398

9499
//to pass the tournament name to the next screen
95100
switch (nextFxml) {
101+
96102
case "Challenge.fxml":
97103
ChallengeScreenController ch = (ChallengeScreenController) loader.getController();
98-
ch.setTournamentName(tournamentName.getText(),goalScored);
104+
ch.setTournamentName(tournamentAppName,goalScored);
99105
break;
100106
case "MultiStage.fxml":
101107
MultiStageScreenController ms = (MultiStageScreenController) loader.getController();
102-
ms.setTournamentName(tournamentName.getText(),goalScored);
108+
ms.setTournamentName(tournamentAppName,goalScored);
103109
break;
104110
case "GroupStage.fxml":
105111
GroupStageScreenController gr = (GroupStageScreenController) loader.getController();
106-
gr.setTournamentName(tournamentName.getText(),goalScored);
112+
gr.setTournamentName(tournamentAppName,goalScored);
107113
break;
108114
default:
109115
KnockoutScreenController ko = (KnockoutScreenController) loader.getController();
110-
ko.setTournamentName(tournamentName.getText(),goalScored);
116+
ko.setTournamentName(tournamentAppName,goalScored);
111117
break;
112118
}//end switch
113119

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/views/Groupstage.fxml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
<Font name="Times New Roman" size="18.0" />
115115
</font>
116116
</Label>
117-
<TextField fx:id="txtnoOfcomps" onKeyPressed="#updaterud" onKeyReleased="#updaterud" onKeyTyped="#updaterud" text="4" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="3" />
118-
<TextField fx:id="txtnoOfrounds" text="2" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="4" />
117+
<TextField fx:id="txtnoOfcomps" onKeyPressed="#updaterud" onKeyReleased="#updaterud" onKeyTyped="#updaterud" promptText="4" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="3" />
118+
<TextField fx:id="txtnoOfrounds" promptText="2" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="4" />
119119
<Label alignment="TOP_LEFT" prefHeight="27.0" prefWidth="22.0" text="W" GridPane.columnIndex="1" GridPane.halignment="LEFT">
120120
<font>
121121
<Font name="System Bold" size="18.0" />

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/views/Knockout.fxml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
</font>
6565
</Label>
6666
<CheckBox fx:id="homeandAway" mnemonicParsing="false" onAction="#homeAway" GridPane.columnIndex="1" GridPane.rowIndex="1" />
67-
<TextField fx:id="txtNoofcompetitors" text="4" GridPane.columnIndex="1" />
68-
<CheckBox fx:id="checkBoxShuffleComps" mnemonicParsing="false" selected="true" GridPane.columnIndex="1" GridPane.rowIndex="2" />
67+
<TextField fx:id="txtNoofcompetitors" promptText="4" GridPane.columnIndex="1" />
68+
<CheckBox fx:id="checkBoxShuffleComps" mnemonicParsing="false" selected="true" GridPane.columnIndex="1" GridPane.rowIndex="2" />
6969
<Label text="Shuffle Competitors" GridPane.rowIndex="2">
7070
<font>
7171
<Font name="Trebuchet MS" size="16.0" />

‎TournamentAppJavaFX/src/com/solutioninventors/tournament/GUI/views/MultiStage.fxml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
<Font name="Trebuchet MS" size="16.0" />
116116
</font>
117117
</Label>
118-
<TextField fx:id="txtnoOfcomps" text="4" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2" />
119-
<TextField fx:id="txtnoOfrounds" text="2" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="3" />
118+
<TextField fx:id="txtnoOfcomps" promptText="8" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2" />
119+
<TextField fx:id="txtnoOfrounds" promptText="3" GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="3" />
120120
<Label alignment="TOP_LEFT" prefHeight="27.0" prefWidth="22.0" text="W" GridPane.columnIndex="1" GridPane.halignment="LEFT">
121121
<font>
122122
<Font name="System Bold" size="18.0" />

0 commit comments

Comments
 (0)