Author: jerome
Date: 2009-01-20 13:47:03 +0100 (Tue, 20 Jan 2009)
New Revision: 3501

Modified:
   
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
   
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterfaceFunctions.java
   
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/JStatusBar.java
Log:
Fixed: #12 ?\226?\128?\148 Quelle est l'utilit?\195?\169 du bouton de 
r?\195?\169duction du panel de configuration.

Modified: 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
===================================================================
--- 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
     2009-01-20 12:20:17 UTC (rev 3500)
+++ 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
     2009-01-20 12:47:03 UTC (rev 3501)
@@ -443,8 +443,7 @@
                        jContentPane.add(fBrowserThumbnailAttitunes);
                        jContentPane.add(fBrowserThumbnailGadgets);
                        jContentPane.add(getJTabbedPane());
-                       this.jStatusBar = new JStatusBar(jFrame, properties);
-                       this.jStatusBar.add(this.jStatusBar.getHideButton());
+                       this.jStatusBar = new JStatusBar(jFrame);
                        
this.jStatusBar.setOnlineStatus(CcCommons.tux.radio.getConnected());
                        jContentPane.add(jStatusBar);
                        remotePlaylist.playlist.setBounds(new Rectangle(141, 
105, 620, 246));
@@ -796,18 +795,10 @@
                                        showThumbnailView();
                                }
                        });
-                       //Adding "show/Hide bottom frame functionnality"
-                       JMenuItem showHideBottomFrame = new 
JMenuItem(CcCommons.language.getMenuViewShowProperties());
-                       showHideBottomFrame.addMouseListener(new 
java.awt.event.MouseAdapter(){
-                               public void 
mousePressed(java.awt.event.MouseEvent event){
-                                       jStatusBar.HideBottomPanel();
-                               }
-                       });
                        
                        //Adding items.
                        popupmenu2.add(showlist);
                        popupmenu2.add(showthumb);
-                       popupmenu2.add(showHideBottomFrame);
                        
                        //Display menu.
                        viewMenu.addMouseListener(new 
java.awt.event.MouseAdapter() {
@@ -1304,9 +1295,6 @@
                        CcCommons.type = CcConstants.TYPE_GADGETS;
                        
                        this.showGadgetLatestProperties();
-                       
-                       if(!this.jStatusBar.isPanelVisible()) 
-                               properties.setVisible(false);
                                
                }       
                else if (index == 1){
@@ -1320,9 +1308,7 @@
                        }
                        
                        CcCommons.type = CcConstants.TYPE_ATTITUNES;
-                       this.showAttituneLatestProperties();
-                       if(!this.jStatusBar.isPanelVisible()) 
-                               properties.setVisible(false);
+                       this.showAttituneLatestProperties();
                }
                this.setControlsConsistanceEnabled(true);
                properties.setEnabled(true);
@@ -1388,10 +1374,6 @@
                }
                
                if (index <= 1){
-                       if(this.jStatusBar.isPanelHidden()){
-                               jStatusBar.HideBottomPanel();
-                               this.jStatusBar.setPanelVisible(true);
-                       }
                        if(CcCommons.type == CcConstants.TYPE_REMOTELIST) 
saveFavoritesParams();
                        this.showFileBrowser(0);
                        this.maskPlaylists();
@@ -1525,16 +1507,10 @@
                                
if(remotePlaylist.getSelectedItemKind().equalsIgnoreCase("gadget")){
                                        title = 
CcCommons.language.getPanelConfiguration();
                                        this.properties.addTab(title, 
(TuxDegradeeScrollPane)pan[0]);
-                                       
-                                       if(!this.jStatusBar.isPanelVisible()) 
-                                               properties.setVisible(false);
                                }
                                else{
                                        title = 
CcCommons.language.getPanelSummary();
                                        this.properties.addTab(title, 
(TuxDegradeePanelWithInset)pan[0]);
-                                       
-                                       if(!this.jStatusBar.isPanelVisible()) 
-                                               properties.setVisible(false);
                                }
                                
                        } else{
@@ -1542,9 +1518,6 @@
                                this.properties.removeAll();
                                
this.properties.addTab(CcCommons.language.getPanelHelp(), 
                                                
this.helpPanels.getLiveWithTux(TuxHelpPanel.LIVE_FAVORITES));
-                               
-                               if(!this.jStatusBar.isPanelVisible())
-                                       properties.setVisible(false);
                        }
                        
                }else if(index == 0){
@@ -1563,22 +1536,16 @@
                                        
this.properties.addTab(CcCommons.language.getPanelAlarm(), 
(TuxDegradeePanel)pan[0]);
                                        
this.properties.addTab(CcCommons.language.getPanelGadgetConfiguration(), 
                                                                                
                        (TuxDegradeeScrollPane)pan[1]);
-                                       if(!this.jStatusBar.isPanelVisible()) 
-                                               properties.setVisible(false);
                                        
                                        
                                }else{
                                        
this.properties.addTab(CcCommons.language.getPanelAlarm(), 
(TuxDegradeePanel)pan[0]);
-                                       if(!this.jStatusBar.isPanelVisible()) 
-                                               properties.setVisible(false);
                                }
                        } else{
                                //then set the cc help files.
                                this.properties.removeAll();
                                
this.properties.addTab(CcCommons.language.getPanelHelp(), 
                                                
this.helpPanels.getLiveWithTux(TuxHelpPanel.LIVE_ALERTS));
-                               if(!this.jStatusBar.isPanelVisible()) 
-                                       properties.setVisible(false);
                        }
                }
        }
