labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r795426 - /labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
Date Sat, 18 Jul 2009 20:28:53 GMT
Author: norman
Date: Sat Jul 18 20:28:53 2009
New Revision: 795426

URL: http://svn.apache.org/viewvc?rev=795426&view=rev
Log:
Allow setting rows per page

Modified:
    labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java

Modified: labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
URL: http://svn.apache.org/viewvc/labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java?rev=795426&r1=795425&r2=795426&view=diff
==============================================================================
--- labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java (original)
+++ labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java Sat Jul 18
20:28:53 2009
@@ -45,6 +45,8 @@
 import org.cobogw.gwt.user.client.ui.Rating;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ChangeEvent;
+import com.google.gwt.event.dom.client.ChangeHandler;
 import com.google.gwt.event.dom.client.HasClickHandlers;
 import com.google.gwt.event.logical.shared.ResizeEvent;
 import com.google.gwt.event.logical.shared.ResizeHandler;
@@ -79,6 +81,7 @@
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ListBox;
 import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
@@ -211,11 +214,25 @@
 			
 		});
 		
+		final ListBox pageBox = new ListBox();
+		pageBox.addItem("20");
+		pageBox.addItem("50");
+		pageBox.addItem("100");
+		pageBox.addChangeHandler(new ChangeHandler() {
+
+			public void onChange(ChangeEvent event) {
+				mailTable.setPageSize(Integer.parseInt(pageBox.getItemText(pageBox.getSelectedIndex())));
+			}
+			
+		});
 		HorizontalPanel hPanel = new HorizontalPanel();
 		hPanel.setStyleName("hupa-MailTableControl");
 		hPanel.setSpacing(10);
 		hPanel.add(navigatorBar);
 		hPanel.add(options);
+		hPanel.add(pageBox);
+		hPanel.setCellHorizontalAlignment(pageBox, HorizontalPanel.ALIGN_RIGHT);
+		
 	
 		
 		hPanel.setWidth("100%");



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message