Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 538:75df57220104
Adapted the MousePositionPanel to use the Transform2D object for computing the chart coordinates from image coordinates.
flys-client/trunk@2036 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 01 Jun 2011 09:03:18 +0000 |
parents | e08777967bad |
children | fea93eebd2fa |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java Wed Jun 01 08:50:40 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java Wed Jun 01 09:03:18 2011 +0000 @@ -2,7 +2,6 @@ import com.google.gwt.core.client.GWT; -import com.smartgwt.client.core.Rectangle; import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.layout.HLayout; @@ -43,10 +42,12 @@ public ChartToolbar(CollectionView view, ChartOutputTab chartTab) { super(); - this.view = view; - this.chartTab = chartTab; + this.view = view; + this.chartTab = chartTab; datacage = new Button(MSG.databasket()); + position = new MousePositionPanel(chartTab); + datacage.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { GWT.log("Clicked 'datacage' button."); @@ -54,13 +55,6 @@ } }); - // TODO determine the correct viewport of the chart! - position = new MousePositionPanel( - chartTab.getChartPanel(), - new Rectangle(65, 35, 50, 70)); - chartTab.getChartPanel().addMouseMoveHandler(position); - chartTab.getChartPanel().addResizedHandler(position); - initLayout(); } @@ -79,9 +73,10 @@ // TODO do this dynamic Label spacer = new Label(); - spacer.setWidth("450px"); + spacer.setWidth("100px"); datacage.setWidth("95px"); - position.setWidth("150px"); + position.setWidth("200px"); + position.setLayoutAlign(com.smartgwt.client.types.Alignment.RIGHT); addMember(datacage); addMember(spacer);