View Javadoc

1   // %55184142:hoplugins.teamAnalyzer.ui%
2   package hoplugins.teamAnalyzer.ui;
3   
4   import hoplugins.Commons;
5   
6   import hoplugins.teamAnalyzer.vo.UserTeamSpotLineup;
7   
8   import java.awt.Color;
9   import java.awt.Dimension;
10  
11  import java.util.ArrayList;
12  
13  
14  /***
15   * TODO Missing Class Documentation
16   *
17   * @author TODO Author Name
18   */
19  public class UserTeamPlayerPanel extends PlayerPanel {
20      //~ Instance fields ----------------------------------------------------------------------------
21  
22      private UserTeamSpotLineup spotLineup;
23  
24      //~ Methods ------------------------------------------------------------------------------------
25  
26      /***
27       * TODO Missing Method Documentation
28       *
29       * @return TODO Missing Return Method Documentation
30       */
31      public Color getBackGround() {
32          return Color.LIGHT_GRAY;
33      }
34  
35      /***
36       * TODO Missing Method Documentation
37       *
38       * @return TODO Missing Return Method Documentation
39       */
40      public Dimension getDefaultSize() {
41          return new Dimension(180, 60);
42      }
43  
44      /***
45       * TODO Missing Method Documentation
46       *
47       * @param lineup TODO Missing Method Parameter Documentation
48       */
49      public void reload(UserTeamSpotLineup lineup) {
50          spotLineup = lineup;
51  
52          if (lineup != null) {
53              nameField.setText(lineup.getName());
54              positionImage.setIcon(Commons.getModel().getHelper().getImage4Position(lineup.getSpot(),
55                                                                                     (byte) lineup
56                                                                                     .getTacticCode()));
57              specialEventImage.setIcon(Commons.getModel().getHelper().getImageIcon4Spezialitaet(lineup
58                                                                                                 .getSpecialEvent()));
59              positionField.setText(Commons.getModel().getHelper().getNameForPosition((byte) lineup
60                                                                                      .getPosition()));
61              updateRatingPanel(lineup.getRating());
62              tacticPanel.reload(new ArrayList());
63          } else {
64              nameField.setText("");
65              positionField.setText("");
66              updateRatingPanel(0);
67              positionImage.setIcon(Commons.getModel().getHelper().getImage4Position(0, (byte) 0));
68              specialEventImage.setIcon(null);
69              tacticPanel.reload(new ArrayList());
70          }
71      }
72  
73      /***
74       * TODO Missing Method Documentation
75       */
76      protected void updateSpecialEvent() {
77          // DO NOTHING
78      }
79  }