[virtualcommons-svn] SF.net SVN: virtualcommons:[336] irrigation/trunk/src/main
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2009-10-27 05:49:17
|
Revision: 336 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=336&view=rev Author: alllee Date: 2009-10-27 05:49:09 +0000 (Tue, 27 Oct 2009) Log Message: ----------- fixing spacing between irrigation capacity and water supply labels. Modified Paths: -------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java 2009-10-27 02:20:01 UTC (rev 335) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java 2009-10-27 05:49:09 UTC (rev 336) @@ -8,6 +8,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.GroupLayout; import javax.swing.JButton; @@ -45,7 +46,7 @@ //this contains the upstream and downstream Panel private JPanel jPanelUpStreamWindow = null; private JPanel jPanelDownStreamWindow = null; - private JPanel downloadScreenPanel = null; + private JPanel mainInterfacePanel = null; private IrrigationClient client; @@ -128,12 +129,11 @@ this.setLayout(new BorderLayout(4,4)); this.setSize(1130, 558); - this.add(getJPanelMain(),null); + this.add(getPanel(),null); } - private JPanel getJPanelMain() { - // TODO Auto-generated method stub + private JPanel getPanel() { if(jPanelMain == null){ jPanelMain = new JPanel(); jPanelMain.setLayout(new BorderLayout(4,4)); @@ -142,16 +142,17 @@ JPanel upperPanel = new JPanel(); upperPanel.setLayout(new BoxLayout(upperPanel, BoxLayout.X_AXIS)); upperPanel.add(getIrrigationCapacityLabel()); + upperPanel.add(Box.createHorizontalGlue()); upperPanel.add(getWaterSupplyLabel()); jPanelMain.add(upperPanel, BorderLayout.NORTH); - jPanelMain.add(getDownloadScreenPanel(), BorderLayout.CENTER); + jPanelMain.add(getMainInterfacePanel(), BorderLayout.CENTER); return jPanelMain; } return jPanelMain; } - private JPanel getDownloadScreenPanel() { - if(downloadScreenPanel == null){ + private JPanel getMainInterfacePanel() { + if(mainInterfacePanel == null){ scoreBoardLabel = new JLabel(); scoreBoardLabel.setBounds(new Rectangle(582,225+100+35,530,20)); scoreBoardLabel.setHorizontalAlignment(SwingConstants.CENTER); @@ -169,16 +170,16 @@ priorityjLabel = new JLabel(); priorityjLabel.setBounds(new Rectangle(780, 16, 44, 16)); priorityjLabel.setText(""); - downloadScreenPanel = new JPanel(); - downloadScreenPanel.setLayout(null); - downloadScreenPanel.setName("downloadScreenPanel"); - downloadScreenPanel.setBackground(Color.WHITE); - downloadScreenPanel.add(getCenterPanel(),null); - downloadScreenPanel.add(getTimeLeftProgressBar(), null); - downloadScreenPanel.add(gateSwitchLabel, null); - downloadScreenPanel.add(scoreBoardLabel, null); + mainInterfacePanel = new JPanel(); + mainInterfacePanel.setLayout(null); + mainInterfacePanel.setName("Main interface panel"); + mainInterfacePanel.setBackground(Color.WHITE); + mainInterfacePanel.add(getCenterPanel(),null); + mainInterfacePanel.add(getTimeLeftProgressBar(), null); + mainInterfacePanel.add(gateSwitchLabel, null); + mainInterfacePanel.add(scoreBoardLabel, null); } - return downloadScreenPanel; + return mainInterfacePanel; } private JProgressBar getTimeLeftProgressBar() { @@ -561,10 +562,10 @@ centerPanel.add(getCanalPanel(clientDataModel)); //switch(clientGameState.getPriority()){ - downloadScreenPanel.add(getJPanelUpStreamWindow(),null); - downloadScreenPanel.add(getJPanelDownStreamWindow(),null); + mainInterfacePanel.add(getJPanelUpStreamWindow(),null); + mainInterfacePanel.add(getJPanelDownStreamWindow(),null); //adding the in between Panel - downloadScreenPanel.add(getMiddleWindowPanel(),null); + mainInterfacePanel.add(getMiddleWindowPanel(),null); /*case 0 : downloadScreenPanel.add(getJPanelUpStreamWindow(0),null); downloadScreenPanel.add(getJPanelDownStreamWindow(0),null); //Assigning the Priorities on the Priority Label Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml 2009-10-27 02:20:01 UTC (rev 335) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml 2009-10-27 05:49:09 UTC (rev 336) @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Irrigation experiment round configuration</comment> -<!--<entry key="hostname">localhost</entry>--> +<comment>Irrigation experiment server configuration</comment> <entry key="hostname">@SERVER_ADDRESS@</entry> <entry key="port">@PORT_NUMBER@</entry> <entry key="round0">round0.xml</entry> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |