You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by th...@apache.org on 2006/10/19 13:47:52 UTC

svn commit: r465584 [3/3] - in /webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache: axis2/tools/bean/ axis2/tools/idea/ ideaplugin/frames/

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java?view=diff&rev=465584&r1=465583&r2=465584
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java Thu Oct 19 04:47:51 2006
@@ -1,299 +1,338 @@
-package org.apache.ideaplugin.frames;
-
-import org.apache.ideaplugin.bean.ArchiveBean;
-import org.apache.ideaplugin.bean.ObjectKeeper;
-import org.apache.ideaplugin.bean.OperationObj;
-import org.apache.ideaplugin.bean.ServiceObj;
-import org.apache.ideaplugin.frames.table.ArchiveTableModel;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Sep 18, 2005
- * Time: 9:11:54 PM
- */
-public class SelectPanel extends JPanel implements ObjectKeeper, ActionListener {
-
-    protected JLabel lblClass;
-    protected JLabel lblServiceNam;
-    protected JTextField txtClassDir;
-    protected JTextField txtServiceName;
-    protected JButton butSelect;
-    protected JButton butDone;
-    protected JButton load;
-    protected JScrollPane sp;
-    protected JLabel tablelbl;
-
-    private JPanel previous;
-    protected File file;
-    protected Insets insets;
-    protected ServiceArciveFrame parent;
-    protected String fileName;
-    protected int count = 1;
-    protected HashMap operations;
-    protected ArrayList servicelsit = new ArrayList();
-    protected DescriptorFile disfile;
-    protected String sgXMl;
-
-    public SelectPanel(ServiceArciveFrame parent, File file) {
-        this.parent = parent;
-        this.file = file;
-
-        setFont(new Font("Helvetica", Font.PLAIN, 12));
-        this.setLayout(null);
-
-        insets = parent.getInsets();
-
-        lblClass = new JLabel("Select Service Classes");
-        add(lblClass);
-        lblClass.setBounds(insets.left + 8, insets.top + 2, 150, 24);
-
-        txtClassDir = new JTextField("");
-        add(txtClassDir);
-        txtClassDir.setBounds(insets.left + 150, insets.top + 2, 336, 24);
-
-        butSelect = new JButton(" ... ");
-        add(butSelect);
-        butSelect.addActionListener(this);
-        butSelect.setBounds(insets.left + 487, insets.top + 2, 10, 24);
-
-
-        load = new JButton(" Load ");
-        add(load);
-        load.addActionListener(this);
-        load.setBounds(insets.left + 502, insets.top + 2, 70, 24);
-
-        butDone = new JButton("Done");
-        butDone.addActionListener(this);
-        add(butDone);
-        butDone.setBounds(insets.left + 250, insets.top + 185, 70, 24);
-        lblServiceNam = new JLabel("Service Name : ");
-        add(lblServiceNam);
-        lblServiceNam.setBounds(insets.left + 10, insets.top + 185, 100, 24);
-        txtServiceName = new JTextField("");
-        add(txtServiceName);
-        txtServiceName.setBounds(insets.left + 115, insets.top + 185, 120, 24);
-        butDone.setVisible(false);
-        lblServiceNam.setVisible(false);
-        txtServiceName.setVisible(false);
-        setSize(getPreferredSize());
-    }
-
-    public void fillBean(ArchiveBean bean) {
-        bean.setServiceXML(sgXMl);
-    }
-
-    //to keep a refernce to next panel
-    public void setNext(JPanel next) {
-        //no one call this
-    }
-
-    public JPanel getNext() {
-        return disfile;
-    }
-
-    //to keep a refernce to previous panel
-    public void setPrivious(JPanel privious) {
-        this.previous = privious;
-    }
-
-    public JPanel getPrivious() {
-        return this.previous;
-    }
-
-    public void actionPerformed(ActionEvent e) {
-        Object obj = e.getSource();
-        if (obj == butSelect) {
-            parent.fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
-            int returnVal = parent.fc.showOpenDialog(this);
-            if (returnVal == JFileChooser.APPROVE_OPTION) {
-                File newfile = parent.fc.getSelectedFile();
-                String newFile = newfile.getPath();
-                int index = newFile.indexOf(file.getAbsolutePath().trim());
-                if (index >= 0) {
-                    int lastindex = file.getAbsolutePath().trim().length();
-                    newFile = newFile.substring(lastindex + 1);
-                    char ch = parent.fileSeparator.toCharArray()[0];
-                    char newch = '.';
-                    int cindex = newFile.indexOf(ch);
-                    while (cindex >= 0) {
-                        newFile = newFile.replace(ch, newch);
-                        cindex = newFile.indexOf(ch);
-                    }
-                    fileName = newFile;
-                    int classIndex = fileName.indexOf(".class");
-                    fileName = fileName.substring(0, classIndex);
-                    txtClassDir.setText(fileName);
-                }
-            }
-        } else if (obj == load) {
-            if (file == null) {
-                return;
-            }
-            try {
-                try {
-                    this.remove(sp);
-                    this.remove(tablelbl);
-                    butDone.setVisible(false);
-                    lblServiceNam.setVisible(false);
-                    txtServiceName.setVisible(false);
-                } catch (Exception e1) {
-//                    e1.printStackTrace();
-                }
-
-//                ClassLoader classLoader = new URLClassLoader(
-//                        new URL[]{file.toURL()},SelectPanel.class.getClassLoader());
-
-                ClassLoader classLoader = parent.bean.getClassLoader();
-                Class serCla = Class.forName(fileName, true, classLoader);
-                Method[] methods = serCla.getDeclaredMethods();
-                operations = new HashMap();
-                if (methods.length > 0) {
-                    for (int i = 0; i < methods.length; i++) {
-                        Method method = methods[i];
-                        OperationObj operationobj = new OperationObj(method.getName(),
-                                method.getReturnType().toString(),
-                                new Integer(method.getParameterTypes().length), new Boolean(false));
-                        operations.put(method.getName(), operationobj);
-                    }
-                }
-
-                ArchiveTableModel myModel = new ArchiveTableModel(operations);
-                JTable table = new JTable(myModel);
-                tablelbl = new JLabel("Mark operation you do not want to publish ");
-                add(tablelbl);
-                tablelbl.setBounds(insets.left + 10, insets.top + 45, 400, 24);
-
-                sp = new JScrollPane(table);
-                add(sp);
-                sp.setAutoscrolls(true);
-                sp.setBounds(insets.left + 10, insets.top + 75, 550, 100);
-                txtServiceName.setText("MyService" + count);
-                butDone.setVisible(true);
-                lblServiceNam.setVisible(true);
-                txtServiceName.setVisible(true);
-            } catch (ClassNotFoundException e1) {
-                e1.printStackTrace();
-            }
-            parent.reShow();
-
-        } else if (obj == butDone) {
-
-            ArrayList ops = new ArrayList();
-            Iterator opitr = operations.values().iterator();
-            while (opitr.hasNext()) {
-                OperationObj operationObj = (OperationObj) opitr.next();
-                if (operationObj.getSelect().booleanValue()) {
-                    ops.add(operationObj.getOpName());
-                }
-            }
-
-            ServiceObj service = new ServiceObj(txtServiceName.getText(), fileName, ops);
-            servicelsit.add(service);
-            if (!parent.singleService) {
-                int valu = JOptionPane.showConfirmDialog(parent, "Do you want to add an another service to group", "Service Archive",
-                        JOptionPane.YES_NO_OPTION);
-                if (valu == 0) {
-                    txtClassDir.setText("");
-                    fileName = "";
-                    try {
-                        this.remove(sp);
-                        this.remove(tablelbl);
-                        butDone.setVisible(false);
-                        lblServiceNam.setVisible(false);
-                        txtServiceName.setVisible(false);
-                    } catch (Exception e1) {
-//                    e1.printStackTrace();
-                    }
-                    count++;
-                    parent.reShow();
-                    this.repaint();
-                } else {
-                    parent.setEnable(false, true, false, true);
-                    sgXMl = "<serviceGroup>\n";
-                    for (int i = 0; i < servicelsit.size(); i++) {
-                        ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
-                        sgXMl = sgXMl + serviceObj.toString();
-                    }
-                    sgXMl = sgXMl + "</serviceGroup>";
-                    disfile = new DescriptorFile(parent, sgXMl);
-                    disfile.setPrivious(this);
-                }
-            } else {
-                parent.setEnable(false, true, false, true);
-                sgXMl = "<serviceGroup>\n";
-                for (int i = 0; i < servicelsit.size(); i++) {
-                    ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
-                    sgXMl = sgXMl + serviceObj.toString();
-                }
-                sgXMl = sgXMl + "</serviceGroup>";
-                disfile = new DescriptorFile(parent, sgXMl);
-                disfile.setPrivious(this);
-            }
-
-//            int valu = JOptionPane.showConfirmDialog(parent,"Do you want to add an another service to group","Service Archive",
-//                    JOptionPane.YES_NO_OPTION);
-//            if(valu == 0){
-//                txtClassDir.setText("");
-//                fileName = "";
-//                try {
-//                    this.remove(sp);
-//                    this.remove(tablelbl);
-//                    butDone.setVisible(false);
-//                    lblServiceNam.setVisible(false);
-//                    txtServiceName.setVisible(false);
-//                } catch (Exception e1) {
-////                    e1.printStackTrace();
-//                }
-//                count ++;
-//                parent.reShow();
-//                this.repaint();
-//            } else {
-//                parent.setEnable(false,true,false,true);
-//                sgXMl = "<serviceGroup>\n";
-//                for (int i = 0; i < servicelsit.size(); i++) {
-//                    ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
-//                    sgXMl = sgXMl + serviceObj.toString();
-//                }
-//                sgXMl = sgXMl + "</serviceGroup>";
-//                disfile = new DescriptorFile(parent,sgXMl);
-//                disfile.setPrivious(this);
-//            }
-        }
-    }
-
-    public String getTopLable() {
-        return "Service class and operation selection";
-    }
-
-    public String getLable() {
-        return "First select service class and load its method operations";
-    }
-}
-
+package org.apache.ideaplugin.frames;
+
+import org.apache.ideaplugin.bean.ArchiveBean;
+import org.apache.ideaplugin.bean.ObjectKeeper;
+import org.apache.ideaplugin.bean.OperationObj;
+import org.apache.ideaplugin.bean.ServiceObj;
+import org.apache.ideaplugin.frames.table.ArchiveTableModel;
+
+import javax.swing.*;
+import javax.swing.filechooser.FileFilter;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Sep 18, 2005
+ * Time: 9:11:54 PM
+ */
+public class SelectPanel extends JPanel implements ObjectKeeper, ActionListener {
+
+    protected JLabel lblClass;
+    protected JLabel lblServiceNam;
+    protected JTextField txtClassDir;
+    protected JTextField txtServiceName;
+    protected JButton butSelect;
+    protected JButton butDone;
+    protected JButton load;
+    protected JScrollPane sp;
+    protected JLabel tablelbl;
+
+    private JPanel previous;
+    protected File file;
+    protected Insets insets;
+    protected ServiceArciveFrame parent;
+    protected String fileName;
+    protected int count = 1;
+    protected HashMap operations;
+    protected ArrayList servicelsit = new ArrayList();
+    protected DescriptorFile disfile;
+    protected String sgXMl;
+
+    public SelectPanel(ServiceArciveFrame parent, File file) {
+        this.parent = parent;
+        this.file = file;
+
+        setFont(new Font("Helvetica", Font.PLAIN, 12));
+        this.setLayout(null);
+
+        insets = parent.getInsets();
+
+        lblClass = new JLabel("Select Service Classes");
+        add(lblClass);
+        lblClass.setBounds(insets.left + 8, insets.top + 2, 150, 24);
+
+        txtClassDir = new JTextField("");
+        add(txtClassDir);
+        txtClassDir.setBounds(insets.left + 150, insets.top + 2, 336, 24);
+
+        butSelect = new JButton(" ... ");
+        add(butSelect);
+        butSelect.addActionListener(this);
+        butSelect.setBounds(insets.left + 487, insets.top + 2, 10, 24);
+
+
+        load = new JButton(" Load ");
+        add(load);
+        load.addActionListener(this);
+        load.setBounds(insets.left + 502, insets.top + 2, 70, 24);
+
+        butDone = new JButton("Done");
+        butDone.addActionListener(this);
+        add(butDone);
+        butDone.setBounds(insets.left + 250, insets.top + 185, 70, 24);
+        lblServiceNam = new JLabel("Service Name : ");
+        add(lblServiceNam);
+        lblServiceNam.setBounds(insets.left + 10, insets.top + 185, 100, 24);
+        txtServiceName = new JTextField("");
+        add(txtServiceName);
+        txtServiceName.setBounds(insets.left + 115, insets.top + 185, 120, 24);
+        butDone.setVisible(false);
+        lblServiceNam.setVisible(false);
+        txtServiceName.setVisible(false);
+        setSize(getPreferredSize());
+        parent.fc.setFileFilter(new ClassFileFilter());
+    }
+
+    public void fillBean(ArchiveBean bean) {
+        bean.setServiceXML(sgXMl);
+    }
+
+    //to keep a refernce to next panel
+    public void setNext(JPanel next) {
+        //no one call this
+    }
+
+    public JPanel getNext() {
+        return disfile;
+    }
+
+    //to keep a refernce to previous panel
+    public void setPrivious(JPanel privious) {
+        this.previous = privious;
+    }
+
+    public JPanel getPrivious() {
+        return this.previous;
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        Object obj = e.getSource();
+        if (obj == butSelect) {
+            parent.fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
+            int returnVal = parent.fc.showOpenDialog(this);
+            if (returnVal == JFileChooser.APPROVE_OPTION) {
+
+                File newfile = parent.fc.getSelectedFile();
+                String newFile = newfile.getPath();
+                int index = newFile.indexOf(file.getAbsolutePath().trim());
+                if (index >= 0) {
+                    int lastindex = file.getAbsolutePath().trim().length();
+                    newFile = newFile.substring(lastindex + 1);
+                    char ch = parent.fileSeparator.toCharArray()[0];
+                    char newch = '.';
+                    int cindex = newFile.indexOf(ch);
+                    while (cindex >= 0) {
+                        newFile = newFile.replace(ch, newch);
+                        cindex = newFile.indexOf(ch);
+                    }
+                    fileName = newFile;
+                    int classIndex = fileName.lastIndexOf(".");
+                    fileName = fileName.substring(0, classIndex);
+                    txtClassDir.setText(fileName);
+
+
+                }
+            }
+        } else if (obj == load) {
+            if (file == null) {
+                return;
+            }
+            try {
+                try {
+                    this.remove(sp);
+                    this.remove(tablelbl);
+                    butDone.setVisible(false);
+                    lblServiceNam.setVisible(false);
+                    txtServiceName.setVisible(false);
+                } catch (Exception e1) {
+//                    e1.printStackTrace();
+                }
+
+//                ClassLoader classLoader = new URLClassLoader(
+//                        new URL[]{file.toURL()},SelectPanel.class.getClassLoader());
+
+                ClassLoader classLoader = parent.bean.getClassLoader();
+                Class serCla = Class.forName(fileName, true, classLoader);
+                Method[] methods = serCla.getDeclaredMethods();
+                operations = new HashMap();
+                if (methods.length > 0) {
+                    for (int i = 0; i < methods.length; i++) {
+                        Method method = methods[i];
+                        OperationObj operationobj = new OperationObj(method.getName(),
+                                method.getReturnType().toString(),
+                                new Integer(method.getParameterTypes().length), new Boolean(false));
+                        operations.put(method.getName(), operationobj);
+                    }
+                }
+
+                ArchiveTableModel myModel = new ArchiveTableModel(operations);
+                JTable table = new JTable(myModel);
+                tablelbl = new JLabel("Mark operation you do not want to publish ");
+                add(tablelbl);
+                tablelbl.setBounds(insets.left + 10, insets.top + 45, 400, 24);
+
+                sp = new JScrollPane(table);
+                add(sp);
+                sp.setAutoscrolls(true);
+                sp.setBounds(insets.left + 10, insets.top + 75, 550, 100);
+                txtServiceName.setText("MyService" + count);
+                butDone.setVisible(true);
+                lblServiceNam.setVisible(true);
+                txtServiceName.setVisible(true);
+            } catch (ClassNotFoundException e1) {
+                JOptionPane.showMessageDialog(parent, "The specified file is not a valid java class",
+                            "Error!", JOptionPane.ERROR_MESSAGE);
+            }
+            parent.repaint();
+
+        } else if (obj == butDone) {
+
+            ArrayList ops = new ArrayList();
+            Iterator opitr = operations.values().iterator();
+            while (opitr.hasNext()) {
+                OperationObj operationObj = (OperationObj) opitr.next();
+                if (operationObj.getSelect().booleanValue()) {
+                    ops.add(operationObj.getOpName());
+                }
+            }
+
+            ServiceObj service = new ServiceObj(txtServiceName.getText(), fileName, ops);
+            servicelsit.add(service);
+            if (!parent.singleService) {
+                int valu = JOptionPane.showConfirmDialog(parent, "Do you want to add an another service to group", "Service Archive",
+                        JOptionPane.YES_NO_OPTION);
+                if (valu == 0) {
+                    txtClassDir.setText("");
+                    fileName = "";
+                    try {
+                        this.remove(sp);
+                        this.remove(tablelbl);
+                        butDone.setVisible(false);
+                        lblServiceNam.setVisible(false);
+                        txtServiceName.setVisible(false);
+                    } catch (Exception e1) {
+//                    e1.printStackTrace();
+                    }
+                    count++;
+                    parent.reShow();
+                    this.repaint();
+                } else {
+                    parent.setEnable(false, true, false, true);
+                    sgXMl = "<serviceGroup>\n";
+                    for (int i = 0; i < servicelsit.size(); i++) {
+                        ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
+                        sgXMl = sgXMl + serviceObj.toString();
+                    }
+                    sgXMl = sgXMl + "</serviceGroup>";
+                    disfile = new DescriptorFile(parent, sgXMl);
+                    disfile.setPrivious(this);
+                }
+            } else {
+                parent.setEnable(false, true, false, true);
+                sgXMl = "<serviceGroup>\n";
+                for (int i = 0; i < servicelsit.size(); i++) {
+                    ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
+                    sgXMl = sgXMl + serviceObj.toString();
+                }
+                sgXMl = sgXMl + "</serviceGroup>";
+                disfile = new DescriptorFile(parent, sgXMl);
+                disfile.setPrivious(this);
+            }
+
+//            int valu = JOptionPane.showConfirmDialog(parent,"Do you want to add an another service to group","Service Archive",
+//                    JOptionPane.YES_NO_OPTION);
+//            if(valu == 0){
+//                txtClassDir.setText("");
+//                fileName = "";
+//                try {
+//                    this.remove(sp);
+//                    this.remove(tablelbl);
+//                    butDone.setVisible(false);
+//                    lblServiceNam.setVisible(false);
+//                    txtServiceName.setVisible(false);
+//                } catch (Exception e1) {
+////                    e1.printStackTrace();
+//                }
+//                count ++;
+//                parent.reShow();
+//                this.repaint();
+//            } else {
+//                parent.setEnable(false,true,false,true);
+//                sgXMl = "<serviceGroup>\n";
+//                for (int i = 0; i < servicelsit.size(); i++) {
+//                    ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
+//                    sgXMl = sgXMl + serviceObj.toString();
+//                }
+//                sgXMl = sgXMl + "</serviceGroup>";
+//                disfile = new DescriptorFile(parent,sgXMl);
+//                disfile.setPrivious(this);
+//            }
+        }
+    }
+
+    public String getTopLable() {
+        return "Service class and operation selection";
+    }
+
+    public String getLable() {
+        return "First select service class and load its method operations";
+    }
+
+
+class ClassFileFilter extends FileFilter {
+
+    public boolean accept(File f) {
+        if (f.isDirectory()) {
+            return true;
+        }
+        String extension = getExtension(f);
+        if (extension != null) {
+            return extension.equals("class");
+        }
+
+        return false;
+
+    }
+
+    public String getDescription() {
+        return ".class";
+    }
+
+    private String getExtension(File f) {
+        String ext = null;
+        String s = f.getName();
+        int i = s.lastIndexOf('.');
+
+        if (i > 0 && i < s.length() - 1) {
+            ext = s.substring(i + 1).toLowerCase();
+        }
+        return ext;
+    }
+
+}
+}
+

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java?view=diff&rev=465584&r1=465583&r2=465584
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java Thu Oct 19 04:47:51 2006
@@ -1,162 +1,163 @@
-package org.apache.ideaplugin.frames;
-
-import org.apache.ideaplugin.bean.ArchiveBean;
-import org.apache.ideaplugin.bean.ObjectKeeper;
-
-import javax.swing.*;
-import java.awt.*;
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Sep 18, 2005
- * Time: 11:45:58 AM
- */
-public class ServiceArciveFrame extends JFrame {
-
-    protected ImagePanel topPanel;
-    protected BottomPanel bottomPanel;
-    public boolean singleService;
-    public boolean generateServiceXML;
-    //  protected JPanel firstpanel ;
-    //    protected SelectPanel slectpanel;
-    protected JPanel currentpanle;
-    public String fileSeparator = System.getProperty("file.separator");
-    public final JFileChooser fc = new JFileChooser();
-    Insets insets;
-    ArchiveBean bean;
-
-    public ServiceArciveFrame() {
-        setBounds(200, 200, 600, 420);
-        getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
-        getContentPane().setLayout(null);
-        getContentPane().setBounds(200, 200, 600, 420);
-        bean = new ArchiveBean();
-
-        topPanel = new ImagePanel();
-        getContentPane().add(topPanel);
-        topPanel.setCaptions("Service Type selection", "Welcome to Axis2 service archive generation" +
-                "select service type");
-
-        currentpanle = new FirstFrame(this);
-        getContentPane().add(currentpanle);
-
-
-        bottomPanel = new BottomPanel(currentpanle, this, bean);
-        getContentPane().add(bottomPanel);
-        bottomPanel.setEnable(false, true, false, true);
-
-        insets = getInsets();
-        topPanel.setBounds(insets.left, insets.top, 608, 80);
-        currentpanle.setBounds(insets.left, insets.top + 80, 608, 260);
-        bottomPanel.setBounds(insets.left, insets.top + 328, 608, 60);
-        setSize(getPreferredSize());
-        setResizable(false);
-    }
-
-    public void setEnable(boolean back, boolean next, boolean finish, boolean cancel) {
-        if (currentpanle instanceof FirstFrame) {
-            bottomPanel.setEnable(false, next, finish, cancel);
-        } else {
-            bottomPanel.setEnable(true, next, finish, cancel);
-        }
-
-    }
-
-    public void Next(JPanel current) {
-        currentpanle.setVisible(false);
-        try {
-            remove(currentpanle);
-        } catch (Exception e) {
-            System.out.println("");
-        }
-        getContentPane().add(current);
-        current.setBounds(insets.left, insets.top + 80, 608, 260);
-        currentpanle = current;
-        setEnable(true, false, false, true);
-        reShow();
-    }
-
-    public void Back(JPanel current) {
-        currentpanle.setVisible(false);
-        try {
-            remove(currentpanle);
-        } catch (Exception e) {
-            System.out.println("");
-        }
-        getContentPane().add(current);
-        current.setBounds(insets.left, insets.top + 80, 608, 260);
-        currentpanle = current;
-        currentpanle.setVisible(true);
-        setEnable(true, true, false, true);
-        reShow();
-    }
-
-    public void reShow() {
-        ObjectKeeper keeper = (ObjectKeeper) currentpanle;
-        topPanel.setCaptions(keeper.getTopLable(), keeper.getLable());
-        this.show();
-    }
-
-    class MainFrameLayout implements LayoutManager {
-
-        public MainFrameLayout() {
-        }
-
-        public void addLayoutComponent(String name, Component comp) {
-        }
-
-        public void removeLayoutComponent(Component comp) {
-        }
-
-        public Dimension preferredLayoutSize(Container parent) {
-            Dimension dim = new Dimension(0, 0);
-
-            Insets insets = parent.getInsets();
-            dim.width = 608 + insets.left + insets.right;
-            dim.height = 400 + insets.top + insets.bottom;
-
-            return dim;
-        }
-
-        public Dimension minimumLayoutSize(Container parent) {
-            return new Dimension(0, 0);
-        }
-
-        public void layoutContainer(Container parent) {
-            Insets insets = parent.getInsets();
-
-            Component c;
-            c = parent.getComponent(0);
-            if (c.isVisible()) {
-                c.setBounds(insets.left, insets.top, 608, 80);
-            }
-            c = parent.getComponent(1);
-            if (c.isVisible()) {
-                c.setBounds(insets.left, insets.top + 80, 608, 260);
-            }
-            c = parent.getComponent(2);
-            if (c.isVisible()) {
-                c.setBounds(insets.left, insets.top + 328, 608, 60);
-            }
-//        c = parent.getComponent(3);
-//        if (c.isVisible()) {c.setBounds(insets.left+0,insets.top+80,608,260);}
-        }
-    }
+package org.apache.ideaplugin.frames;
+
+import org.apache.ideaplugin.bean.ArchiveBean;
+import org.apache.ideaplugin.bean.ObjectKeeper;
+
+import javax.swing.*;
+import java.awt.*;
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Sep 18, 2005
+ * Time: 11:45:58 AM
+ */
+public class ServiceArciveFrame extends JFrame {
+
+    protected ImagePanel topPanel;
+    protected BottomPanel bottomPanel;
+    public boolean singleService;
+    public boolean generateServiceXML;
+    //  protected JPanel firstpanel ;
+    //    protected SelectPanel slectpanel;
+    protected JPanel currentpanle;
+    public String fileSeparator = System.getProperty("file.separator");
+    public final JFileChooser fc = new JFileChooser();
+    Insets insets;
+    ArchiveBean bean;
+
+    public ServiceArciveFrame() {
+        setBounds(200, 200, 600, 420);
+        getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
+        getContentPane().setLayout(null);
+        getContentPane().setBounds(200, 200, 600, 420);
+        bean = new ArchiveBean();
+
+        topPanel = new ImagePanel();
+        getContentPane().add(topPanel);
+        topPanel.setCaptions("Service Type selection", "Welcome to Axis2 service archive generation. " +
+                "Select service type");
+
+        currentpanle = new FirstFrame(this);
+        getContentPane().add(currentpanle);
+
+
+        bottomPanel = new BottomPanel(currentpanle, this, bean);
+        getContentPane().add(bottomPanel);
+        bottomPanel.setEnable(false, true, false, true);
+
+        insets = getInsets();
+        topPanel.setBounds(insets.left, insets.top, 608, 80);
+        currentpanle.setBounds(insets.left, insets.top + 80, 608, 260);
+        bottomPanel.setBounds(insets.left, insets.top + 328, 608, 60);
+        setSize(getPreferredSize());
+        setResizable(false);
+
+    }
+
+    public void setEnable(boolean back, boolean next, boolean finish, boolean cancel) {
+        if (currentpanle instanceof FirstFrame) {
+            bottomPanel.setEnable(false, next, finish, cancel);
+        } else {
+            bottomPanel.setEnable(true, next, finish, cancel);
+        }
+
+    }
+
+    public void Next(JPanel current) {
+        currentpanle.setVisible(false);
+        try {
+            remove(currentpanle);
+        } catch (Exception e) {
+            System.out.println("");
+        }
+        getContentPane().add(current);
+        current.setBounds(insets.left, insets.top + 80, 608, 260);
+        currentpanle = current;
+        setEnable(true, false, false, true);
+        reShow();
+    }
+
+    public void Back(JPanel current) {
+        currentpanle.setVisible(false);
+        try {
+            remove(currentpanle);
+        } catch (Exception e) {
+            System.out.println("");
+        }
+        getContentPane().add(current);
+        current.setBounds(insets.left, insets.top + 80, 608, 260);
+        currentpanle = current;
+        currentpanle.setVisible(true);
+        setEnable(true, true, false, true);
+        reShow();
+    }
+
+    public void reShow() {
+        ObjectKeeper keeper = (ObjectKeeper) currentpanle;
+        topPanel.setCaptions(keeper.getTopLable(), keeper.getLable());
+        this.show();
+    }
+
+    class MainFrameLayout implements LayoutManager {
+
+        public MainFrameLayout() {
+        }
+
+        public void addLayoutComponent(String name, Component comp) {
+        }
+
+        public void removeLayoutComponent(Component comp) {
+        }
+
+        public Dimension preferredLayoutSize(Container parent) {
+            Dimension dim = new Dimension(0, 0);
+
+            Insets insets = parent.getInsets();
+            dim.width = 608 + insets.left + insets.right;
+            dim.height = 400 + insets.top + insets.bottom;
+
+            return dim;
+        }
+
+        public Dimension minimumLayoutSize(Container parent) {
+            return new Dimension(0, 0);
+        }
+
+        public void layoutContainer(Container parent) {
+            Insets insets = parent.getInsets();
+
+            Component c;
+            c = parent.getComponent(0);
+            if (c.isVisible()) {
+                c.setBounds(insets.left, insets.top, 608, 80);
+            }
+            c = parent.getComponent(1);
+            if (c.isVisible()) {
+                c.setBounds(insets.left, insets.top + 80, 608, 260);
+            }
+            c = parent.getComponent(2);
+            if (c.isVisible()) {
+                c.setBounds(insets.left, insets.top + 328, 608, 60);
+            }
+//        c = parent.getComponent(3);
+//        if (c.isVisible()) {c.setBounds(insets.left+0,insets.top+80,608,260);}
+        }
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org