Show StoryCardParentListBox.java syntax highlighted
package ucalgary.ebe.webui.client.ui;
import java.util.Vector;
import ucalgary.ebe.webui.client.WebUI2ServiceConnection;
import ucalgary.ebe.webui.client.data.IterationWeb;
import ucalgary.ebe.webui.client.data.ProjectWeb;
import com.google.gwt.user.client.ui.ListBox;
public class StoryCardParentListBox extends ListBox {
private WebUI2ServiceConnection con;
public StoryCardParentListBox(WebUI2ServiceConnection con) {
super();
this.con = con;
ProjectWeb prj = con.getProject();
if(prj.getBacklog() != null) {
this.addItem(prj.getBacklog().getName(), String.valueOf(prj.getBacklog().getId()));
}
Vector iterations = prj.getIterationChildren();
for(int i = 0; i < prj.getIterationChildren().size(); i++) {
IterationWeb iter = (IterationWeb)iterations.get(i);
this.addItem(iter.getName(), String.valueOf(iter.getId()));
}
this.setVisibleItemCount(1);
this.setSelectedIndex(0);
this.addStyleName("webui-ListBox");
}
}
See more files for this project here