コード例 #1
0
 public void fill(TeamStats teamStats, String teamName) {
   if (teamStats == null) {
     this.setText("");
     // this.headerLabel.update();
     matchPlayersTable.fill(null);
   } else {
     if (teamName == null) {
       this.setText(String.valueOf(teamStats.getTeamId()));
       // this.headerLabel.update();
     } else {
       this.setText(teamName);
       // this.headerLabel.update();
     }
     matchPlayersTable.fill(teamStats.getPlayersStats());
   }
 }
コード例 #2
0
  public MatchPlayersGroup(Composite parent, int style) {
    super(parent, style & ~SWT.BORDER);
    this.setLayout(new FormLayout());
    FormData formData;

    this.setText(Messages.getString("team"));
    this.setForeground(Colors.getBlueDescription());
    this.setFont(ConfigBean.getFontMain());

    matchPlayersTable = new MatchPlayersTable(this, SWT.FULL_SELECTION);

    ScrollBar bar = matchPlayersTable.getVerticalBar();

    formData = new FormData();
    formData.left = new FormAttachment(0, bar.getSize().x);
    formData.top = new FormAttachment(0, 5);
    formData.bottom = new FormAttachment(100, -5);
    formData.right = new FormAttachment(100, -5);
    matchPlayersTable.setLayoutData(formData);
  }