2
* Copyright (C) 2008 Adam Cornett This program is free software; you can
3
* redistribute it and/or modify it under the terms of the GNU General Public
4
* License as published by the Free Software Foundation; either version 3 of the
5
* License, or (at your option) any later version. This program is distributed
6
* in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
7
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8
* See the GNU General Public License for more details. You should have received
9
* a copy of the GNU General Public License along with this program; if not, see
10
* <http://www.gnu.org/licenses>.
13
package net.launchpad.codescore.ui.admin.ppl;
15
import org.zkoss.zul.Treechildren;
16
import net.launchpad.codescore.dbo.Competition;
17
import net.launchpad.codescore.dbo.Team;
18
import net.launchpad.codescore.ui.Style;
20
public class TeamSItem extends Treeitem {
21
private static final long serialVersionUID = -4013359339515156028L;
23
private Treechildren childern;
25
private final Team team;
27
public TeamSItem(final Team t) {
29
setImage("/images/team.png");
31
setLabel(t.getName());
34
setStyle(Style.getString("style.bold"));
36
for (final Competition c : t.getCompetitions()) {
37
final CompTItem ci = new CompTItem(c, team);
38
ci.setParent(childern);
42
private void initChildern() {
43
childern = new Treechildren();
44
childern.setParent(this);