1
2 package hoplugins.teamAnalyzer.ui.lineup;
3
4 import java.awt.BorderLayout;
5 import java.awt.GridBagConstraints;
6 import java.awt.Insets;
7
8
9 /***
10 * This is an empty panel to display a lineup with standard style
11 *
12 * @author <a href=mailto:draghetto@users.sourceforge.net>Massimiliano Amato</a>
13 */
14 public class StandardLineupPanel extends LineupStylePanel {
15
16
17 /***
18 * Constructor
19 *
20 * @param _mainPanel Sequence
21 */
22 public StandardLineupPanel(FormationPanel _mainPanel) {
23 super(_mainPanel);
24 }
25
26
27
28
29
30 /***
31 * Setup the layout, with 2 teams displayed
32 */
33 public void initCompare() {
34 centerPanel.removeAll();
35 setLayout(new BorderLayout());
36 setOpaque(false);
37 centerPanel.setOpaque(false);
38
39 constraints.anchor = GridBagConstraints.CENTER;
40 constraints.fill = GridBagConstraints.NONE;
41 constraints.weightx = 0.0;
42 constraints.weighty = 0.0;
43 constraints.insets = new Insets(0, 0, 0, 0);
44 centerPanel.setLayout(layout);
45
46 setOpponentPanel(0);
47 setOpponentKeeper(1);
48 setOpponentDefence(2);
49 setOpponentMidfield(3);
50 setOpponentAttack(4);
51 setMyAttack(5);
52 setMyMidfield(6);
53 setMyDefence(7);
54 setMyKeeper(8);
55 setMyPanel(9);
56
57 add(centerPanel, BorderLayout.CENTER);
58 }
59
60 /***
61 * Setup the layout, with only one team displayed
62 */
63 public void initSingle() {
64 centerPanel.removeAll();
65 setLayout(new BorderLayout());
66 setOpaque(false);
67 centerPanel.setOpaque(false);
68
69 constraints.anchor = GridBagConstraints.CENTER;
70 constraints.fill = GridBagConstraints.NONE;
71 constraints.weightx = 0.0;
72 constraints.weighty = 0.0;
73 constraints.insets = new Insets(2, 2, 2, 2);
74 centerPanel.setLayout(layout);
75
76 setOpponentPanel(0);
77 setOpponentKeeper(1);
78 setOpponentDefence(2);
79 setOpponentMidfield(3);
80 setOpponentAttack(4);
81
82 add(centerPanel, BorderLayout.CENTER);
83 }
84 }