List of usage examples for com.google.gwt.user.client Window alert
public static void alert(String msg)
From source file:ch.unifr.pai.ice.client.dragNdrop.DnD2users.java
License:Apache License
/** * log the data and indicate if logged is OK or not *//*w w w . j a v a2 s . co m*/ private void log() { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, getLoggedResult(loggedData), ExperimentIdentifier.DRAGNDROP, 2, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { DnD2users.this.clear(); Window.alert("Successfully logged! Experiment finished"); } @Override public void onFailure(Throwable caught) { GWT.log("Error:", caught); DnD2users.this.clear(); Window.alert("Not logged"); } }); }
From source file:ch.unifr.pai.ice.client.dragNdrop.DnD4users.java
License:Apache License
/** * log the data and indicate if logged is OK or not */// w ww . j a v a2s . c om private void log() { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, getLoggedResult(loggedData), ExperimentIdentifier.DRAGNDROP, 4, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { DnD4users.this.clear(); Window.alert("Successfully logged! Experiment finished"); } @Override public void onFailure(Throwable caught) { GWT.log("Error:", caught); DnD4users.this.clear(); Window.alert("Not logged"); } }); }
From source file:ch.unifr.pai.ice.client.dragNdrop.DND4users4spaces.java
License:Apache License
private void log() { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, getLoggedResult(resultVector), ExperimentIdentifier.DRAGNDROPSPACES, 4, new AsyncCallback<Void>() { @Override// ww w . j ava2 s. c o m public void onSuccess(Void result) { Window.alert("Successfully logged"); } @Override public void onFailure(Throwable caught) { GWT.log("Error:", caught); Window.alert("Not logged"); } }); }
From source file:ch.unifr.pai.ice.client.ICEMain.java
License:Apache License
@Override public void onModuleLoad() { if (DeviceType.getDeviceType() == DeviceType.MULTICURSOR) { /*************************************** * Get the size of the browser window. ***************************************/ MultiCursorController multiCursor = GWT.create(NoMultiCursorController.class); multiCursor.start();//from ww w .j ava 2s . c o m identifier = String.valueOf(new Date().getTime() / 1000); Window.alert("Start experiment: " + identifier); RootLayoutPanel.get().add(tabPanel); /* * tabPanel setup */ //*****************Trainings***************************// //tabPanel.add(trainingCheckBoxes, "TA"); //tabPanel.add(trainingtextEntrySepSpace1Users, "TB"); //tabPanel.add(trainingTextEntry1Space1User, "TB"); //tabPanel.add(trainingDNdBoxes, "TC"); //tabPanel.add(trainingLineTracking, "TD"); //*****************Click Blobs***************************// //tabPanel.add(checkBoxes, "A"); //tabPanel.add(checkB2u, "Click blobs 2 users"); tabPanel.add(checkB4u, "Click blobs 4 users"); //*****************Text Edit****************************// //tabPanel.add(textEntrySepSpace1Users, "B"); //tabPanel.add(textEntrySepSpace2Users, "TE multi Space - 2 users"); tabPanel.add(textEntrySepSpace4Users, "TE multi Space - 4 users"); ////******************D&D*********************************// //tabPanel.add(dNdBoxes, "C"); //tabPanel.add(dNdBoxes2S, "D & D 2 spaces"); tabPanel.add(dNdBoxes4S, "D & D 4 spaces"); //tabPanel.add(dN4dropBoxes, "D & 4 D boxes"); //tabPanel.add(textEntry1Space1User, "B"); //tabPanel.add(textEntry1Space2Users, "TE 1 Space - 2 users"); //tabPanel.add(textEntry1Space4Users, "TE 1 Space - 4 users"); //tabPanel.add(lineTracking, "D"); // tabPanel.add(lineTracking2users, "L tracking 2"); // tabPanel.add(lineTracking4users, "L tracking 4"); tabPanel.selectTab(0); if (tabPanel.getWidget(0) instanceof RequireInitialisation) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { ((RequireInitialisation) tabPanel.getWidget(0)).initialise(); } }); } tabPanel.addSelectionHandler(new SelectionHandler<Integer>() { @Override public void onSelection(SelectionEvent event) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { ((RequireInitialisation) tabPanel.getWidget(tabPanel.getSelectedIndex())).initialise(); } }); } }); /* * re-position of the widgets on the resized window */ Window.addResizeHandler(new ResizeHandler() { @Override public void onResize(ResizeEvent event) { } }); } else { TouchPadWidget widget = GWT.create(TouchPadWidget.class); RootLayoutPanel.get().add(widget); //widget.initialize(UUID.get(), null, null); widget.start(); } }
From source file:ch.unifr.pai.ice.client.textedit.TextEntry1Space.java
License:Apache License
private void log() { // if (experimentNo != -1) { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, loggedData, ExperimentIdentifier.TEXTEDIT, 1, new AsyncCallback<Void>() { @Override//from w ww . j a v a 2s. co m public void onSuccess(Void result) { TextEntry1Space.this.clear(); Window.alert("Successfully logged! Experiment finished"); } @Override public void onFailure(Throwable caught) { GWT.log("Error:", caught); Window.alert("Task finished but was not able to log!"); } }); }
From source file:ch.unifr.pai.ice.client.textedit.TextEntrySepSpace.java
License:Apache License
private void log() { // if (experimentNo != -1) { //COMMENTED FOR NOW EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, loggedData, ExperimentIdentifier.TEXTEDITSPACES, nbUser, new AsyncCallback<Void>() { @Override//from w ww . j a va2s . co m public void onSuccess(Void result) { TextEntrySepSpace.this.clear(); Window.alert("Successfully logged! Experiment finished"); } @Override public void onFailure(Throwable caught) { TextEntrySepSpace.this.clear(); GWT.log("Error:", caught); Window.alert("Not logged"); } }); }
From source file:ch.unifr.pai.ice.client.tracking.LineTracking1user.java
License:Apache License
/** * log the data and indicate if logged is OK or not */// ww w . ja v a2 s . c om private void log() { if (doLog) { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, getLoggedResult(cursorPosVector), ExperimentIdentifier.TRACKING, 1, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { LineTracking1user.this.clear(); Window.alert("Task finished!"); } @Override public void onFailure(Throwable caught) { LineTracking1user.this.clear(); GWT.log("Error:", caught); Window.alert("Task finished but was not able to log!"); } }); } else { clear(); Window.alert("Task finished"); } }
From source file:ch.unifr.pai.ice.client.tracking.LineTracking2users.java
License:Apache License
/** * log the data and indicate if logged is OK or not */// w w w. ja v a 2 s .c o m private void log(Vector<CursorXY> cursorPosVector) { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, getLoggedResult(cursorPosVector), ExperimentIdentifier.TRACKING, 2, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { if (expFinished == nbUser) { Window.alert("Successfully logged! Experiment finished"); } } @Override public void onFailure(Throwable caught) { GWT.log("Error:", caught); Window.alert("Not logged - Error: " + caught); } }); }
From source file:ch.unifr.pai.ice.client.tracking.LineTracking4users.java
License:Apache License
/** * log the data and indicate if logged is OK or not *//* w ww . j ava 2 s. c om*/ private void log(Vector<CursorXY> cursorPosVector) { EventingServiceAsync svc = GWT.create(EventingService.class); svc.log(ICEMain.identifier, getLoggedResult(cursorPosVector), ExperimentIdentifier.TRACKING, 4, new AsyncCallback<Void>() { @Override public void onSuccess(Void result) { if (expFinished == nbUser) { Window.alert("Successfully logged! Experiment finished"); } } @Override public void onFailure(Throwable caught) { GWT.log("Error:", caught); Window.alert("Not logged - Error: " + caught); } }); }
From source file:ch.unifr.pai.mindmap.client.DummyAsyncCallback.java
License:Apache License
@Override public void onFailure(Throwable caught) { Window.alert("Failure: " + caught.getMessage()); }