001/*
002 * IzPack - Copyright 2001-2005 Julien Ponge, All Rights Reserved.
003 * 
004 * http://www.izforge.com/izpack/
005 * http://developer.berlios.de/projects/izpack/
006 * 
007 * Copyright 2002 Marcus Wolschon
008 * Copyright 2002 Jan Blok
009 * 
010 * Licensed under the Apache License, Version 2.0 (the "License");
011 * you may not use this file except in compliance with the License.
012 * You may obtain a copy of the License at
013 * 
014 *     http://www.apache.org/licenses/LICENSE-2.0
015 *     
016 * Unless required by applicable law or agreed to in writing, software
017 * distributed under the License is distributed on an "AS IS" BASIS,
018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019 * See the License for the specific language governing permissions and
020 * limitations under the License.
021 */
022
023package com.izforge.izpack.panels;
024
025import java.awt.Dimension;
026
027import javax.swing.Box;
028import javax.swing.BoxLayout;
029import javax.swing.JScrollPane;
030
031import com.izforge.izpack.installer.InstallData;
032import com.izforge.izpack.installer.InstallerFrame;
033import com.izforge.izpack.util.IoHelper;
034
035/**
036 * The packs selection panel class. This class handles only the layout. Common stuff are handled by
037 * the base class.
038 * 
039 * @author Julien Ponge
040 * @author Jan Blok
041 * @author Klaus Bartz
042 */
043public class PacksPanel extends PacksPanelBase
044{
045
046    /**
047     * 
048     */
049    private static final long serialVersionUID = 4051327842505668403L;
050
051    /**
052     * The constructor.
053     * 
054     * @param parent The parent window.
055     * @param idata The installation data.
056     */
057    public PacksPanel(InstallerFrame parent, InstallData idata)
058    {
059        super(parent, idata);
060    }
061
062    /*
063     * (non-Javadoc)
064     * 
065     * @see com.izforge.izpack.panels.PacksPanelBase#createNormalLayout()
066     */
067    protected void createNormalLayout()
068    {
069        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
070        createLabel("PacksPanel.info", "preferences", null, null);
071        add(Box.createRigidArea(new Dimension(0, 3)));
072        createLabel("PacksPanel.tip", "tip", null, null);
073        add(Box.createRigidArea(new Dimension(0, 5)));
074        tableScroller = new JScrollPane();
075        packsTable = createPacksTable(300, tableScroller, null, null);
076        if (dependenciesExist)
077            dependencyArea = createTextArea("PacksPanel.dependencyList", null, null, null);
078        descriptionArea = createTextArea("PacksPanel.description", null, null, null);
079        spaceLabel = createPanelWithLabel("PacksPanel.space", null, null);
080        if (IoHelper.supported("getFreeSpace"))
081        {
082            add(Box.createRigidArea(new Dimension(0, 3)));
083            freeSpaceLabel = createPanelWithLabel("PacksPanel.freespace", null, null);
084        }
085    }
086
087}