-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScheduleView.java
More file actions
66 lines (38 loc) · 1.81 KB
/
Copy pathScheduleView.java
File metadata and controls
66 lines (38 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import javax.swing.*;
import java.awt.*;
public class ScheduleView extends JPanel implements SuperView {
private TaskModel taskModel;
private Controller myController;
JSplitPane splitPane;
public ScheduleView(TaskModel taskModel, Controller myController) {
this.taskModel = taskModel;
this.myController = myController;
//this.setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS));
//this.setLayout(new GridLayout(0,2));
this.setLayout(new FlowLayout());
ScheduleTableCreator stc = new ScheduleTableCreator(this.taskModel);
/*na sozval itt annyirol van szo, hogy a ket viewban levo ket scrollpanet kiszedtem, s ezeket rakom egy splitpane-be
s beallitom hogy az elvalasztas a screen felenel legyen. Kicsit meg lehetne szebben is irni, de most faradt vagyok
*/
ResumeTableView resumeTableView = new ResumeTableView(stc);
OrarGridView orarGridView = new OrarGridView(stc, myController);
splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
resumeTableView.getScrollPane(), orarGridView.getGridScrollPane());
splitPane.setOneTouchExpandable(true);
long id = Math.round(Toolkit.getDefaultToolkit().getScreenSize().getWidth()/2);
int idd = (int)id + 10;
splitPane.setDividerLocation(
idd
);
Dimension minimumSize = new Dimension(300, 50);
resumeTableView.getScrollPane().setMinimumSize(minimumSize);
orarGridView.getGridScrollPane().setMinimumSize(minimumSize);
splitPane.setPreferredSize(new Dimension(1500,400));
this.add(splitPane);
// this.add(resumeTableView.getScrollPane());
// this.add(orarGridView.getGridScrollPane());
}
@Override
public void buildFromModel() {
}
}