[virtualcommons-svn] commit/foraging: alllee: fixing ui glitches on windows due to improper repaint
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2011-09-22 00:02:13
|
1 new changeset in foraging: http://bitbucket.org/virtualcommons/foraging/changeset/cba7af59d290/ changeset: cba7af59d290 user: alllee date: 2011-09-22 02:02:05 summary: fixing ui glitches on windows due to improper repaint. fixes issue 14 TODO: clipping plane from field of vision is overlapping the rest of the interface when it's not supposed to. affected #: 2 files (-1 bytes) --- a/src/main/java/edu/asu/commons/foraging/client/GameWindow2D.java Wed Sep 21 16:30:54 2011 -0700 +++ b/src/main/java/edu/asu/commons/foraging/client/GameWindow2D.java Wed Sep 21 17:02:05 2011 -0700 @@ -141,7 +141,7 @@ timeLeftLabel.setText(getTimeLeftLabelText(roundTimeLeft)); // FIXME: subjectView.repaint() causes graphical glitches here // only when we transition from 3D -> 2D experiment. Find out why. - subjectView.repaint(); + getPanel().repaint(); } }); } @@ -153,16 +153,22 @@ * @param event */ public void init() { - RoundConfiguration roundConfiguration = dataModel.getRoundConfiguration(); - if (roundConfiguration.isFirstRound()) { - setInstructions(roundConfiguration.getWelcomeInstructions()); - } - // don't display next round time, instead wait for the - // facilitator signal. - timeLeftLabel.setText("Waiting for facilitator's signal."); - informationLabel.setText("Waiting for facilitator's signal."); - // add the next round instructions to the existing debriefing text set by the previous - // EndRoundEvent. + final RoundConfiguration roundConfiguration = dataModel.getRoundConfiguration(); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + if (roundConfiguration.isFirstRound()) { + setInstructions(roundConfiguration.getWelcomeInstructions()); + } + // don't display next round time, instead wait for the + // facilitator signal. + timeLeftLabel.setText("Waiting for facilitator's signal."); + informationLabel.setText("Waiting for facilitator's signal."); + // add the next round instructions to the existing debriefing text set by the previous + // EndRoundEvent. + } + }); + + } private void setQuestionColors(List<String> questionNumbers, String color) { --- a/src/main/resources/web/client.jnlp Wed Sep 21 16:30:54 2011 -0700 +++ b/src/main/resources/web/client.jnlp Wed Sep 21 17:02:05 2011 -0700 @@ -12,8 +12,10 @@ <j2se version="1.6+"/><jar href="client.jar"/><jar href='@FRAMEWORK_JAR@'/> + <!-- <property name="sun.java2d.noddraw" value="true"/><extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"/> + --></resources><application-desc main-class="@MAIN_CLASS@"/></jnlp> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |