01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Copyright 2002 Marcus Wolschon
08: * Copyright 2002 Jan Blok
09: *
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;
26:
27: import javax.swing.Box;
28: import javax.swing.BoxLayout;
29: import javax.swing.JScrollPane;
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: private static final long serialVersionUID = 4051327842505668403L;
49:
50: /**
51: * The constructor.
52: *
53: * @param parent The parent window.
54: * @param idata The installation data.
55: */
56: public PacksPanel(InstallerFrame parent, InstallData idata) {
57: super (parent, idata);
58: }
59:
60: /*
61: * (non-Javadoc)
62: *
63: * @see com.izforge.izpack.panels.PacksPanelBase#createNormalLayout()
64: */
65: protected void createNormalLayout() {
66: setLayout(new BoxLayout(this , BoxLayout.Y_AXIS));
67: createLabel("PacksPanel.info", "preferences", null, null);
68: add(Box.createRigidArea(new Dimension(0, 3)));
69: createLabel("PacksPanel.tip", "tip", null, null);
70: add(Box.createRigidArea(new Dimension(0, 5)));
71: tableScroller = new JScrollPane();
72: packsTable = createPacksTable(300, tableScroller, null, null);
73: if (dependenciesExist)
74: dependencyArea = createTextArea(
75: "PacksPanel.dependencyList", null, null, null);
76: descriptionArea = createTextArea("PacksPanel.description",
77: null, null, null);
78: spaceLabel = createPanelWithLabel("PacksPanel.space", null,
79: null);
80: if (IoHelper.supported("getFreeSpace")) {
81: add(Box.createRigidArea(new Dimension(0, 3)));
82: freeSpaceLabel = createPanelWithLabel(
83: "PacksPanel.freespace", null, null);
84: }
85: }
86:
87: }
|