Coverage details for ui.panel.ICConfigurationPanel

LineHitsSource
1 /*******************************************************************************
2  * InternetCafe is a software solution that helps the management of Cybercafes
3  * according with the ITALIAN DECREE LAW ON ANTI-TERROR MEASURES, 27 JULY 2005.
4  * Copyright (C) 2006 Guido Angelo Ingenito
5  
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  *******************************************************************************/
20 package ui.panel;
21  
22 import java.awt.BorderLayout;
23  
24 import javax.swing.ImageIcon;
25 import javax.swing.JPanel;
26 import javax.swing.JTabbedPane;
27  
28 import ui.Messages;
29 import base.ConfigurationManager;
30 import base.jdbs.ui.JDBSMainPanel;
31  
32 @SuppressWarnings("serial") //$NON-NLS-1$
33 public class ICConfigurationPanel extends JPanel {
34  
35     private JPanel applicationConfigurationPanel;
36  
37     private JPanel backupConfigurationPanel;
38  
39     private JPanel securityConfigurationPanel;
40  
410    private JPanel localConfigurationPanel;
420 
430    private JTabbedPane tabbedPanel;
440 
450    public ICConfigurationPanel() {
460        initialize();
470    }
480 
490    protected void initialize() {
500        this.setLayout(new BorderLayout());
510        this.add(getTabbedPanel(), BorderLayout.CENTER);
520    }
53  
540    /**
550     * @return Returns the applicationConfigurationPanel.
560     */
570    protected JPanel getApplicationConfigurationPanel() {
580        if (applicationConfigurationPanel == null) {
590            applicationConfigurationPanel = new InternetCafeConfigurationPanel();
600        }
610        return applicationConfigurationPanel;
62     }
63  
640    /**
650     * @return Returns the backupConfigurationPanel.
660     */
670    protected JPanel getBackupConfigurationPanel() {
680        if (backupConfigurationPanel == null) {
690            if(ConfigurationManager.getInstance().isJDBSEnabled())
700                backupConfigurationPanel = new JDBSMainPanel();//new BackupConfigurationPanel();
710            else backupConfigurationPanel = new BackupConfigurationPanel();
72         }
730        return backupConfigurationPanel;
740    }
750 
760    /**
770     * @return Returns the securityConfigurationPanel.
780     */
790    protected JPanel getSecurityConfigurationPanel() {
800        if (securityConfigurationPanel == null) {
810            securityConfigurationPanel = new SecurityConfigurationPanel();
82         }
830        return securityConfigurationPanel;
840    }
850 
860    /**
870     * @return Returns the localConfigurationPanel.
880     */
890    protected JPanel getLocalConfigurationPanel() {
900        if (localConfigurationPanel == null) {
910            localConfigurationPanel = new LocalConfigurationPanel();
92         }
930        return localConfigurationPanel;
940    }
950 
960    /**
970     * @return Returns the tabbedPanel.
980     */
990    protected JTabbedPane getTabbedPanel() {
1000        if (tabbedPanel == null) {
1010            tabbedPanel = new JTabbedPane();
1020            tabbedPanel
1030                    .addTab(
1040                            Messages.getString("common.internetcafe"), //$NON-NLS-1$
1050                            new ImageIcon(
1060                                    this
1070                                            .getClass()
1080                                            .getResource(
1090                                                    "/icon/16x16/apps/preferences-desktop-theme.png")), //$NON-NLS-1$
1100                            getApplicationConfigurationPanel(),
1110                            Messages.getString("panel.icconfigurationpanel.managepreference.tooltip")); //$NON-NLS-1$
1120            tabbedPanel.addTab(Messages.getString("common.security"), new ImageIcon(this.getClass() //$NON-NLS-1$
1130                    .getResource("/icon/16x16/emblems/emblem-important.png")), //$NON-NLS-1$
1140                    getSecurityConfigurationPanel(),
1150                    Messages.getString("panel.icconfigurationpanel.managesecurity.tooltip")); //$NON-NLS-1$
1160            tabbedPanel.addTab(Messages.getString("common.backup"), new ImageIcon(this.getClass() //$NON-NLS-1$
1170                    .getResource("/icon/16x16/devices/media-floppy.png")), //$NON-NLS-1$
1180                    getBackupConfigurationPanel(), Messages.getString("panel.icconfigurationpanel.managebackups.tooltip")); //$NON-NLS-1$
1190            tabbedPanel
1200                    .addTab(
1210                            Messages.getString("common.language"), //$NON-NLS-1$
1220                            new ImageIcon(
1230                                    this
124                                             .getClass()
1250                                            .getResource(
1260                                                    "/icon/16x16/apps/preferences-desktop-locale.png")), //$NON-NLS-1$
1270                            getLocalConfigurationPanel(), Messages.getString("panel.icconfigurationpanel.managelanguages.tooltip")); //$NON-NLS-1$
128         }
1290        return tabbedPanel;
130     }
131 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.