diff --git a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java index 22dfd3f..52ef501 100644 --- a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java +++ b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/WizardWindow.java @@ -6,18 +6,22 @@ package org.gcube.portlets.user.td.wizardwidget.client; import java.util.ArrayList; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; +import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle; import org.gcube.portlets.user.td.wizardwidget.client.util.ErrorMessageBox; import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.core.client.Callback; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.Widget; -import com.google.web.bindery.event.shared.SimpleEventBus; import com.google.web.bindery.event.shared.EventBus; +import com.google.web.bindery.event.shared.SimpleEventBus; +import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign; import com.sencha.gxt.core.client.resources.ThemeStyles; +import com.sencha.gxt.core.client.util.Margins; import com.sencha.gxt.widget.core.client.Dialog; import com.sencha.gxt.widget.core.client.Window; import com.sencha.gxt.widget.core.client.button.TextButton; +import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData; import com.sencha.gxt.widget.core.client.container.CardLayoutContainer; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData; @@ -100,14 +104,19 @@ public class WizardWindow extends Window { toolbar.addStyleName(ThemeStyles.getStyle().borderTop()); backButton = new TextButton(BUTTONBACKLABEL); + backButton.setIcon(ResourceBundle.INSTANCE.wizardPrevious()); + backButton.setIconAlign(IconAlign.LEFT); + backButton.setEnabled(false); backButton.setTabIndex(1001); - toolbar.add(backButton); + toolbar.add(backButton,new BoxLayoutData(new Margins(1))); toolbar.add(new FillToolItem()); nextButton = new TextButton(BUTTONNEXTLABEL); + nextButton.setIcon(ResourceBundle.INSTANCE.wizardNext()); + nextButton.setIconAlign(IconAlign.RIGHT); nextButton.setTabIndex(1000); - toolbar.add(nextButton); + toolbar.add(nextButton, new BoxLayoutData(new Margins(1))); toolbar.setLayoutData(new VerticalLayoutData(1, -1)); container.add(toolbar); @@ -268,6 +277,8 @@ public class WizardWindow extends Window { */ public void setNextButtonToFinish() { nextButton.setText(BUTTONFINISHLABEL); + nextButton.setIcon(ResourceBundle.INSTANCE.wizardGo()); + nextButton.setIconAlign(IconAlign.RIGHT); nextButtonAction = new Command() { public void execute() { diff --git a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/dataresource/ResourceBundle.java b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/dataresource/ResourceBundle.java index a2f15dc..5402318 100644 --- a/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/dataresource/ResourceBundle.java +++ b/src/main/java/org/gcube/portlets/user/td/wizardwidget/client/dataresource/ResourceBundle.java @@ -27,5 +27,25 @@ public interface ResourceBundle extends ClientBundle { @Source("resources/arrow-refresh_32.png") ImageResource refresh32(); + + @Source("resources/wizard-next.png") + ImageResource wizardNext(); + + @Source("resources/wizard-next_32.png") + ImageResource wizardNext32(); + + @Source("resources/wizard-previous.png") + ImageResource wizardPrevious(); + + @Source("resources/wizard-previous_32.png") + ImageResource wizardPrevious32(); + + @Source("resources/wizard-go.png") + ImageResource wizardGo(); + + @Source("resources/wizard-go_32.png") + ImageResource wizardGo32(); + + } \ No newline at end of file diff --git a/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-go.png b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-go.png new file mode 100644 index 0000000..36214b3 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-go.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-go_32.png b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-go_32.png new file mode 100644 index 0000000..312208f Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-go_32.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-next.png b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-next.png new file mode 100644 index 0000000..221b729 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-next.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-next_32.png b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-next_32.png new file mode 100644 index 0000000..8e2d562 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-next_32.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-previous.png b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-previous.png new file mode 100644 index 0000000..c066b65 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-previous.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-previous_32.png b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-previous_32.png new file mode 100644 index 0000000..d2d6db5 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/wizardwidget/client/dataresource/resources/wizard-previous_32.png differ