19 package org.turro.dossier.zul.relation;
21 import java.util.List;
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25 import org.turro.dossier.entity.Issue;
26 import org.turro.dossier.entity.IssuePredecessor;
27 import org.turro.elephant.context.ElephantContext;
28 import org.turro.i18n.I_;
29 import org.turro.registry.ChangeCategory;
30 import org.turro.registry.Changes;
31 import org.turro.registry.UniqueString;
32 import org.zkoss.zul.Tree;
33 import org.zkoss.zul.Treechildren;
34 import org.zkoss.zul.Treecol;
35 import org.zkoss.zul.Treecols;
43 private Treechildren children;
45 private Changes changes;
60 this.changes = changes;
70 removeChild(children);
72 addRoots(
new IssueRelation(
null, issue), mode == 0 ? 1 : 999);
73 openChildrenWithIssue(children.getChildren());
92 private void addColumns() {
93 Treecols cols =
new Treecols();
94 cols.setSizable(
true);
97 Treecol col =
new Treecol();
99 cols.appendChild(col);
102 col.setLabel(
I_.
get(
"Status"));
103 col.setWidth(
"120px");
104 cols.appendChild(col);
107 col.setLabel(
I_.
get(
"Responsible"));
108 col.setWidth(
"230px");
109 cols.appendChild(col);
112 private void addChildrenSpace() {
113 children =
new Treechildren();
114 appendChild(children);
117 private void addRoots(IssueRelation current,
int count) {
118 Set<IssuePredecessor> ips = current.getIssue().getSources();
120 children.appendChild(current);
121 current.setOpen(
true);
124 for(IssuePredecessor ip : ips) {
125 addRoots(
new IssueRelation(
null, ip.getSource()), count);
136 }
catch (InterruptedException ex) {
147 }
catch (InterruptedException ex) {
157 if(changes !=
null) {
158 ChangeCategory cc =
new ChangeCategory(3,
I_.
get(
"Relations"));
162 }
catch (InterruptedException ex) {
168 private void openChildrenWithIssue(List children) {
170 if(ir.getIssue() !=
null && ir.getIssue().getId() != issue.
getId()) {
172 openChildrenWithIssue(ir.getRelatedChildren());
String getFullDescription()
IssueRelation getSelectedRelation()
void setIssue(Issue issue)
void setChanges(Changes changes)
void doAddRelation(final Changes changes)
void doEditRelation(final Changes changes)
IssuePredecessor getPredecessor()
static String logMsg(String msg)
static String get(String msg)