@@ -1661,11 +1628,7 @@
                        Object[] datas = 
alertPlaylist.getDatasAtSelectedIndex(); 
                        CcCommons.settings.removeFromAlertList(datas);
                        alertPlaylist.refresh();
-               }
-               
-               if(!this.jStatusBar.isPanelVisible()) 
-                       properties.setVisible(false);
-               
+               }
        }
        
        /**
@@ -1752,8 +1715,6 @@
                        CcInterfaceFunctions.maskAllTabs(properties);
                        
                        
this.properties.addTab(CcCommons.language.getPanelSummary(), panel);
-                       if(!this.jStatusBar.isPanelVisible()) 
-                               properties.setVisible(false);
                        
                        if(CcCommons.view == CcConstants.VIEW_LIST){
                                this.savedProperties.put("attitune", new 
JPanel[]{panel});
@@ -1773,10 +1734,7 @@
                        
                        
this.properties.addTab(CcCommons.language.getPanelSummary(), paneDesc);
                        
this.properties.addTab(CcCommons.language.getPanelHelp(), paneHelp);
-                       if(!this.jStatusBar.isPanelVisible()) 
-                               properties.setVisible(false);
                        
-                       
                        if(CcCommons.view == CcConstants.VIEW_LIST){
                                this.savedProperties.put("gadget", new 
Object[]{paneDesc, paneHelp});
                        }
@@ -1860,8 +1818,6 @@
                                
                                
this.properties.addTab(CcCommons.language.getPanelConfiguration(), pane);
                                this.savedProperties.put("remote", new 
Object[]{pane});
-                               if(!this.jStatusBar.isPanelVisible()) 
-                                       properties.setVisible(false);
                        }
                        else if(ty.equalsIgnoreCase("attitune")){
                                CcInterfaceFunctions.maskAllTabs(properties);
@@ -1871,8 +1827,6 @@
                                
                                
properties.add(CcCommons.language.getPanelDescription(), panel);
                                this.savedProperties.put("remote", new 
Object[]{panel});
-                               if(!this.jStatusBar.isPanelVisible()) 
-                                       properties.setVisible(false);
                                jFrame.pack();
                        }
                }
@@ -2014,8 +1968,6 @@
                                 
                                
this.properties.add(CcCommons.language.getPanelAlarm(), cont);
                                this.savedProperties.put("alert", new 
Object[]{cont});
-                               if(!this.jStatusBar.isPanelVisible()) 
-                                       properties.setVisible(false);
                                jFrame.repaint();
                                jFrame.pack();
                        }
@@ -2218,8 +2170,6 @@
                                
                                
this.properties.addTab(CcCommons.language.getPanelAlarm(), cont);
                                this.properties.addTab("Gadget " 
+CcCommons.language.getPanelConfiguration(), pane);
-                               if(!this.jStatusBar.isPanelVisible()) 
-                                       properties.setVisible(false);
                                
                                this.savedProperties.put("alert", new 
Object[]{cont, pane});
                                

Modified: 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterfaceFunctions.java
===================================================================
--- 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterfaceFunctions.java
    2009-01-20 12:20:17 UTC (rev 3500)
+++ 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterfaceFunctions.java
    2009-01-20 12:47:03 UTC (rev 3501)
@@ -45,8 +45,6 @@
                CcInterfaceFunctions.maskAllTabs(pane);//remove all tabs
                //Add previous selected panel here for attitunes / alerts / 
remote.
                pane.addTab("", new TuxDegradeePanel());
-               if(!statusBar.isPanelVisible()) 
-                       pane.setVisible(false);
        }
        
        
@@ -57,8 +55,6 @@
                CcInterfaceFunctions.maskAllTabs(pane);
                if(statusBar == null)
                        pane.setVisible(true);
-               else if(!statusBar.isPanelVisible()) 
-                       pane.setVisible(false);
        }
        
        

Modified: 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/JStatusBar.java
===================================================================
--- 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/JStatusBar.java
        2009-01-20 12:20:17 UTC (rev 3500)
+++ 
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/swing/JStatusBar.java
        2009-01-20 12:47:03 UTC (rev 3501)
@@ -23,15 +23,11 @@
 package com.tuxdroid.cc.swing;
 
 import java.awt.Color;
-import java.awt.Rectangle;
-import java.awt.event.MouseEvent;
 
 import javax.swing.ImageIcon;
-import javax.swing.JButton;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
-import javax.swing.JTabbedPane;
 
 import com.tuxdroid.cc.CcCommons;
 
@@ -40,15 +36,14 @@
        private static final long serialVersionUID = 1L;
        private JLabel tuxstatusLabel, status; 
        public boolean hide_panel_flag = false;
-       private JFrame parent;
-       private JButton  jHideB;
-       private JTabbedPane paneToHide;
        public boolean isPanelVisible = true;
        
-       public JStatusBar(JFrame parent, JTabbedPane pane){
+       /**
+        * Create a statusBar with the radio state. ( on / off ).
+        * @param parent
+        */
+       public JStatusBar(JFrame parent){
                super();
-               this.parent = parent;
-               this.paneToHide = pane;
                setLayout(null);
                setSize(parent.getWidth() , 22);
                setPreferredSize(getSize());
@@ -90,73 +85,4 @@
                        status.setIcon(new 
ImageIcon(CcCommons.targetClass.getResource(statusIconPath)));
                }
        }
