Code Search for Developers
 
 
  

ProjectListBox.java from MASE: Agile Software Engineering at Krugle


Show ProjectListBox.java syntax highlighted

package ucalgary.ebe.webui.client.ui;

import java.util.Vector;

import ucalgary.ebe.webui.client.WebUI2ServiceConnection;

import com.google.gwt.user.client.ui.ChangeListener;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.Widget;

public class ProjectListBox extends Grid implements ChangeListener {
	
	WebUI2ServiceConnection con;
	ListBox lb;
	
	
	//TODO can fetch project names all by itself via con
	//changelistener loads project via con.loadProject(getItemText(getSelectedIndex())
	public ProjectListBox(WebUI2ServiceConnection con, Vector names) {
		super(2, 1);
		this.con = con;
		
		this.setWidget(0, 0, new Label("Projects"));
		
		this.lb = new ListBox();
		
		for(int i = 0; i < names.size(); i++) {
			lb.addItem((String)names.get(i));
		}
		
		lb.setVisibleItemCount(1);
		
		lb.addChangeListener(this);
		
		this.setWidget(1, 0, lb);
		
		this.setWidth("100%");
		
		this.con.loadProject(this.lb.getItemText(0));
	}
	
	public WebUI2ServiceConnection getConnection() {
		return this.con;
	}
	
	private ListBox getListBox() {
		return this.lb;
	}

	public void onChange(Widget sender) {
		this.con.loadProject(this.lb.getItemText(this.lb.getSelectedIndex()));
	}

}




See more files for this project here

MASE: Agile Software Engineering

The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.

Project homepage: http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other

  CreateIterationDialogBox.java
  CreateProjectDialogBox.java
  CreateStoryCardDialogBox.java
  FloatTextBoxWithID.java
  ImageWithID.java
  ProjectListBox.java
  ProjectWhiteBoard.java
  StoryCardGrid.java
  StoryCardParentListBox.java
  TextBoxWithID.java
  TimestampTextBoxWithID.java
  WebUIMenu.java