Coverage details for ui.panel.ICNetworkPanel

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  
30 @SuppressWarnings("serial") //$NON-NLS-1$
31 public class ICNetworkPanel extends JPanel {
32  
33     private JTabbedPane tabbedPanel;
34  
35     private JPanel clientPanel;
36  
370    private JPanel serverPanel;
380 
390    public ICNetworkPanel() {
400        initialize();
410    }
420 
430    protected void initialize() {
440        this.setName(Messages.getString("common.network")); //$NON-NLS-1$
450        this.setLayout(new BorderLayout());
460        this.add(getTabbedPanel(), BorderLayout.CENTER);
470    }
48  
49     /**
50      * @return Returns the clientPanel.
510     */
520    protected JPanel getClientPanel() {
530        if (clientPanel == null) {
540            clientPanel = new TabledClientWorkstationPanel();
55         }
560        return clientPanel;
57     }
58  
59     /**
60      * @return Returns the serverPanel.
610     */
620    protected JPanel getServerPanel() {
630        if (serverPanel == null) {
640            serverPanel = new TabledServerWorkstationPanel();
65         }
660        return serverPanel;
67     }
68  
69     /**
70      * @return Returns the tabbedPanel.
710     */
720    protected JTabbedPane getTabbedPanel() {
730        if (tabbedPanel == null) {
740            tabbedPanel = new JTabbedPane();
750            tabbedPanel.addTab(Messages.getString("common.clientworkstations"), //$NON-NLS-1$
760                    new ImageIcon(this.getClass().getResource(
770                            "/icon/16x16/devices/computer.png")), //$NON-NLS-1$
780                    getClientPanel(), Messages.getString("panel.icnetworkpanel.manageclientworkstations")); //$NON-NLS-1$
790            tabbedPanel.addTab(Messages.getString("common.serverworkstations"), new ImageIcon(this //$NON-NLS-1$
800                    .getClass().getResource(
810                            "/icon/16x16/places/network-server.png")), //$NON-NLS-1$
820                    getServerPanel(), Messages.getString("panel.icnetworkpanel.manageserverworkstations")); //$NON-NLS-1$
83         }
840        return tabbedPanel;
85     }
86 }

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.