[virtualcommons-svn] commit/foraging: 2 new changesets
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-01-25 00:00:30
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/48f75eca369a/ changeset: 48f75eca369a user: alllee date: 2012-01-25 00:58:50 summary: adding tiebreaker message back to voting-results affected #: 2 files diff -r 569002c6259c4dcc2ca9a59f857afa1ffc27ee38 -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -262,6 +262,9 @@ <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr> + {if (tiebreaker)} + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> + {endif} <p><b> {first(selectedRules)} </b></p> ]]></entry> diff -r 569002c6259c4dcc2ca9a59f857afa1ffc27ee38 -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -262,6 +262,9 @@ <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr> + {if (tiebreaker)} + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> + {endif} <p><b> {first(selectedRules)} </b></p> ]]></entry> https://bitbucket.org/virtualcommons/foraging/changeset/0c31e8370517/ changeset: 0c31e8370517 user: alllee date: 2012-01-25 01:00:06 summary: adding confirmation dialog when clicking continue past the survey screen affected #: 5 files diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -834,4 +834,9 @@ public boolean showTokenAnimation() { return getBooleanProperty("show-token-animation", true); } + + public String getSurveyConfirmationMessage() { + return getProperty("survey-confirmation-message", "Please make sure you have completed the survey before continuing. Have you completed the survey?"); + + } } diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java @@ -18,7 +18,7 @@ import edu.asu.commons.net.Identifier; /** - * $Id: AggregateTokenSpatialDistributionProcessor.java 526 2010-08-06 01:25:27Z alllee $ + * $Id$ * * * @author <a href='mailto:all...@as...'>Allen Lee</a> diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java @@ -18,7 +18,7 @@ import edu.asu.commons.net.Identifier; /** - * $Id: CollectedTokenSpatialDistributionProcessor.java 526 2010-08-06 01:25:27Z alllee $ + * $Id$ * * Generates spatial distribution statistics. * diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -193,9 +193,18 @@ return new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - client.transmit(new SurveyCompletedEvent(client.getId())); - showInstructions(); - instructionsEditorPane.setActionListener(null); + int selectedOption = JOptionPane.showConfirmDialog(getPanel(), + dataModel.getRoundConfiguration().getSurveyConfirmationMessage(), + "Confirm survey completion", JOptionPane.YES_NO_OPTION); + switch (selectedOption) { + case JOptionPane.YES_OPTION: + showInstructions(); + client.transmit(new SurveyCompletedEvent(client.getId())); + instructionsEditorPane.setActionListener(null); + break; + default: + break; + } } }; } diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/ui/SubjectView.java --- a/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java +++ b/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java @@ -89,7 +89,7 @@ } super.setup(configuration); if (tokenFieldOfVisionEnabled || subjectFieldOfVisionEnabled) { - fieldOfVisionOffset = (dw / 2.0d); + fieldOfVisionOffset = (dw * 0.3d); System.err.println("field of vision offset: " + fieldOfVisionOffset); } } @@ -157,7 +157,7 @@ graphics2D.setFont(font); FontMetrics fontMetrics = graphics2D.getFontMetrics(font); int characterHeight = fontMetrics.getAscent(); - int verticalCharacterSpacing = (int) ( (dh - characterHeight) / 2); + int verticalCharacterSpacing = (int) ((dh - characterHeight) * 0.5d); Point currentPosition = dataModel.getCurrentPosition(); if (subjectFieldOfVisionEnabled) { // paint a transparent circle centered on the current position of the subject. @@ -195,7 +195,7 @@ String subjectNumber = String.valueOf( dataModel.getAssignedNumber(id) ); //Calculate x and y so that the text is center aligned int characterWidth = fontMetrics.stringWidth(subjectNumber); - int x = (int) (scaledX + ( (dw - characterWidth) / 2)); + int x = (int) (scaledX + ( (dw - characterWidth) * 0.5d)); int y = (int) (scaledY + characterHeight - verticalCharacterSpacing); graphics2D.drawString(subjectNumber, x, y); } 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. |