esoe 3 years ago
parent
commit
2b31a9fef7
  1. 9
      src/main/java/ru/egspt/App.java
  2. 1
      src/main/java/ru/egspt/BaseControls.java
  3. 32
      src/main/java/ru/egspt/Data.java
  4. 36
      src/main/java/ru/egspt/Quiz.java
  5. 5
      src/main/java/ru/egspt/QuizesListModel.java
  6. 2
      src/main/java/ru/egspt/ReportPane.java
  7. 70
      src/main/java/ru/egspt/Result.java
  8. 5
      src/main/java/ru/egspt/ResultsListModel.java
  9. BIN
      target/classes/ru/egspt/App.class
  10. BIN
      target/classes/ru/egspt/BaseControls.class
  11. BIN
      target/classes/ru/egspt/Data.class
  12. BIN
      target/classes/ru/egspt/Quiz.class
  13. BIN
      target/classes/ru/egspt/QuizesListModel.class
  14. BIN
      target/classes/ru/egspt/ReportPane.class
  15. BIN
      target/classes/ru/egspt/Result.class
  16. BIN
      target/classes/ru/egspt/ResultsListModel.class

9
src/main/java/ru/egspt/App.java

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
package ru.egspt;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
@ -16,9 +18,10 @@ public class App extends JPanel{ @@ -16,9 +18,10 @@ public class App extends JPanel{
private TagPane tagPane = new TagPane(this);
public void init(){
this.add(getAccessPane());
this.add(getTagPane());
this.add(getReportPane());
this.setLayout(new BorderLayout());
this.add(getAccessPane(), BorderLayout.NORTH);
this.add(getTagPane(), BorderLayout.SOUTH);
this.add(getReportPane(), BorderLayout.CENTER);
this.setVisible(true);
}
public void initFrame(){

1
src/main/java/ru/egspt/BaseControls.java

@ -16,6 +16,7 @@ public class BaseControls { @@ -16,6 +16,7 @@ public class BaseControls {
//данные в панель отчетов
app.getReportPane().init();
app.getReportPane().setData(app.getData());
//app.getReportPane().getPreferredSize();
app.getReportPane().setVisible(true);
}

32
src/main/java/ru/egspt/Data.java

@ -1,3 +1,33 @@ @@ -1,3 +1,33 @@
package ru.egspt;
public class Data extends UserListModel{
import java.util.ArrayList;
public class Data extends UserListModel {
ArrayList<Quiz> quizes = new ArrayList<>();
ArrayList<Result> results = new ArrayList<>();
/**
* @param quizes the quizes to set
*/
public void setQuizes(ArrayList<Quiz> quizes) {
this.quizes = quizes;
}
/**
* @return the quizes
*/
public ArrayList<Quiz> getQuizes() {
return quizes;
}
/**
* @param results the results to set
*/
public void setResults(ArrayList<Result> results) {
this.results = results;
}
/**
* @return the results
*/
public ArrayList<Result> getResults() {
return results;
}
}

36
src/main/java/ru/egspt/Quiz.java

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
package ru.egspt;
public class Quiz {
private int id;
private String name;
public Quiz(){}
public Quiz(int id, String name){
this.setId(id);
this.setName(name);
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
}

5
src/main/java/ru/egspt/QuizesListModel.java

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
package ru.egspt;
public class QuizesListModel {
}

2
src/main/java/ru/egspt/ReportPane.java

@ -23,7 +23,7 @@ public class ReportPane extends JPanel{ @@ -23,7 +23,7 @@ public class ReportPane extends JPanel{
table = new JTable(tableModel);
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
table.setFillsViewportHeight(true);
JScrollPane scrollPane = new JScrollPane(table);
JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
tabPane.add(scrollPane);
}

70
src/main/java/ru/egspt/Result.java

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
package ru.egspt;
public class Result {
int id;
int quizid;
int userid;
double grade;
Long time;
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param quizid the quizid to set
*/
public void setQuizid(int quizid) {
this.quizid = quizid;
}
/**
* @return the quizid
*/
public int getQuizid() {
return quizid;
}
/**
* @param userid the userid to set
*/
public void setUserid(int userid) {
this.userid = userid;
}
/**
* @return the userid
*/
public int getUserid() {
return userid;
}
/**
* @param grade the grade to set
*/
public void setGrade(double grade) {
this.grade = grade;
}
/**
* @return the grade
*/
public double getGrade() {
return grade;
}
/**
* @param time the time to set
*/
public void setTime(Long time) {
this.time = time;
}
/**
* @return the time
*/
public Long getTime() {
return time;
}
}

5
src/main/java/ru/egspt/ResultsListModel.java

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
package ru.egspt;
public class ResultsListModel {
}

BIN
target/classes/ru/egspt/App.class

Binary file not shown.

BIN
target/classes/ru/egspt/BaseControls.class

Binary file not shown.

BIN
target/classes/ru/egspt/Data.class

Binary file not shown.

BIN
target/classes/ru/egspt/Quiz.class

Binary file not shown.

BIN
target/classes/ru/egspt/QuizesListModel.class

Binary file not shown.

BIN
target/classes/ru/egspt/ReportPane.class

Binary file not shown.

BIN
target/classes/ru/egspt/Result.class

Binary file not shown.

BIN
target/classes/ru/egspt/ResultsListModel.class

Binary file not shown.
Loading…
Cancel
Save