Subsections

Creating Your Own Panels

How It Works

What You Need

First you have to read the NanoXML documentation if you need to use XML in your panel. Secondly, it is necessary that you use the Javadoc-generated class references. We will just explain here briefly how to start making your panels.

It is a good idea to read the source code of some IzPack panels. They are usually very small, which makes it easier to understand how to write your own.

What You Have To Do

Extending IZPACK with a panel is quite simple. A panel used with IZPACK must be a subclass of IzPanel. The IzPanel class is located in the com.izforge.izpack.installer package but your panels need to belong to com.izforge.izpack.panels.

Things will get a good deal easier if you build IzPack with Jakarta Ant. Simply add your class in the source tree and add the And directives to build your own panels. In this way you'll be able to focus on your code :-)

The IzPanel Class

UML Diagram

\fbox{\includegraphics[scale=0.5]{img/ch5-izpanel}}

Description

The data members are : the install data (refer to the InstallData Javadoc reference) and a reference to the parent installer frame. Additional there are the initialFocus Component and some members for handling the grid bag constraint.

The methods have the following functionality :

Additional there are some helper methods to simplify grid bag layout handling and creation of some common used components.

Julien Ponge 2005-04-22