[virtualcommons-svn] commit/foraging: alllee: maintaining a fixed size for the bottom message panel
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2011-10-04 17:58:05
|
1 new changeset in foraging: http://bitbucket.org/virtualcommons/foraging/changeset/770a1692ae0e/ changeset: 770a1692ae0e user: alllee date: 2011-10-04 19:57:55 summary: maintaining a fixed size for the bottom message panel affected #: 1 file (-1 bytes) --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java Tue Oct 04 10:41:40 2011 -0700 +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java Tue Oct 04 10:57:55 2011 -0700 @@ -406,10 +406,10 @@ messageTextPane.setBackground(Color.WHITE); addStyles(messageTextPane.getStyledDocument()); messageScrollPane = new JScrollPane(messageTextPane); - // Dimension scrollPaneSize = new Dimension(getPreferredSize().width, 50); - // messageScrollPane.setMinimumSize(scrollPaneSize); - // messageScrollPane.setPreferredSize(scrollPaneSize); - // messageScrollPane.setMaximumSize(scrollPaneSize); + Dimension scrollPaneSize = new Dimension(getPanel().getPreferredSize().width, 60); + messageScrollPane.setMinimumSize(scrollPaneSize); + messageScrollPane.setPreferredSize(scrollPaneSize); + messageScrollPane.setMaximumSize(scrollPaneSize); messagePanel.add(messageScrollPane, BorderLayout.CENTER); gamePanel.add(messagePanel, BorderLayout.SOUTH); @@ -427,7 +427,7 @@ public void componentResized(ComponentEvent event) { Component component = event.getComponent(); // offset by 35 pixels to allow for message box - Dimension screenSize = new Dimension(component.getWidth(), component.getHeight() - 50); + Dimension screenSize = new Dimension(component.getWidth(), component.getHeight() - 90); subjectView.setScreenSize(screenSize); subjectView.setImageSizes(); getPanel().revalidate(); 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. |