List of usage examples for com.google.gwt.user.client Timer schedule
public synchronized void schedule(int delayMs)
From source file:nl.mpi.tg.eg.experiment.client.presenter.AbstractStimulusPresenter.java
License:Open Source License
protected void countdownLabel(final String timesUpLabel, final String styleName, final int postLoadMs, final String msLabelFormat, final TimedStimulusListener timedStimulusListener) { final Duration labelDuration = new Duration(); final DateTimeFormat formatter = DateTimeFormat.getFormat(msLabelFormat); final HTML html = timedStimulusView.addHtmlText(formatter.format(new Date((long) postLoadMs)), styleName); Timer labelTimer = new Timer() { @Override//from ww w. j a v a2s .co m public void run() { final long remainingMs = (long) postLoadMs - labelDuration.elapsedMillis(); if (remainingMs > 0) { Date msBasedDate = new Date(remainingMs); String labelText = formatter.format(msBasedDate); html.setHTML(labelText); schedule(500); } else { html.setHTML(timesUpLabel); timedStimulusListener.postLoadTimerFired(); } } }; labelTimer.schedule(500); }
From source file:nl.mpi.tg.eg.experiment.client.presenter.AbstractStimulusPresenter.java
License:Open Source License
protected void pause(int postLoadMs, final TimedStimulusListener timedStimulusListener) { final Timer timer = new Timer() { @Override/*from w ww .j ava 2 s . c o m*/ public void run() { timedStimulusListener.postLoadTimerFired(); pauseTimers.remove(this); } }; pauseTimers.add(timer); timer.schedule(postLoadMs); }
From source file:nl.mpi.tg.eg.experiment.client.presenter.AbstractStimulusPresenter.java
License:Open Source License
protected void randomMsPause(int minimumMs, int maximumMs, final String ranges, final TimedStimulusListener timedStimulusListener) { // todo: handle ranges final Timer timer = new Timer() { @Override//from w ww. j a v a 2 s . co m public void run() { timedStimulusListener.postLoadTimerFired(); pauseTimers.remove(this); } }; pauseTimers.add(timer); timer.schedule((int) (Math.random() * (maximumMs - minimumMs) + minimumMs)); }
From source file:nl.mpi.tg.eg.experiment.client.presenter.AbstractStimulusPresenter.java
License:Open Source License
protected void groupNetwork(final AppEventListner appEventListner, final ApplicationState selfApplicationState, final StimuliProvider stimulusProvider, final Stimulus currentStimulus, final String groupMembers, final String groupCommunicationChannels, final int phasesPerStimulus, final TimedStimulusListener timedStimulusListener) { if (groupParticipantService == null) { final Timer groupKickTimer = new Timer() { @Override//from www . jav a 2 s . co m public void run() { groupParticipantService.messageGroup(0, 0, stimulusProvider.getCurrentStimulusUniqueId(), Integer.toString(stimulusProvider.getCurrentStimulusIndex()), null, null, null, (int) userResults.getUserData().getCurrentScore(), groupMembers); } }; groupParticipantService = new GroupParticipantService(userResults.getUserData().getUserId().toString(), getSelfTag(), groupMembers, groupCommunicationChannels, phasesPerStimulus, stimulusProvider.generateStimuliStateSnapshot(), new TimedStimulusListener() { @Override public void postLoadTimerFired() { // do not clear the screen at this point because reconnects when the stimuli list is at the end will need to keep its UI items clearPage(); ((ComplexView) simpleView).addPadding(); if (groupParticipantService.isConnected()) { ((ComplexView) simpleView).addText("connected, waiting for other members"); } else { ((ComplexView) simpleView).addText("not connected"); } timedStimulusListener.postLoadTimerFired(); groupKickTimer.schedule(1000); } }, new TimedStimulusListener() { @Override public void postLoadTimerFired() { clearPage(); ((ComplexView) simpleView).addPadding(); // ((ComplexView) simpleView).addText("connected: " + groupParticipantService.isConnected()); ((ComplexView) simpleView).addHtmlText("Group not ready", "highlightedText"); ((ComplexView) simpleView).addPadding(); groupKickTimer.schedule(1000); } }, new TimedStimulusListener() { @Override public void postLoadTimerFired() { ((ComplexView) simpleView).addPadding(); ((ComplexView) simpleView).addText("synchronising the stimuli"); final String stimuliListGroup = groupParticipantService.getStimuliListGroup(); // when the stimuli list for this screen does not match that of the group, this listener is fired to: save the group stimuli list and then load the group stimuli list stimulusProvider.initialiseStimuliState(stimuliListGroup); final String loadedStimulusString = stimulusProvider.generateStimuliStateSnapshot(); localStorage.setStoredDataValue(userResults.getUserData().getUserId(), LOADED_STIMULUS_LIST + getSelfTag(), loadedStimulusString); groupParticipantService.setStimuliListLoaded(loadedStimulusString); groupKickTimer.schedule(1000); } }, new TimedStimulusListener() { @Override public void postLoadTimerFired() { if (groupParticipantService.getStimulusIndex() < stimulusProvider.getTotalStimuli()) { if (groupParticipantService.getStimulusIndex() != stimulusProvider .getCurrentStimulusIndex()) { groupParticipantService.setResponseStimulusId(null); groupParticipantService.setResponseStimulusOptions(null); } else if (groupParticipantService.getMessageString() != null && !groupParticipantService.getMessageString().isEmpty()) { JSONObject storedStimulusJSONObject = localStorage.getStoredJSONObject( userResults.getUserData().getUserId(), currentStimulus); storedStimulusJSONObject = (storedStimulusJSONObject == null) ? new JSONObject() : storedStimulusJSONObject; storedStimulusJSONObject.put("groupMessage", new JSONString(groupParticipantService.getMessageString())); localStorage.setStoredJSONObject(userResults.getUserData().getUserId(), currentStimulus, storedStimulusJSONObject); // submissionService.writeJsonData would be called on next stimulus anyway: submissionService.writeJsonData(userResults.getUserData().getUserId().toString(), currentStimulus.getUniqueId(), storedStimulusJSONObject.toString()); } // when a valid message has been received the current stimuli needs to be synchronised with the group stimulusProvider.setCurrentStimuliIndex(groupParticipantService.getStimulusIndex()); } else { // if the group message puts the stimuli list at the end then fire the end of stimulus listner submissionService.submitTagValue(userResults.getUserData().getUserId(), getSelfTag(), "group message puts the stimuli list at the end", stimulusProvider.getCurrentStimulusUniqueId() + ":" + stimulusProvider.getCurrentStimulusIndex() + "/" + stimulusProvider.getTotalStimuli(), duration.elapsedMillis()); groupParticipantService.setEndOfStimuli(true); // block further messages if (endOfStimulusListener != null) { endOfStimulusListener.postLoadTimerFired(); } } } }, new TimedStimulusListener() { @Override public void postLoadTimerFired() { ((ComplexView) simpleView).addInfoButton(new PresenterEventListner() { @Override public String getLabel() { final Integer stimulusIndex = groupParticipantService.getStimulusIndex(); // final String activeChannel = groupParticipantService.getActiveChannel(); return groupParticipantService.getMemberCode() // + ((stimulusIndex != null) ? "(" // + activeChannel // + ")" : "") + ((stimulusIndex != null) ? "-T" + (stimulusIndex + 1) : ""); } @Override public void eventFired(ButtonBase button, final SingleShotEventListner shotEventListner) { groupParticipantService.messageGroup(0, 0, stimulusProvider.getCurrentStimulusUniqueId(), Integer.toString(stimulusProvider.getCurrentStimulusIndex()), null, null, null, (int) userResults.getUserData().getCurrentScore(), groupMembers); // ((ComplexView) simpleView).showHtmlPopup(null, // "Group Members\n" + groupParticipantService.getAllMemberCodes() // + "\n\nGroup Communication Channels\n" + groupParticipantService.getGroupCommunicationChannels() // + "\n\nGroupId\n" + groupParticipantService.getGroupId() // + "\n\nGroupUUID\n" + groupParticipantService.getGroupUUID() // + "\n\nMemberCode\n" + groupParticipantService.getMemberCode() // + "\n\nMessageSender\n" + groupParticipantService.getMessageSenderId() // + "\n\nMessageString\n" + groupParticipantService.getMessageString() // + "\n\nStimulusId\n" + groupParticipantService.getStimulusId() // + "\n\nStimuliListLoaded\n" + groupParticipantService.getStimuliListLoaded() // + "\n\nStimuliListGroup\n" + groupParticipantService.getStimuliListGroup() // + "\n\nResponseStimulusOptions\n" + groupParticipantService.getResponseStimulusOptions() // + "\n\nResponseStimulusId\n" + groupParticipantService.getResponseStimulusId() // + "\n\nStimulusIndex\n" + groupParticipantService.getStimulusIndex() // + "\n\nRequestedPhase\n" + groupParticipantService.getRequestedPhase() // + "\n\nUserLabel\n" + groupParticipantService.getUserLabel() // + "\n\nGroupReady\n" + groupParticipantService.isGroupReady() // ); shotEventListner.resetSingleShot(); } @Override public String getStyleName() { return null; } @Override public int getHotKey() { return -1; } }); } } // , endOfStimulusListener ); groupParticipantService.joinGroupNetwork(serviceLocations.groupServerUrl()); } else { timedStimulusListener.postLoadTimerFired(); // groupParticipantService.messageGroup(0, currentStimulus.getUniqueId(), Integer.toString(stimulusProvider.getCurrentStimulusIndex()), null, null, null); // groupParticipantService.messageGroup(0, currentStimulus.getUniqueId(), Integer.toString(stimulusProvider.getCurrentStimulusIndex()), messageString, groupParticipantService.getResponseStimulusOptions(), groupParticipantService.getResponseStimulusId()); } }
From source file:nl.mpi.tg.eg.experiment.client.service.DataSubmissionService.java
License:Open Source License
private void submitData(final ServiceEndpoint endpoint, final UserId userId, final String jsonData) { localStorage.addStoredScreenData(userId, endpoint.name(), jsonData); final Timer timer = new Timer() { @Override/*from ww w. j a va 2s .co m*/ public void run() { final Timer selfTimer = this; final String storedScreenData = localStorage.getStoredScreenData(userId, endpoint.name()); if (!storedScreenData.isEmpty()) { submitData(endpoint, userId, "[" + storedScreenData + "]", new DataSubmissionListener() { @Override public void scoreSubmissionFailed(DataSubmissionException exception) { dataSubmitTimerList.remove(selfTimer); if (!dataSubmitTimerList.isEmpty()) { dataSubmitTimerList.get(0).schedule(1000); } } @Override public void scoreSubmissionComplete(JsArray<DataSubmissionResult> highScoreData) { localStorage.deleteStoredScreenData(userId, endpoint.name(), storedScreenData); dataSubmitTimerList.remove(selfTimer); if (!dataSubmitTimerList.isEmpty()) { dataSubmitTimerList.get(0).schedule(1000); } } }); } else { dataSubmitTimerList.remove(selfTimer); } if (!dataSubmitTimerList.isEmpty()) { dataSubmitTimerList.get(0).schedule(1000); } } }; dataSubmitTimerList.add(timer); if (dataSubmitTimerList.size() == 1) { timer.schedule(1000); } }
From source file:nl.mpi.tg.eg.experiment.client.service.SdCardImageCapture.java
License:Open Source License
protected void imageCaptured(final String stimulusIdString, final String fullPath) { Timer timer = new Timer() { @Override/*from w w w . j a v a 2 s. c o m*/ public void run() { localStorage.setStoredDataValue(userId, CAPTURED_IMAGES + sdCardStimulus.getUniqueId(), fullPath); timedStimulusListener.postLoadTimerFired(); } }; timer.schedule(1000); }
From source file:nl.mpi.tg.eg.experiment.client.service.SdCardStimuli.java
License:Open Source License
private void nonScan(final String directoryTag) { if (directoryTag == null || !directoryTag.equals("/storage/emulated/")) { insertDirectory("/storage/emulated/", "/storage/emulated/"); insertDirectory("/storage/emulated/jena/", "/static/jena/"); } else {// w w w . j ava 2s . co m // String[] testFiles = new String[]{ // "Canoe.jpg", // "Cocoa.jpg", // "Flying%20fox.jpg" // }; // for (String item : testFiles) { // insertStimulus("file:///Users/petwit/Documents/ExperimentTemplate/gwt-cordova/src/main/static/jena/Pictures/", item); // } // insertDirectory("./path/path", "a directory name"); // insertDirectory("./path2/path2", "a directory 2 name"); String[][] testStiuli = new String[][] { new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/1_pig_question.mp3", "1_pig_question.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/1_pig.mp3", "1_pig.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/1_pig.png", "1_pig.png" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/1_rat_question.mp3", "1_rat_question.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/1_rat.mp3", "1_rat.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/1_rat.png", "1_rat.png" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/2_bat_question.mp3", "2_bat_question.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/2_bat.mp3", "2_bat.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/2_bat.png", "2_bat.png" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/2_fish_question.mp3", "2_fish_question.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/2_fish.mp3", "2_fish.mp3" }, new String[] { "file:///storage/emulated/0/MPI_STIMULI/Task_2/2_fish.png", "2_fish.png" } // "d1e263.aiff", "d1e378.mp3", "d1e521.jpg", "d1e674.ogg", "d1e831.aiff", "inge_grijp2.ogg", "sharon_flees3.ogg", // "d1e263.jpg", "d1e378.mp4", "d1e521.mp3", "d1e679.aiff", "d1e831.jpg", "inge_grijp3.mp3", "sharon_flees4.mp3", // "d1e263.mp3", "d1e378.ogg", "d1e521.mp4", "d1e679.jpg", "d1e831.mp3", "inge_grijp3.ogg", "sharon_flees4.ogg", // "d1e263.mp4", "d1e383.aiff", "d1e521.ogg", "d1e679.mp3", "d1e831.mp4", "inge_grijp4.mp3", "sharon_flees5.mp3", // "d1e263.ogg", "d1e383.jpg", "d1e526.aiff", "d1e679.mp4", "d1e831.ogg", "inge_grijp4.ogg" }; for (String[] item : testStiuli) { insertStimulus(item[0].replace("file:///storage/emulated/0/", "/static/"), item[1]); } } // insertStimulus("file:///storage/emulated/0/MPI_STIMULI/bowped/10.jpg", "10.jpg"); Timer timer = new Timer() { public void run() { loadingCompleteAction(); } }; timer.schedule(100); }
From source file:nl.mpi.tg.eg.experiment.client.service.SimuliValidationRunner.java
License:Open Source License
public void calculate(GeneratedStimulus.Tag tag) { final Set<String> calculatedStimuliSet = new HashSet<>(); final Set<String> stimuliSet = new HashSet<>(); final HashMap<String, Integer> transionTable = new HashMap<>(); final String eventTag = "R0-4"; final StimulusSelector[] selectionTags = new StimulusSelector[] { new StimulusSelector("v1", tag) }; final StimulusSelector[] randomTags = new StimulusSelector[] {}; //final MetadataField stimulusAllocationField= metadataFieldProvider.stimuliMetadataField; final int maxStimulusCount = 23; final Integer minStimuliPerTag = 1; final Integer maxStimuliPerTag = 100; final boolean randomise = true; final int repeatCount = 1; final int repeatRandomWindow = 6; final int adjacencyThreshold = 3; final String storedStimulusList = ""; final List<Stimulus.Tag> allocatedTags = new ArrayList<>(); // final List<StimulusSelector> allocatedTags = new ArrayList<>(Arrays.asList(selectionTags)); for (StimulusSelector selector : selectionTags) { allocatedTags.add(selector.getTag()); }//from w w w .java 2 s .c o m final int cyclesToRun = 1000000; appendOutput("cyclesToRun: " + cyclesToRun); final Timer timer = new Timer() { int sampleCount = 0; @Override public void run() { // for (int sampleCount = 0; sampleCount < cyclesToRun; sampleCount++) { final StimulusProvider stimulusProvider = new StimulusProvider(); stimulusProvider.getSubset(allocatedTags, maxStimulusCount, randomise, repeatCount, repeatRandomWindow, adjacencyThreshold, storedStimulusList, 0); final String loadedStimulusString = stimulusProvider.generateStimuliStateSnapshot(); // appendOutput(loadedStimulusString); if (calculatedStimuliSet.add(loadedStimulusString)) { appendUniqueStimuliList(loadedStimulusString); } sampleCount(sampleCount + 1); uniqueCount(calculatedStimuliSet.size()); String currentStimulus = null; // String nextStimulus = stimulusProvider.getCurrentStimulus().getImage() + "_" + stimulusProvider.getCurrentStimulus().getCode(); String nextStimulus = stimulusProvider.getCurrentStimulus().getUniqueId(); stimuliSet.add(nextStimulus); String currentPair = currentStimulus + ":" + nextStimulus; transionTable.put(currentPair, (transionTable.containsKey(currentPair)) ? transionTable.get(currentPair) + 1 : 1); // appendOutput(currentPair); while (stimulusProvider.hasNextStimulus(1)) { currentStimulus = nextStimulus; stimulusProvider.nextStimulus(1); // nextStimulus = stimulusProvider.getCurrentStimulus().getImage() + "_" + stimulusProvider.getCurrentStimulus().getCode(); nextStimulus = stimulusProvider.getCurrentStimulus().getUniqueId(); stimuliSet.add(nextStimulus); currentPair = currentStimulus + ":" + nextStimulus; transionTable.put(currentPair, (transionTable.containsKey(currentPair)) ? transionTable.get(currentPair) + 1 : 1); // appendOutput(currentPair); } currentPair = nextStimulus + ":" + null; transionTable.put(currentPair, (transionTable.containsKey(currentPair)) ? transionTable.get(currentPair) + 1 : 1); // appendOutput(currentPair); sampleCount++; int minTransition = cyclesToRun; int maxTransition = 0; int totalTransition = 0; int entryIndex = 0; for (String transionTablePair : transionTable.keySet()) { final Integer transionCount = transionTable.get(transionTablePair); totalTransition += transionCount; minTransition = (minTransition > transionCount) ? transionCount : minTransition; maxTransition = (maxTransition < transionCount) ? transionCount : maxTransition; // appendOutput(transionTablePair + " : " + transionCount); transitionTableValue(0, entryIndex, transionTablePair); transitionTableValue(1, entryIndex, transionCount.toString()); entryIndex++; } outputTableValue(0, 0, "transionTableSize: " + transionTable.size()); outputTableValue(0, 1, "minTransition: " + minTransition); outputTableValue(0, 2, "maxTransition: " + maxTransition); outputTableValue(0, 3, "totalTransition: " + totalTransition); outputTableValue(0, 4, "expectedTransition: " + (totalTransition / transionTable.size())); outputTableValue(0, 5, "uniqueStimuliCount: " + stimuliSet.size()); // outputTableValue(0, 6, "cyclesRun: " + (cyclesToRun) + " uniqueCount: " + calculatedStimuliSet.size()); if (sampleCount < cyclesToRun) { schedule(1); } else { for (String uniqueStimulus : stimuliSet) { appendOutput(uniqueStimulus); } } } }; timer.schedule(1); }
From source file:nl.mpi.tg.eg.experiment.client.view.AnnotationTimelinePanel.java
License:Open Source License
public void startUpdating(final VideoPanel videoPanel, final AnnotationTimelineView annotationTimelineView, final DataFactory dataFactory) { AnnotationTimelinePanel.this.addClickHandler(new ClickHandler() { @Override//w w w .j a va 2 s . c om public void onClick(ClickEvent event) { isScrubbing = false; final int relativeX = event.getRelativeX(absolutePanel.getElement()); final int relativeY = event.getRelativeY(absolutePanel.getElement()); videoPanel.setCurrentTime(currentVideoLength * ((float) relativeX / (float) currentOffsetWidth)); int stimulusIndex = relativeY / tierHeight; final int topPosition = tierHeight * stimulusIndex; final Stimulus stimulus = stimulusArray.get(stimulusIndex); // if (addAnnotationButton != null) { // absolutePanel.remove(addAnnotationButton); // } // addAnnotationButton = new Image(UriUtils.fromString(serviceLocations.staticFilesUrl() + stimulus.getImage())); // addAnnotationButton.setHeight(tierHeight + "px"); //// absolutePanel.add(addAnnotationButton, 0, topPosition); // absolutePanel.add(addAnnotationButton, getLeftPosition(videoPanel.getCurrentTime(), videoPanel.getDurationTime()), topPosition); // addAnnotationButton.addClickHandler(new ClickHandler() { // // @Override // public void onClick(ClickEvent event) { // insertAnnotation(stimulus, videoPanel, annotationTimelineView, dataFactory); // } // }); } }); AnnotationTimelinePanel.this.addMouseDownHandler(new MouseDownHandler() { @Override public void onMouseDown(MouseDownEvent event) { isScrubbing = true; } }); AnnotationTimelinePanel.this.addMouseUpHandler(new MouseUpHandler() { @Override public void onMouseUp(MouseUpEvent event) { isScrubbing = false; } }); isScrubbing = false; AnnotationTimelinePanel.this.addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { isScrubbing = false; } }); AnnotationTimelinePanel.this.addMouseMoveHandler(new MouseMoveHandler() { @Override public void onMouseMove(MouseMoveEvent event) { if (isScrubbing) { final int relativeX = event.getRelativeX(absolutePanel.getElement()); videoPanel .setCurrentTime(currentVideoLength * ((float) relativeX / (float) currentOffsetWidth)); } } }); Timer timer = new Timer() { double lastTime = -1; @Override public void run() { final double currentTime = videoPanel.getCurrentTime(); if (lastTime != currentTime) { lastTime = currentTime; resizeTimeline(currentTime, videoPanel.getDurationTime()); // labelticker.setText("" + currentTime); absolutePanel.setWidgetPosition(timelineCursor, getLeftPosition(videoPanel.getCurrentTime(), videoPanel.getDurationTime()), absolutePanel.getOffsetHeight() - timelineCursor.getOffsetHeight()); // to folling section is going to be a bit time critical, so might need some attention in the future ArrayList<Stimulus> intersectedStimuli = new ArrayList<>(); for (AnnotationData annotationData : annotationLebels.keySet()) { if (intersectsTime(annotationData, currentTime)) { intersectedStimuli.add(annotationData.getStimulus()); } } // since we dont have an included and excluded list, we instead clear all highlights then set the known highlights after that for (StimulusButton button : stimulusButtons.values()) { button.removeStyleName("stimulusButtonHighlight"); } for (Stimulus intersectedStimulus : intersectedStimuli) { final StimulusButton stimulusButton = stimulusButtons.get(intersectedStimulus); if (stimulusButton != null) { stimulusButton.addStyleName("stimulusButtonHighlight"); } } } this.schedule(10); } }; timer.schedule(10); }
From source file:nl.mpi.tg.eg.experiment.client.view.TimedStimulusView.java
License:Open Source License
public void addBackgroundImage(final SafeUri imagePath, final String styleName, final int postLoadMs, final TimedStimulusListener timedStimulusListener) { // final Image image = new Image(imagePath); // this.getElement().getStyle().setBackgroundColor("green"); if (imagePath == null) { this.getElement().getStyle().clearBackgroundImage(); } else {// w w w .j a va 2s. c o m this.getElement().getStyle().setBackgroundImage("url(" + imagePath.asString() + ")"); } this.getElement().getStyle().setProperty("backgroundRepeat", "no-repeat"); // this.getElement().getStyle().setProperty("backgroundSize", "100% 100%"); this.getElement().getStyle().setProperty("backgroundRepeat", "no-repeat"); this.getElement().getStyle().setProperty("backgroundPosition", "50% 50%"); // remove the custom styles but keep the page width style this.setStyleName(this.getStyleName().contains("normalWidth") ? "normalWidth" : "narrowWidth"); if (styleName != null && !styleName.isEmpty()) { this.addStyleName(styleName); } else { this.getElement().getStyle().setProperty("backgroundSize", "cover"); // resizeView(); // this is to put back the screen size styles } // image.addLoadHandler(new LoadHandler() { // // @Override // public void onLoad(LoadEvent event) { Timer timer = new Timer() { @Override public void run() { timedStimulusListener.postLoadTimerFired(); } }; timerList.add(timer); timer.schedule(postLoadMs); // } // }); // outerPanel.add(image); }