Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java @ 58:d018995fbee7
The 'old' items in the parameter panel have a button to step back to a previous state (NOTE: just the UI stuff is implemented now).
flys-client/trunk@1517 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 18 Mar 2011 12:01:55 +0000 |
parents | 246af33f621c |
children | f793d35bfb08 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java Fri Mar 18 11:32:05 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java Fri Mar 18 12:01:55 2011 +0000 @@ -81,6 +81,11 @@ } + /** + * Creates the 'next' button to step forward to the next state. + * + * @return the 'next' button. + */ protected Canvas getNextButton() { Img go = new Img(MSG.imageNext(), 80, 25); go.addClickHandler(this); @@ -90,6 +95,27 @@ /** + * Creates the 'back' button to step back to a previous state. + * + * @param targetState The identifier of the target state. + * + * @return the 'back' button. + */ + protected Canvas getBackButton(final String targetState) { + Img back = new Img(MSG.imageBack(), 16, 16); + + back.addClickHandler(new ClickHandler() { + public void onClick(ClickEvent event) { + GWT.log("Step back to: " + targetState); + GWT.log("TODO: fire StepBack event!"); + } + }); + + return back; + } + + + /** * This method needs to be implemented by concrete subclasses. It should * create a new Canvas object with a representation of <i>data</i>. *