# HG changeset patch # User Ingo Weinzierl # Date 1304937114 0 # Node ID aea3ab5997b2376c4132492a7b237928ca1d00a0 # Parent 385e9368ffcdf06f616b5fa9f80e06ff96be6062 Added a doubleclick listener to the project list to open a project. flys-client/trunk@1863 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 385e9368ffcd -r aea3ab5997b2 flys-client/ChangeLog --- a/flys-client/ChangeLog Mon May 09 10:23:20 2011 +0000 +++ b/flys-client/ChangeLog Mon May 09 10:31:54 2011 +0000 @@ -1,3 +1,9 @@ +2011-05-09 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/client/ui/ProjectList.java: + Added a doubleclick listener to the rows of this list. A doubleclick + will now open the selected project. + 2011-05-09 Sascha L. Teichmann * src/main/java/de/intevation/flys/client/shared/model/DistanceInfoRecord.java, diff -r 385e9368ffcd -r aea3ab5997b2 flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java Mon May 09 10:23:20 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java Mon May 09 10:31:54 2011 +0000 @@ -16,6 +16,8 @@ import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.grid.ListGridRecord; +import com.smartgwt.client.widgets.grid.events.CellDoubleClickEvent; +import com.smartgwt.client.widgets.grid.events.CellDoubleClickHandler; import com.smartgwt.client.widgets.grid.events.RowContextClickEvent; import com.smartgwt.client.widgets.grid.events.RowContextClickHandler; import com.smartgwt.client.widgets.layout.VLayout; @@ -98,6 +100,16 @@ grid.setFields(date, name); + grid.addCellDoubleClickHandler(new CellDoubleClickHandler() { + public void onCellDoubleClick(CellDoubleClickEvent e) { + CollectionRecord record = (CollectionRecord) e.getRecord(); + String uuid = record != null + ? record.getCollection().identifier() + : ""; + getFlys().openProject(uuid); + } + }); + grid.addRowContextClickHandler(new RowContextClickHandler() { public void onRowContextClick(RowContextClickEvent event) { CollectionRecord record = (CollectionRecord) event.getRecord();