|
|
|
@ -2,6 +2,7 @@ package ru.egspt;
@@ -2,6 +2,7 @@ package ru.egspt;
|
|
|
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
|
|
import javax.swing.JButton; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
@ -21,17 +22,27 @@ public class ReportPane extends JPanel{
@@ -21,17 +22,27 @@ public class ReportPane extends JPanel{
|
|
|
|
|
public ReportPane(App app){ |
|
|
|
|
tableModel = new ReportTableModel(app.getData()); |
|
|
|
|
table = new JTable(tableModel); |
|
|
|
|
table.setPreferredScrollableViewportSize(new Dimension(500, 70)); |
|
|
|
|
table.setFillsViewportHeight(true); |
|
|
|
|
//table.setTableHeader(tableModel.getHeader());
|
|
|
|
|
//table.setPreferredScrollableViewportSize(new Dimension(500, 70));
|
|
|
|
|
//table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
|
|
|
|
|
//table.setAutoResizeMode(JTable.HEIGHT);
|
|
|
|
|
//table.setPreferredScrollableViewportSize(table.getPreferredSize());
|
|
|
|
|
//table.setFillsViewportHeight(true);
|
|
|
|
|
//table.getMaximumSize();
|
|
|
|
|
//table.setFillsViewportHeight(true);
|
|
|
|
|
JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); |
|
|
|
|
//scrollPane.getMaximumSize();
|
|
|
|
|
tabPane.add(scrollPane); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void init(){ |
|
|
|
|
controlPane.add(generateXLSXButton); |
|
|
|
|
controlPane.add(generateTXTButton); |
|
|
|
|
this.add(controlPane); |
|
|
|
|
this.add(tabPane); |
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
|
this.add(controlPane, BorderLayout.NORTH); |
|
|
|
|
this.add(tabPane, BorderLayout.CENTER); |
|
|
|
|
tabPane.getMaximumSize(); |
|
|
|
|
TitledBorder border = new TitledBorder(new LineBorder(Color.black), "report", TitledBorder.CENTER, TitledBorder.CENTER); |
|
|
|
|
this.setBorder(border); |
|
|
|
|
this.setVisible(true); |
|
|
|
|