[izpack-changes] r1516 - in izpack-src/trunk/src/lib/com/izforge/izpack: installer panels

noreply at berlios.de noreply at berlios.de
Mon Aug 7 09:36:56 CEST 2006


Author: bartzkau
Date: 2006-08-07 09:36:53 +0200 (Mon, 07 Aug 2006)
New Revision: 1516

Modified:
   izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java
   izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
Log:
No direct access on defaultGridBagConstraint else via
getter because layout handling was moved to the 
LayoutHelper.


Modified: izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java	2006-08-07 06:51:02 UTC (rev 1515)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/installer/IzPanel.java	2006-08-07 07:36:53 UTC (rev 1516)
@@ -20,6 +20,7 @@
 package com.izforge.izpack.installer;
 
 import com.izforge.izpack.gui.LabelFactory;
+import com.izforge.izpack.gui.LayoutConstants;
 import com.izforge.izpack.util.AbstractUIHandler;
 import com.izforge.izpack.util.Debug;
 import com.izforge.izpack.util.MultiLineLabel;
@@ -46,7 +47,7 @@
  * @author Julien Ponge
  * @author Klaus Bartz
  */
-public class IzPanel extends JPanel implements AbstractUIHandler
+public class IzPanel extends JPanel implements AbstractUIHandler, LayoutConstants
 {
 
     private static final long serialVersionUID = 3256442495255786038L;
@@ -103,8 +104,6 @@
     /** ROWS_1 = 1 */
     public final static int ROWS_1 = 1;
 
-    protected GridBagConstraints defaultGridBagConstraints;
-
     /**
      * The constructor.
      * 

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java	2006-08-07 06:51:02 UTC (rev 1515)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java	2006-08-07 07:36:53 UTC (rev 1516)
@@ -22,6 +22,7 @@
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
 import java.awt.Insets;
+import java.awt.LayoutManager2;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
@@ -440,7 +441,11 @@
         super(parent, installData, "link16x16");
 
         layout = (GridBagLayout) super.getLayout();
-        constraints = super.defaultGridBagConstraints;
+        Object con = getLayoutHelper().getDefaultConstraints();
+        if( con instanceof GridBagConstraints)
+            constraints = (GridBagConstraints) con;
+        else 
+            con = new GridBagConstraints();
         setLayout(super.getLayout());
     }
 




More information about the izpack-changes mailing list