Skip to content

Commit a075e16

Browse files
CHINEDUCHINEDU
authored andcommitted
gui updates
1 parent e8137e6 commit a075e16

3 files changed

Lines changed: 47 additions & 18 deletions

File tree

‎ModualrProject/src/GUI/controller/TrackerController.java‎

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.sql.SQLException;
44
import java.util.Arrays;
55

6+
import database.bean.log.CertificateRegisterLog;
67
import database.bean.log.ModularClassLog;
78
import database.bean.log.StudentLog;
89
import database.bean.log.TransactionType;
@@ -17,6 +18,8 @@
1718
public class TrackerController {
1819
@FXML private TextArea txtAreaStudentLog;
1920
@FXML private TextArea txtAreaModuleLog;
21+
@FXML private TextArea txtAreaClassLog;
22+
@FXML private TextArea txtAreaRegistrationLog;
2023
@FXML private ComboBox<String> cmbFilter;
2124

2225
public void initialize() {
@@ -26,30 +29,44 @@ public void initialize() {
2629

2730
try
2831
{
29-
StudentLog[] studLog = LogManager.getLog(StudentLog.class,
30-
TransactionType.INSERT, 0);//TransactionType can take 3 different things
31-
ModularClassLog[] modularClassLog =
32+
CertificateRegisterLog[] certRegLog =
33+
LogManager.getLog(CertificateRegisterLog.class,
34+
TransactionType.NONE, 0);//TransactionType can take 3 different things
35+
36+
37+
txtAreaStudentLog.setWrapText(true);
38+
Arrays.stream(certRegLog).forEach( log ->{
39+
txtAreaStudentLog.setText(txtAreaStudentLog.getText() + "- " + log + "\n\n");
40+
});
41+
42+
43+
44+
/*ModularClassLog[] modularClassLog =
3245
LogManager.getLog(ModularClassLog.class,
3346
TransactionType.NONE, 0);
3447
txtAreaStudentLog.setWrapText(true);
35-
System.out.println( "\n<<<<<<<Modular ClassLog>>>>>" );
3648
Arrays.stream(modularClassLog).forEach( log ->{
37-
// System.out.println("-Description: " + log);
38-
3949
txtAreaStudentLog.setText(txtAreaStudentLog.getText() + " -Description: " + log);
40-
});
50+
});*/
4151

4252
}
43-
catch (SQLException e)
44-
{
45-
// FIXME Auto-generated catch block
53+
catch (SQLException e) {
4654
e.printStackTrace();
4755
}
4856
}
4957

5058

5159
@FXML
52-
public void itemsSelected(ActionEvent event) {
60+
public void itemsSelectedfrmStudent(ActionEvent event) {
61+
}
62+
@FXML
63+
public void itemsSelectedfrmmodule(ActionEvent event) {
64+
}
65+
@FXML
66+
public void itemsSelectedfrmClass(ActionEvent event) {
67+
}
68+
@FXML
69+
public void itemsSelectedfrmReg(ActionEvent event) {
5370
}
5471

5572
}

‎ModualrProject/src/GUI/views/Statistics.fxml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@
162162
<content>
163163
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
164164
<children>
165-
<TableView fx:id="certTable" layoutX="14.0" layoutY="14.0" prefHeight="200.0" prefWidth="200.0">
165+
<TableView fx:id="certTable" layoutX="14.0" layoutY="14.0" prefHeight="284.0" prefWidth="327.0">
166166
<columns>
167-
<TableColumn fx:id="certName" prefWidth="75.0" text="Name" />
168-
<TableColumn fx:id="noIssused" prefWidth="122.0" text="No of times Issused" />
167+
<TableColumn fx:id="certName" prefWidth="199.0" text="Name" />
168+
<TableColumn fx:id="noIssused" prefWidth="119.0" text="No of times Issused" />
169169
</columns>
170170
</TableView>
171171
</children>

‎ModualrProject/src/GUI/views/Tracker.fxml‎

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
1717
<children>
1818
<TextArea fx:id="txtAreaStudentLog" layoutX="14.0" layoutY="38.0" prefHeight="371.0" prefWidth="384.0" />
19-
<ComboBox layoutX="93.0" layoutY="4.0" onAction="#itemsSelected" prefWidth="150.0" promptText="cmbFilter" />
19+
<ComboBox layoutX="93.0" layoutY="4.0" onAction="#itemsSelectedfrmStudent" prefWidth="150.0" promptText="cmbFilter" />
2020
<Label layoutX="28.0" layoutY="8.0" text="Filter by" />
2121
</children></AnchorPane>
2222
</content>
@@ -25,18 +25,30 @@
2525
<content>
2626
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
2727
<children>
28-
<TextArea fx:id="txtAreaModuleLog" prefHeight="371.0" prefWidth="384.0" />
28+
<TextArea fx:id="txtAreaModuleLog" layoutX="19.0" layoutY="45.0" prefHeight="371.0" prefWidth="384.0" />
29+
<ComboBox layoutX="81.0" layoutY="10.0" onAction="#itemsSelectedfrmmodule" prefWidth="150.0" promptText="cmbFilter" />
30+
<Label layoutX="23.0" layoutY="13.0" text="Filter by" />
2931
</children></AnchorPane>
3032
</content>
3133
</Tab>
3234
<Tab text="REGISTRATION LOG">
3335
<content>
34-
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
36+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
37+
<children>
38+
<TextArea fx:id="txtAreaRegistrationLog" layoutX="34.0" layoutY="46.0" prefHeight="371.0" prefWidth="384.0" />
39+
<ComboBox layoutX="116.0" layoutY="8.0" onAction="#itemsSelectedfrmReg" prefWidth="150.0" promptText="cmbFilter" />
40+
<Label layoutX="42.0" layoutY="13.0" text="Filter by" />
41+
</children></AnchorPane>
3542
</content>
3643
</Tab>
3744
<Tab text="CLASS LOG">
3845
<content>
39-
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
46+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
47+
<children>
48+
<TextArea fx:id="txtAreaClassLog" layoutX="27.0" layoutY="51.0" prefHeight="371.0" prefWidth="384.0" />
49+
<ComboBox layoutX="93.0" layoutY="13.0" onAction="#itemsSelectedfrmClass" prefWidth="150.0" promptText="cmbFilter" />
50+
<Label layoutX="33.0" layoutY="17.0" text="Filter by" />
51+
</children></AnchorPane>
4052
</content>
4153
</Tab>
4254
</tabs>

0 commit comments

Comments
 (0)