[tuxdroid-svn] r1429 - in software_suite_v2/software/tools/tuxController/trunk/src/GUI: . componen
Status: Beta
Brought to you by:
ks156
From: Paul_R <c2m...@c2...> - 2008-07-30 14:04:39
|
Author: Paul_R Date: 2008-07-30 16:04:46 +0200 (Wed, 30 Jul 2008) New Revision: 1429 Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/generalControlPanel.java software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/levelPanel.java software_suite_v2/software/tools/tuxController/trunk/src/GUI/mainWindow.java Log: * Moved the RF state to the advanced view panel * Align the level panel Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java =================================================================== --- software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java 2008-07-30 13:31:40 UTC (rev 1428) +++ software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java 2008-07-30 14:04:46 UTC (rev 1429) @@ -28,6 +28,9 @@ import java.awt.event.ActionListener; import javax.swing.JCheckBox; +import javax.swing.JPanel; +import javax.swing.JLabel; +import javax.swing.SwingConstants; import GUI.mainWindow; @@ -52,19 +55,39 @@ * Create the panel with the checkbox. */ private void createAdvancedViewSection() { + win.advancedView = new JPanel(); + win.getContentPane().add(win.advancedView, + new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, + GridBagConstraints.NORTH, + GridBagConstraints.BOTH, + new Insets(0, 0, 0, 0), 0, 0)); + win.advancedView.setLayout(null); + win.chkAdvancedView = new JCheckBox(); - win.getContentPane().add(win.chkAdvancedView, + win.advancedView.add(win.chkAdvancedView, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); + win.chkAdvancedView.setBounds(10, 30, 205, 20); win.chkAdvancedView.setText(bundle.getString("chkAdvancedView")); //$NON-NLS-1$ - win.chkAdvancedView.setMargin(new java.awt.Insets(2, 10, 2, 1)); win.chkAdvancedView.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { win.chkAdvancedViewActionPerformed(evt); } - }); + }); + + win.imgRFState = new JLabel(); + win.advancedView.add(win.imgRFState, + new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, + GridBagConstraints.CENTER, + GridBagConstraints.NONE, + new Insets(0, 0, 0, 0), 0, 0)); + win.imgRFState.setIcon(win.iconRFOff); + win.imgRFState.setBounds(205, 30, 205, 20); + win.imgRFState.setText("Wireless link"); + win.imgRFState.setHorizontalTextPosition(SwingConstants.LEFT); + win.imgRFState.setHorizontalAlignment(SwingConstants.RIGHT); } } Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/generalControlPanel.java =================================================================== --- software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/generalControlPanel.java 2008-07-30 13:31:40 UTC (rev 1428) +++ software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/generalControlPanel.java 2008-07-30 14:04:46 UTC (rev 1429) @@ -61,23 +61,23 @@ win.sepGeneralControl1 = new JSeparator(); win.panGeneralControl.add(win.sepGeneralControl1); - win.sepGeneralControl1.setBounds(2, 4, 2, 86); + win.sepGeneralControl1.setBounds(2, 4, 2, 66); win.sepGeneralControl1.setOrientation(SwingConstants.VERTICAL); win.sepGeneralControl2 = new JSeparator(); win.panGeneralControl.add(win.sepGeneralControl2); - win.sepGeneralControl2.setBounds(18, 4, 2, 86); + win.sepGeneralControl2.setBounds(18, 4, 2, 66); win.sepGeneralControl2.setOrientation(SwingConstants.VERTICAL); - win.lblGeneral = new JVerticalLabel(bundle.getString("lblGeneral"), 67); //$NON-NLS-1$ + win.lblGeneral = new JVerticalLabel(bundle.getString("lblGeneral"), 57); //$NON-NLS-1$ win.panGeneralControl.add(win.lblGeneral); - win.lblGeneral.setBounds(2, 0, 16, 90); + win.lblGeneral.setBounds(2, 0, 16, 70); } private void button() { win.btnGeneralStop = new JButton(); win.panGeneralControl.add(win.btnGeneralStop); - win.btnGeneralStop.setBounds(18, 32, 360, 25); + win.btnGeneralStop.setBounds(18, 22, 360, 25); win.btnGeneralStop.setContentAreaFilled(false); win.btnGeneralStop.setBorderPainted(false); win.btnGeneralStop.setIcon(win.iconStop); Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/levelPanel.java =================================================================== --- software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/levelPanel.java 2008-07-30 13:31:40 UTC (rev 1428) +++ software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/levelPanel.java 2008-07-30 14:04:46 UTC (rev 1429) @@ -54,14 +54,14 @@ /* Create the panel */ win.panLevel = new JPanel(); win.panLevelAbs.add(win.panLevel); - win.panLevel.setBounds(0, 0, 406, 79); - java.awt.Dimension panDim = new java.awt.Dimension(406, 90); + win.panLevel.setBounds(0, 0, 406, 60); + java.awt.Dimension panDim = new java.awt.Dimension(406, 60); GridBagLayout panLevelLayout = new GridBagLayout(); win.panLevel.setLayout(panLevelLayout); win.panLevel.setMaximumSize(panDim); win.panLevel.setMinimumSize(panDim); - panLevelLayout.rowWeights = new double[] {0.1, 0.1, 0.1}; - panLevelLayout.rowHeights = new int[] {30, 30, 30}; + panLevelLayout.rowWeights = new double[] {0.1, 0.1, 0.0}; + panLevelLayout.rowHeights = new int[] {30, 30, 1}; panLevelLayout.columnWeights = new double[] {0.0, 0.0, 0.0}; panLevelLayout.columnWidths = new int[] {55, 260, 70}; } @@ -127,6 +127,7 @@ } private void createMicroSection() { + /* win.imgRFState = new JLabel(); win.panLevel.add(win.imgRFState, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, @@ -134,7 +135,7 @@ GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); win.imgRFState.setIcon(win.iconRFOff); - + */ win.progMicroLevel = new JProgressBar(); win.panLevel.add(win.progMicroLevel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/mainWindow.java =================================================================== --- software_suite_v2/software/tools/tuxController/trunk/src/GUI/mainWindow.java 2008-07-30 13:31:40 UTC (rev 1428) +++ software_suite_v2/software/tools/tuxController/trunk/src/GUI/mainWindow.java 2008-07-30 14:04:46 UTC (rev 1429) @@ -125,13 +125,13 @@ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - dimWin = new java.awt.Dimension(430, 600); // 396, 592 + dimWin = new java.awt.Dimension(430, 580); // 396, 592 this.setPreferredSize(new java.awt.Dimension(430, 600)); // 756, 591 this.setMinimumSize(dimWin); this.setSize(dimWin); this.setResizable(false); thisLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1}; - thisLayout.rowHeights = new int[] {80, 390, 90, 40}; + thisLayout.rowHeights = new int[] {80, 390, 70, 40}; thisLayout.columnWeights = new double[] {0.0, 0.0, 1.0}; thisLayout.columnWidths = new int[] {430, 1, 1}; getContentPane().setLayout(thisLayout); @@ -150,33 +150,33 @@ private void resizeWindow() { if (chkAdvancedView.isSelected() && chkTTS.isSelected()) { - dimWin.setSize(790, 700); + dimWin.setSize(790, 680); thisLayout.columnWidths = new int[] {430, 360, 1}; - thisLayout.rowHeights = new int[] {80, 390, 90, 140}; + thisLayout.rowHeights = new int[] {80, 390, 70, 140}; this.setSize(dimWin); this.setResizable(false); } else if (!chkAdvancedView.isSelected() && !chkTTS.isSelected()) { - dimWin.setSize(430, 600); + dimWin.setSize(430, 580); thisLayout.columnWidths = new int[] {430, 1, 1}; - thisLayout.rowHeights = new int[] {80, 390, 90, 40}; + thisLayout.rowHeights = new int[] {80, 390, 70, 40}; this.setSize(dimWin); this.setResizable(false); } - else if (chkAdvancedView.isSelected() && !chkTTS.isSelected()) + else if(chkAdvancedView.isSelected() && !chkTTS.isSelected()) { - dimWin.setSize(790, 600); + dimWin.setSize(790, 580); thisLayout.columnWidths = new int[] {430, 360, 1}; - thisLayout.rowHeights = new int[] {80, 390, 90, 40}; + thisLayout.rowHeights = new int[] {80, 390, 70, 40}; this.setSize(dimWin); this.setResizable(false); } else if (!chkAdvancedView.isSelected() && chkTTS.isSelected()) { - dimWin.setSize(430, 700); + dimWin.setSize(430, 680); thisLayout.columnWidths = new int[] {430, 1, 1}; - thisLayout.rowHeights = new int[] {80, 390, 90, 140}; + thisLayout.rowHeights = new int[] {80, 390, 70, 140}; this.setSize(dimWin); this.setResizable(false); } @@ -817,6 +817,7 @@ public JPanel panLedsCtl; public JPanel panDummyCtl; public JPanel panGeneralControl; + public JPanel advancedView; public JPanel panLevelAbs; public JPanel panLevel; |