[virtualcommons-svn] commit/foraging: alllee: - adding some colors from jfreechart to ForagingInter
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2011-11-19 00:23:45
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/30d71ee1044b/ changeset: 30d71ee1044b user: alllee date: 2011-11-19 01:23:34 summary: - adding some colors from jfreechart to ForagingInterface (should move to csidex at some point) - fixes issue 23 -- was using wrong ChatPanel reference for focus request - fixes issue 22 affected #: 7 files diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 src/main/java/edu/asu/commons/foraging/ui/ForagingInterface.java --- a/src/main/java/edu/asu/commons/foraging/ui/ForagingInterface.java +++ b/src/main/java/edu/asu/commons/foraging/ui/ForagingInterface.java @@ -22,7 +22,79 @@ public static final Font DEFAULT_PLAIN_FONT = new Font(getDefaultFont().getFamily(), Font.PLAIN, 16); public static final Font DEFAULT_BOLD_FONT = new Font(getDefaultFont().getFamily(), Font.BOLD, 16); - + + /** A very dark red color. */ + public static final Color VERY_DARK_RED = new Color(0x80, 0x00, 0x00); + + /** A dark red color. */ + public static final Color DARK_RED = new Color(0xc0, 0x00, 0x00); + + /** A light red color. */ + public static final Color LIGHT_RED = new Color(0xFF, 0x40, 0x40); + + /** A very light red color. */ + public static final Color VERY_LIGHT_RED = new Color(0xFF, 0x80, 0x80); + + /** A very dark yellow color. */ + public static final Color VERY_DARK_YELLOW = new Color(0x80, 0x80, 0x00); + + /** A dark yellow color. */ + public static final Color DARK_YELLOW = new Color(0xC0, 0xC0, 0x00); + + /** A light yellow color. */ + public static final Color LIGHT_YELLOW = new Color(0xFF, 0xFF, 0x40); + + /** A very light yellow color. */ + public static final Color VERY_LIGHT_YELLOW = new Color(0xFF, 0xFF, 0x80); + + /** A very dark green color. */ + public static final Color VERY_DARK_GREEN = new Color(0x00, 0x80, 0x00); + + /** A dark green color. */ + public static final Color DARK_GREEN = new Color(0x00, 0xC0, 0x00); + + /** A light green color. */ + public static final Color LIGHT_GREEN = new Color(0x40, 0xFF, 0x40); + + /** A very light green color. */ + public static final Color VERY_LIGHT_GREEN = new Color(0x80, 0xFF, 0x80); + + /** A very dark cyan color. */ + public static final Color VERY_DARK_CYAN = new Color(0x00, 0x80, 0x80); + + /** A dark cyan color. */ + public static final Color DARK_CYAN = new Color(0x00, 0xC0, 0xC0); + + /** A light cyan color. */ + public static final Color LIGHT_CYAN = new Color(0x40, 0xFF, 0xFF); + + /** Aa very light cyan color. */ + public static final Color VERY_LIGHT_CYAN = new Color(0x80, 0xFF, 0xFF); + + /** A very dark blue color. */ + public static final Color VERY_DARK_BLUE = new Color(0x00, 0x00, 0x80); + + /** A dark blue color. */ + public static final Color DARK_BLUE = new Color(0x00, 0x00, 0xC0); + + /** A light blue color. */ + public static final Color LIGHT_BLUE = new Color(0x40, 0x40, 0xFF); + + /** A very light blue color. */ + public static final Color VERY_LIGHT_BLUE = new Color(0x80, 0x80, 0xFF); + + /** A very dark magenta/purple color. */ + public static final Color VERY_DARK_MAGENTA = new Color(0x80, 0x00, 0x80); + + /** A dark magenta color. */ + public static final Color DARK_MAGENTA = new Color(0xC0, 0x00, 0xC0); + + /** A light magenta color. */ + public static final Color LIGHT_MAGENTA = new Color(0xFF, 0x40, 0xFF); + + /** A very light magenta color. */ + public static final Color VERY_LIGHT_MAGENTA = new Color(0xFF, 0x80, 0xFF); + public static Font getDefaultFont() { return UIManager.getFont("Label.font"); diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 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 @@ -518,7 +518,7 @@ // reset token distribution request handling case KeyEvent.VK_ENTER: if (dataModel.getRoundConfiguration().isInRoundChatEnabled()) { - getChatPanel().setTextFieldFocus(); + getInRoundChatPanel().setTextFieldFocus(); } break; case KeyEvent.VK_R: diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 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 @@ -86,8 +86,8 @@ if (subjectFieldOfVision) { viewSubjectsRadius = configuration.getViewSubjectsRadius(); viewSubjectsField = new Circle(dataModel.getCurrentPosition(), viewSubjectsRadius); - fieldOfVisionXOffset = (dw * 0.3); - fieldOfVisionYOffset = (dh * 0.3); + fieldOfVisionXOffset = (dw / 3.0d); + fieldOfVisionYOffset = (dh / 3.0d); } } super.setup(configuration); diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 src/main/java/edu/asu/commons/foraging/ui/TrustGamePanel.java --- a/src/main/java/edu/asu/commons/foraging/ui/TrustGamePanel.java +++ b/src/main/java/edu/asu/commons/foraging/ui/TrustGamePanel.java @@ -140,6 +140,7 @@ @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (column == 2) { + // FIXME: use different colors here. setBackground(Color.YELLOW); } else { diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 src/main/resources/configuration/asu-experiments/2011/bratislava-pretest/round4.xml --- a/src/main/resources/configuration/asu-experiments/2011/bratislava-pretest/round4.xml +++ b/src/main/resources/configuration/asu-experiments/2011/bratislava-pretest/round4.xml @@ -27,7 +27,7 @@ <p> Round 4 is the same as the previous rounds with one exception. You will be able to communicate with the other participants in your group <b>during</b> the - round. To communicate, hit the enter key, type uour message, and then hit the + round. To communicate, hit the enter key, type your message, and then hit the enter key again. You must hit the enter key before every message you type, otherwise control will return to the game screen where you can use the arrow keys to move around. diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 src/main/resources/configuration/asu-experiments/2011/pretest/round4.xml --- a/src/main/resources/configuration/asu-experiments/2011/pretest/round4.xml +++ b/src/main/resources/configuration/asu-experiments/2011/pretest/round4.xml @@ -27,7 +27,7 @@ <p> Round 4 is the same as the previous rounds with one exception. You will be able to communicate with the other participants in your group <b>during</b> the - round. To communicate, hit the enter key, type uour message, and then hit the + round. To communicate, hit the enter key, type your message, and then hit the enter key again. You must hit the enter key before every message you type, otherwise control will return to the game screen where you can use the arrow keys to move around. diff -r 5e1f60ad639478149e012ed2aa7471798c795cbd -r 30d71ee1044bf4bf545bf64158896314211d64b6 src/main/resources/configuration/asu-experiments/2011/t1/round4.xml --- a/src/main/resources/configuration/asu-experiments/2011/t1/round4.xml +++ b/src/main/resources/configuration/asu-experiments/2011/t1/round4.xml @@ -25,7 +25,7 @@ <p> Round 4 is the same as the previous rounds with one exception. You will be able to communicate with the other participants in your group <b>during</b> the - round. To communicate, hit the enter key, type uour message, and then hit the + round. To communicate, hit the enter key, type your message, and then hit the enter key again. You must hit the enter key before every message you type, otherwise control will return to the game screen where you can use the arrow keys to move around. 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. |