Fixed hide window

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-open-widget@84399 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-10-25 17:28:20 +00:00 committed by Giancarlo Panichi
parent 1e4a5a88c1
commit e028f24c5d
1 changed files with 13 additions and 26 deletions

View File

@ -38,6 +38,7 @@ public class WizardWindow extends Window {
protected final String WIZARDWIDTH="640px";
protected final String WIZARDHEIGHT="480px";
protected final boolean WIZARRESIZABLE=false;
protected final boolean WIZARDCOLLAPSIBLE = true;
protected ArrayList<WizardCard> cardStack = new ArrayList<WizardCard>();
@ -82,7 +83,7 @@ public class WizardWindow extends Window {
Log.info(title);
//setModal(true);
setResizable(WIZARRESIZABLE);
setCollapsible(false);
setCollapsible(WIZARDCOLLAPSIBLE);
setWidth(WIZARDWIDTH);
setHeight(WIZARDHEIGHT);
@ -144,19 +145,12 @@ public class WizardWindow extends Window {
backButton.addSelectHandler(selectionHandler);
nextButton.addSelectHandler(selectionHandler);
closeBtnHandle();
setWidget(container);
}
protected void closeBtnHandle() {
closeBtn.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
fireAborted();
}
});
}
/**
@ -166,22 +160,15 @@ public class WizardWindow extends Window {
protected void initTools() {
super.initTools();
//we can't distinguish between hide and hide with button
/*closeBtn.removeAllListeners();
closeBtn.addListener(Events.Select, new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent ce) {
MessageBox.confirm("Confirm", "Are you sure to cancel the operation?", new Listener<MessageBoxEvent>() {
@Override
public void handleEvent(MessageBoxEvent be) {
if (be.getButtonClicked().getItemId().equals(Dialog.YES)) {
hide();
fireAborted();
}
}
});
}
});*/
closeBtn.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
fireAborted();
hide();
}
});
}
public void addListener(WizardListener listener)