Line | Hits | Source |
---|---|---|
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 | ||
41 | 0 | private JPanel localConfigurationPanel; |
42 | 0 | |
43 | 0 | private JTabbedPane tabbedPanel; |
44 | 0 | |
45 | 0 | public ICConfigurationPanel() { |
46 | 0 | initialize(); |
47 | 0 | } |
48 | 0 | |
49 | 0 | protected void initialize() { |
50 | 0 | this.setLayout(new BorderLayout()); |
51 | 0 | this.add(getTabbedPanel(), BorderLayout.CENTER); |
52 | 0 | } |
53 | ||
54 | 0 | /** |
55 | 0 | * @return Returns the applicationConfigurationPanel. |
56 | 0 | */ |
57 | 0 | protected JPanel getApplicationConfigurationPanel() { |
58 | 0 | if (applicationConfigurationPanel == null) { |
59 | 0 | applicationConfigurationPanel = new InternetCafeConfigurationPanel(); |
60 | 0 | } |
61 | 0 | return applicationConfigurationPanel; |
62 | } | |
63 | ||
64 | 0 | /** |
65 | 0 | * @return Returns the backupConfigurationPanel. |
66 | 0 | */ |
67 | 0 | protected JPanel getBackupConfigurationPanel() { |
68 | 0 | if (backupConfigurationPanel == null) { |
69 | 0 | if(ConfigurationManager.getInstance().isJDBSEnabled()) |
70 | 0 | backupConfigurationPanel = new JDBSMainPanel();//new BackupConfigurationPanel(); |
71 | 0 | else backupConfigurationPanel = new BackupConfigurationPanel(); |
72 | } | |
73 | 0 | return backupConfigurationPanel; |
74 | 0 | } |
75 | 0 | |
76 | 0 | /** |
77 | 0 | * @return Returns the securityConfigurationPanel. |
78 | 0 | */ |
79 | 0 | protected JPanel getSecurityConfigurationPanel() { |
80 | 0 | if (securityConfigurationPanel == null) { |
81 | 0 | securityConfigurationPanel = new SecurityConfigurationPanel(); |
82 | } | |
83 | 0 | return securityConfigurationPanel; |
84 | 0 | } |
85 | 0 | |
86 | 0 | /** |
87 | 0 | * @return Returns the localConfigurationPanel. |
88 | 0 | */ |
89 | 0 | protected JPanel getLocalConfigurationPanel() { |
90 | 0 | if (localConfigurationPanel == null) { |
91 | 0 | localConfigurationPanel = new LocalConfigurationPanel(); |
92 | } | |
93 | 0 | return localConfigurationPanel; |
94 | 0 | } |
95 | 0 | |
96 | 0 | /** |
97 | 0 | * @return Returns the tabbedPanel. |
98 | 0 | */ |
99 | 0 | protected JTabbedPane getTabbedPanel() { |
100 | 0 | if (tabbedPanel == null) { |
101 | 0 | tabbedPanel = new JTabbedPane(); |
102 | 0 | tabbedPanel |
103 | 0 | .addTab( |
104 | 0 | Messages.getString("common.internetcafe"), //$NON-NLS-1$ |
105 | 0 | new ImageIcon( |
106 | 0 | this |
107 | 0 | .getClass() |
108 | 0 | .getResource( |
109 | 0 | "/icon/16x16/apps/preferences-desktop-theme.png")), //$NON-NLS-1$ |
110 | 0 | getApplicationConfigurationPanel(), |
111 | 0 | Messages.getString("panel.icconfigurationpanel.managepreference.tooltip")); //$NON-NLS-1$ |
112 | 0 | tabbedPanel.addTab(Messages.getString("common.security"), new ImageIcon(this.getClass() //$NON-NLS-1$ |
113 | 0 | .getResource("/icon/16x16/emblems/emblem-important.png")), //$NON-NLS-1$ |
114 | 0 | getSecurityConfigurationPanel(), |
115 | 0 | Messages.getString("panel.icconfigurationpanel.managesecurity.tooltip")); //$NON-NLS-1$ |
116 | 0 | tabbedPanel.addTab(Messages.getString("common.backup"), new ImageIcon(this.getClass() //$NON-NLS-1$ |
117 | 0 | .getResource("/icon/16x16/devices/media-floppy.png")), //$NON-NLS-1$ |
118 | 0 | getBackupConfigurationPanel(), Messages.getString("panel.icconfigurationpanel.managebackups.tooltip")); //$NON-NLS-1$ |
119 | 0 | tabbedPanel |
120 | 0 | .addTab( |
121 | 0 | Messages.getString("common.language"), //$NON-NLS-1$ |
122 | 0 | new ImageIcon( |
123 | 0 | this |
124 | .getClass() | |
125 | 0 | .getResource( |
126 | 0 | "/icon/16x16/apps/preferences-desktop-locale.png")), //$NON-NLS-1$ |
127 | 0 | getLocalConfigurationPanel(), Messages.getString("panel.icconfigurationpanel.managelanguages.tooltip")); //$NON-NLS-1$ |
128 | } | |
129 | 0 | return tabbedPanel; |
130 | } | |
131 | } |
this report was generated by version 1.0.5 of jcoverage. |
copyright © 2003, jcoverage ltd. all rights reserved. |