-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstraints.java
More file actions
39 lines (29 loc) · 1005 Bytes
/
Constraints.java
File metadata and controls
39 lines (29 loc) · 1005 Bytes
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
package sqlClientApp;
import java.awt.*;
public class Constraints {
private GridBagConstraints constraints;
public Constraints(){
this.constraints = new GridBagConstraints();
}
public void setConstraintsForDBPanel(){
this.constraints.gridx = 0;
this.constraints.gridy = 0;
this.constraints.weightx = 1.0;
this.constraints.weighty = 1.0;
this.constraints.fill = GridBagConstraints.BOTH;
}
public void setConstraintsForCommandPanel(){
this.constraints.fill = GridBagConstraints.BOTH;
this.constraints.gridx = 2;
}
public void setConstraintsForResultPanel(){
this.constraints.fill = GridBagConstraints.BOTH;
this.constraints.gridx = 0;
this.constraints.gridy = 2;
this.constraints.gridwidth = 3;
this.constraints.gridheight = 2;
}
public GridBagConstraints getConstraint(){
return this.constraints;
}
}