Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-wizard-widget@115565 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-06-25 16:33:11 +00:00 committed by Giancarlo Panichi
parent 6bda77cd3e
commit eeaf919122
1 changed files with 22 additions and 28 deletions

View File

@ -75,8 +75,7 @@ public class WizardWindow extends Window {
protected ToolBar cardMoveToolBar;
protected FillToolItem fillSpacingCardMoveToolBar;
/**
* Create a new Wizard Window with the specified title.
*
@ -90,10 +89,10 @@ public class WizardWindow extends Window {
public WizardWindow(String title, EventBus eventBus) {
super();
this.title=title;
this.title = title;
this.eventBus = eventBus;
initWindow();
listeners = new ArrayList<WizardListener>();
VerticalLayoutContainer container = new VerticalLayoutContainer();
@ -186,12 +185,12 @@ public class WizardWindow extends Window {
protected void onKeyPress(Event we) {
int keyCode = we.getKeyCode();
//Use Element: import com.google.gwt.dom.client.Element;
// Use Element: import com.google.gwt.dom.client.Element;
boolean t = getElement().isOrHasChild(
we.getEventTarget().<Element> cast());
boolean key = true;
if (key && super.isClosable() && super.isOnEsc() && keyCode == KeyCodes.KEY_ESCAPE && t) {
if (key && super.isClosable() && super.isOnEsc()
&& keyCode == KeyCodes.KEY_ESCAPE && t) {
fireAborted();
hide();
}
@ -299,10 +298,6 @@ public class WizardWindow extends Window {
hide();
}
public EventBus getEventBus(){
return eventBus;
}
/**
* Sets the label of next button to "Finish" value and add a close command
* to it.
@ -476,23 +471,24 @@ public class WizardWindow extends Window {
public void showErrorAndHide(final String title, final String message,
final String details, final Throwable throwable) {
UtilsGXT3.alert(title, message+" "+details, new Callback<Component, Void>() {
UtilsGXT3.alert(title, message + " " + details,
new Callback<Component, Void>() {
@Override
public void onFailure(Void reason) {
hide();
fireFailed(title, message, details, throwable);
@Override
public void onFailure(Void reason) {
hide();
fireFailed(title, message, details, throwable);
}
}
@Override
public void onSuccess(Component result) {
hide();
fireAborted();
@Override
public void onSuccess(Component result) {
hide();
fireAborted();
}
}
});
});
}
@ -511,12 +507,10 @@ public class WizardWindow extends Window {
listener.aborted();
}
public void fireFailed(String title, String message, String details, Throwable throwable) {
public void fireFailed(String title, String message, String details,
Throwable throwable) {
for (WizardListener listener : listeners)
listener.failed(title, message, details, throwable);
}
}