KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > panels > PacksPanel


1 /*
2  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
3  *
4  * http://www.izforge.com/izpack/
5  * http://developer.berlios.de/projects/izpack/
6  *
7  * Copyright 2002 Marcus Wolschon
8  * Copyright 2002 Jan Blok
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */

22
23 package com.izforge.izpack.panels;
24
25 import java.awt.Dimension JavaDoc;
26
27 import javax.swing.Box JavaDoc;
28 import javax.swing.BoxLayout JavaDoc;
29 import javax.swing.JScrollPane JavaDoc;
30
31 import com.izforge.izpack.installer.InstallData;
32 import com.izforge.izpack.installer.InstallerFrame;
33 import com.izforge.izpack.util.IoHelper;
34
35 /**
36  * The packs selection panel class. This class handles only the layout. Common stuff are handled by
37  * the base class.
38  *
39  * @author Julien Ponge
40  * @author Jan Blok
41  * @author Klaus Bartz
42  */

43 public class PacksPanel extends PacksPanelBase
44 {
45
46     /**
47      *
48      */

49     private static final long serialVersionUID = 4051327842505668403L;
50
51     /**
52      * The constructor.
53      *
54      * @param parent The parent window.
55      * @param idata The installation data.
56      */

57     public PacksPanel(InstallerFrame parent, InstallData idata)
58     {
59         super(parent, idata);
60     }
61
62     /*
63      * (non-Javadoc)
64      *
65      * @see com.izforge.izpack.panels.PacksPanelBase#createNormalLayout()
66      */

67     protected void createNormalLayout()
68     {
69         setLayout(new BoxLayout JavaDoc(this, BoxLayout.Y_AXIS));
70         createLabel("PacksPanel.info", "preferences", null, null);
71         add(Box.createRigidArea(new Dimension JavaDoc(0, 3)));
72         createLabel("PacksPanel.tip", "tip", null, null);
73         add(Box.createRigidArea(new Dimension JavaDoc(0, 5)));
74         tableScroller = new JScrollPane JavaDoc();
75         packsTable = createPacksTable(300, tableScroller, null, null);
76         if (dependenciesExist)
77             dependencyArea = createTextArea("PacksPanel.dependencyList", null, null, null);
78         descriptionArea = createTextArea("PacksPanel.description", null, null, null);
79         spaceLabel = createPanelWithLabel("PacksPanel.space", null, null);
80         if (IoHelper.supported("getFreeSpace"))
81         {
82             add(Box.createRigidArea(new Dimension JavaDoc(0, 3)));
83             freeSpaceLabel = createPanelWithLabel("PacksPanel.freespace", null, null);
84         }
85     }
86
87 }
88
Popular Tags