-       
-       
-       /**
-        * This procedure allow to hide the bottom panel.
-        */
-       public void HideBottomPanel(){
-               
-               if(CcCommons.browserVisible)
-                       return;
-               
-               int width = 0;
-               int height = 0;
-               //Hide panel or show panel.
-               if (!hide_panel_flag) {
-                       this.paneToHide.setVisible(false);
-                       width = parent.getWidth();
-                       height = parent.getHeight() - 
this.paneToHide.getHeight();
-                       setBackground(new Color(150, 150, 150));
-               } else {
-                       this.paneToHide.setVisible(true);
-                       width = parent.getWidth();
-                       height = parent.getHeight() + 
this.paneToHide.getHeight();
-                       setBackground(new Color(217, 217, 217));
-               }
-               parent.setSize(width, height);
-               parent.setPreferredSize(parent.getSize());
-               setLocation(2, parent.getHeight() - 24);
-               hide_panel_flag = !hide_panel_flag;
-       }
-       
-       
-       public boolean isPanelHidden(){
-               return this.hide_panel_flag;
-       }
-       
-       
-       /**
-        * This function initialize the HideButton that allow to mask the 
bottom Panel.
-        * @return jHideButton.
-        */
-       public JButton getHideButton() {
-               if (jHideB == null) {
-                       jHideB = new 
TuxButton("images/buttons/panel_control.png", new Rectangle(1, 1, 20, 20));
-                       jHideB.addMouseListener(new 
java.awt.event.MouseAdapter() {
-                               public void mouseClicked(MouseEvent event) {
-                                       HideBottomPanel();
-                               }
-                       });
-               }
-               return jHideB;
-       }
-       
-       
-       /**
-        * Return properties panel visibility.
-        * @return
-        */
-       public boolean isPanelVisible(){
-               return this.isPanelVisible;
-       }
-       
-       
-       /**
-        * Set the panel visibility.
-        * @param visible
-        */
-       public void setPanelVisible(boolean visible){
-               this.isPanelVisible = visible;
-       }
 }


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to