Commit 89c07516 authored by Christophe Demarey's avatar Christophe Demarey
Browse files

Backport to be java 1.5 compliant.

parent cbc75393
......@@ -47,4 +47,11 @@
<composite.file>soap-calc</composite.file>
</properties>
<dependencies>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swing-layout</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
</project>
......@@ -29,11 +29,11 @@ package org.ow2.frascati.examples.soapcalc.explorer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.GroupLayout;
import org.jdesktop.layout.GroupLayout;
import org.jdesktop.layout.LayoutStyle;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import org.ow2.frascati.examples.soapcalc.api.CalcService;
import org.ow2.frascati.explorer.gui.AbstractSelectionPanel;
......@@ -97,83 +97,83 @@ public class CalculatorPanel extends AbstractSelectionPanel<CalcService> {
GroupLayout mainPanelLayout = new GroupLayout(this);
this.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jTextField4, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3))
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jTextField8, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel7))
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jTextField6, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5))
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jTextField1, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.CENTER)
.addComponent(jTextField7, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField5, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField3, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jButtonSub)
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabelSubResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jButtonDiv)
.addGap(18, 18, 18)
.addComponent(jLabelDivResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jButtonMult)
.addGap(18, 18, 18)
.addComponent(jLabelMultResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(jButtonAdd)
.addGap(18, 18, 18)
.addComponent(jLabelAddResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE)))
.add(mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(jTextField4, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(jLabel3))
.add(mainPanelLayout.createSequentialGroup()
.add(jTextField8, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(jLabel7))
.add(mainPanelLayout.createSequentialGroup()
.add(jTextField6, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(jLabel5))
.add(mainPanelLayout.createSequentialGroup()
.add(jTextField1, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(jLabel1)))
.addPreferredGap(LayoutStyle.RELATED)
.add(mainPanelLayout.createParallelGroup(GroupLayout.CENTER)
.add(jTextField7, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.add(jTextField5, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.add(jTextField3, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
.add(jTextField2, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE))
.add(12, 12, 12)
.add(mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(jButtonSub)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(jLabelSubResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
.add(mainPanelLayout.createSequentialGroup()
.add(jButtonDiv)
.add(18, 18, 18)
.add(jLabelDivResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
.add(mainPanelLayout.createSequentialGroup()
.add(jButtonMult)
.add(18, 18, 18)
.add(jLabelMultResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE))
.add(mainPanelLayout.createSequentialGroup()
.add(jButtonAdd)
.add(18, 18, 18)
.add(jLabelAddResult, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE)))
.addContainerGap(178, Short.MAX_VALUE))
);
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(14, 14, 14)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(jTextField1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addComponent(jButtonAdd)
.addComponent(jLabelAddResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(jTextField4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3)
.addComponent(jLabelSubResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.addComponent(jButtonSub)
.addComponent(jTextField3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(jTextField6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5)
.addComponent(jButtonMult)
.addComponent(jLabelMultResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(jTextField8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7)
.addComponent(jButtonDiv)
.addComponent(jLabelDivResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(14, 14, 14)
.add(mainPanelLayout.createParallelGroup(GroupLayout.BASELINE)
.add(jTextField1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(jLabel1)
.add(jButtonAdd)
.add(jLabelAddResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.add(jTextField2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(mainPanelLayout.createParallelGroup(GroupLayout.BASELINE)
.add(jTextField4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(jLabel3)
.add(jLabelSubResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.add(jButtonSub)
.add(jTextField3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(mainPanelLayout.createParallelGroup(GroupLayout.BASELINE)
.add(jTextField6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(jLabel5)
.add(jButtonMult)
.add(jLabelMultResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.add(jTextField5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(mainPanelLayout.createParallelGroup(GroupLayout.BASELINE)
.add(jTextField8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(jLabel7)
.add(jButtonDiv)
.add(jLabelDivResult, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
.add(jTextField7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(259, Short.MAX_VALUE))
);
......
......@@ -75,6 +75,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swing-layout</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
</project>
......@@ -68,32 +68,32 @@ public class VerifierPanel extends AbstractSelectionPanel<Verifier> {
);
// layout
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(this);
org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(26, 26, 26)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(button)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(list, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(textField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(result))
mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(26, 26, 26)
.add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
.add(button)
.add(mainPanelLayout.createSequentialGroup()
.add(list, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 80, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(textField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(result))
.addContainerGap(21, Short.MAX_VALUE))
);
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(textField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(list, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(button)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(result)
mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(32, 32, 32)
.add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
.add(textField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(list, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(18, 18, 18)
.add(button)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(result)
.addContainerGap(32, Short.MAX_VALUE))
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment