[Mc4j-cvs] mc4j/src/org/mc4j/console/connection/wizard ConnectionDescriptor.java,1.11,1.12 ServerIns
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2006-04-12 19:14:40
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20162/src/org/mc4j/console/connection/wizard Modified Files: ConnectionDescriptor.java ServerInstallVisualPanel.java ConnectionIterator.java ServerInstallPanel.java ClassPathListPanel.java ClassPathListVisualPanel.java ConnectionVisualPanel.java Removed Files: JBossConnectorChoicePanel.java JBossConnectorChoiceVisualPanel.java Log Message: Merging EMS into head for the 2.0 release work Index: ClassPathListVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ClassPathListVisualPanel.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ClassPathListVisualPanel.java 5 Oct 2004 05:15:59 -0000 1.7 --- ClassPathListVisualPanel.java 12 Apr 2006 19:14:00 -0000 1.8 *************** *** 17,32 **** package org.mc4j.console.connection.wizard; ! import java.awt.Dimension; import java.io.File; import java.util.ArrayList; import java.util.List; - import javax.swing.DefaultListModel; - import javax.swing.JFileChooser; - import javax.swing.JPanel; - import javax.swing.filechooser.FileFilter; - - import org.openide.util.NbBundle; - /** * This visual panel lets you manage a list of class path entries --- 17,29 ---- package org.mc4j.console.connection.wizard; ! import org.openide.util.NbBundle; ! ! import javax.swing.*; ! import javax.swing.filechooser.FileFilter; ! import java.awt.*; import java.io.File; import java.util.ArrayList; import java.util.List; /** * This visual panel lets you manage a list of class path entries *************** *** 76,94 **** } ! public void setFileList(List fileList) { ((DefaultListModel)this.jListEntries.getModel()).removeAllElements(); if (fileList != null) { ! for (int i = 0; i < fileList.size(); i++) { ! File file = (File) fileList.get(i); ! ((DefaultListModel)this.jListEntries.getModel()).addElement(file); } } } ! public List getFileList() { ! List results = new ArrayList(); int count = this.jListEntries.getModel().getSize(); for (int i = 0; i < count; i++) { ! results.add(this.jListEntries.getModel().getElementAt(i)); } return results; --- 73,90 ---- } ! public void setFileList(List<File> fileList) { ((DefaultListModel)this.jListEntries.getModel()).removeAllElements(); if (fileList != null) { ! for (File file : fileList) { ! ((DefaultListModel) this.jListEntries.getModel()).addElement(file); } } } ! public List<File> getFileList() { ! List<File> results = new ArrayList<File>(); int count = this.jListEntries.getModel().getSize(); for (int i = 0; i < count; i++) { ! results.add((File) this.jListEntries.getModel().getElementAt(i)); } return results; --- JBossConnectorChoicePanel.java DELETED --- Index: ConnectionIterator.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionIterator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ConnectionIterator.java 5 Oct 2004 05:15:59 -0000 1.11 --- ConnectionIterator.java 12 Apr 2006 19:14:00 -0000 1.12 *************** *** 50,55 **** new ConnectionVisualPanel(this.connectionDescriptor), new ServerInstallPanel(this.connectionDescriptor), ! new ClassPathListPanel(this.connectionDescriptor), ! new JBossConnectorChoicePanel(this.connectionDescriptor) }; } --- 50,54 ---- new ConnectionVisualPanel(this.connectionDescriptor), new ServerInstallPanel(this.connectionDescriptor), ! new ClassPathListPanel(this.connectionDescriptor) }; } *************** *** 61,66 **** "Connect to Server", "Select Server Installation", ! "Customize classpath", ! "Choose connector" }; } --- 60,64 ---- "Connect to Server", "Select Server Installation", ! "Customize classpath" }; } *************** *** 113,119 **** case 2: return true; - case 3: - return false; - //return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); default: throw new NoSuchElementException (); --- 111,114 ---- Index: ConnectionDescriptor.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionDescriptor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ConnectionDescriptor.java 5 Oct 2004 05:15:59 -0000 1.11 --- ConnectionDescriptor.java 12 Apr 2006 19:14:00 -0000 1.12 *************** *** 17,29 **** package org.mc4j.console.connection.wizard; ! import java.awt.Dimension; ! import java.awt.Toolkit; ! import java.net.MalformedURLException; ! import java.net.URL; ! import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import org.mc4j.console.connection.persistence.ConnectionSettings; /** --- 17,27 ---- package org.mc4j.console.connection.wizard; ! import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; ! import java.awt.*; ! import java.net.MalformedURLException; ! import java.net.URL; /** Index: ServerInstallVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallVisualPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ServerInstallVisualPanel.java 15 Jan 2005 03:50:18 -0000 1.9 --- ServerInstallVisualPanel.java 12 Apr 2006 19:14:00 -0000 1.10 *************** *** 29,34 **** import java.awt.event.ActionListener; import java.io.File; - import java.util.Iterator; - import java.util.Set; /** --- 29,32 ---- *************** *** 96,103 **** serverInstallList.getSelectionModel().addListSelectionListener(this); ! Set installs = ServerInstallSetDatabase.getNodes(); ! for (Iterator iterator = installs.iterator(); iterator.hasNext();) { ! ServerInstallInfo serverInstallSettings = (ServerInstallInfo) iterator.next(); ! serverInstallModel.addElement(serverInstallSettings); } --- 94,98 ---- serverInstallList.getSelectionModel().addListSelectionListener(this); ! for (ServerInstallInfo serverInstallSettings : ServerInstallSetDatabase.getNodes()) { serverInstallModel.addElement(serverInstallSettings); } Index: ServerInstallPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallPanel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ServerInstallPanel.java 14 Mar 2005 15:16:17 -0000 1.13 --- ServerInstallPanel.java 12 Apr 2006 19:14:00 -0000 1.14 *************** *** 130,134 **** return; ! List fileList = new ArrayList(); String[] serverFiles = descriptor.getSettings().getConnectionType().getConnectionClasspathEntries(); --- 130,134 ---- return; ! List<File> fileList = new ArrayList(); String[] serverFiles = descriptor.getSettings().getConnectionType().getConnectionClasspathEntries(); *************** *** 169,173 **** } ! this.descriptor.getSettings().setClassPathEntries((File[]) fileList.toArray((new File[fileList.size()]))); System.out.println("Saving " + settings.hashCode()); } --- 169,173 ---- } ! this.descriptor.getSettings().setClassPathEntries(fileList); System.out.println("Saving " + settings.hashCode()); } Index: ConnectionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionVisualPanel.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ConnectionVisualPanel.java 15 Jan 2005 03:50:18 -0000 1.20 --- ConnectionVisualPanel.java 12 Apr 2006 19:14:00 -0000 1.21 *************** *** 17,25 **** package org.mc4j.console.connection.wizard; - import org.mc4j.console.ManagementNode; - import org.mc4j.console.connection.install.ConnectionTypeDescriptor; - import org.mc4j.console.connection.persistence.ConnectionSettings; import org.mc4j.console.connection.wizard.advanced.AdvancedPanel; import org.mc4j.console.swing.ComponentBorder; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; --- 17,25 ---- package org.mc4j.console.connection.wizard; import org.mc4j.console.connection.wizard.advanced.AdvancedPanel; import org.mc4j.console.swing.ComponentBorder; + import org.mc4j.ems.connection.support.metadata.ConnectionTypeDescriptor; + import org.mc4j.ems.connection.ConnectionFactory; + import org.mc4j.ems.connection.settings.ConnectionSettings; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; *************** *** 32,45 **** import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ! import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Map; ! import java.util.Set; ! import java.util.HashMap; /** --- 32,43 ---- import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Dialog; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.net.MalformedURLException; import java.net.URL; ! import java.util.*; /** *************** *** 61,65 **** private final ConnectionDescriptor connectionDescriptor; ! private Map advancedProperties; --- 59,63 ---- private final ConnectionDescriptor connectionDescriptor; ! private Properties advancedProperties; *************** *** 67,71 **** /** Create the wizard panel and set up some basic properties. */ public ConnectionVisualPanel(ConnectionDescriptor connectionDescriptor) { ! super(new JComboBox(ManagementNode.CONNECTION_DESCRIPTORS), Color.darkGray, 2); initComponents(); --- 65,69 ---- /** Create the wizard panel and set up some basic properties. */ public ConnectionVisualPanel(ConnectionDescriptor connectionDescriptor) { ! super(new JComboBox(new Vector(ConnectionFactory.getConnectionTypes())), Color.darkGray, 2); initComponents(); *************** *** 96,110 **** throw new IllegalStateException(mfue.toString()); } - - - } - - private static Object[] getConnectionTypeNames() { - Object[] names = new Object[ManagementNode.CONNECTION_DESCRIPTORS.length]; - for (int i = 0; i < ManagementNode.CONNECTION_DESCRIPTORS.length; i++) { - ConnectionTypeDescriptor descriptor = ManagementNode.CONNECTION_DESCRIPTORS[i]; - names[i] = descriptor.getDisplayName(); - } - return names; } --- 94,97 ---- *************** *** 118,122 **** dMessage = null; ! Map dAdvancedProperties = null; dName = ""; // Everyone needs a name --- 105,109 ---- dMessage = null; ! Properties dAdvancedProperties = null; dName = ""; // Everyone needs a name *************** *** 155,159 **** if (dAdvancedProperties != null) { ! this.advancedProperties = new HashMap(dAdvancedProperties); } } --- 142,146 ---- if (dAdvancedProperties != null) { ! this.advancedProperties = dAdvancedProperties; } } *************** *** 170,174 **** settings.setCredentials(this.credentialsField.getText()); settings.setAdvancedProperties(this.advancedProperties); - settings.setAdvancedProperties(this.advancedProperties); } --- 157,160 ---- Index: ClassPathListPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ClassPathListPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClassPathListPanel.java 5 Oct 2004 05:15:59 -0000 1.6 --- ClassPathListPanel.java 12 Apr 2006 19:14:00 -0000 1.7 *************** *** 17,31 **** package org.mc4j.console.connection.wizard; ! import java.awt.Component; ! import java.io.File; ! import java.util.Arrays; ! import java.util.List; ! ! import javax.swing.event.ChangeListener; ! import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; ! import org.mc4j.console.ManagementNode; /** --- 17,28 ---- package org.mc4j.console.connection.wizard; ! import org.mc4j.console.ManagementNode; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; ! import javax.swing.event.ChangeListener; ! import java.awt.*; ! import java.io.File; ! import java.util.List; /** *************** *** 123,128 **** System.out.println("Reading " + settings.hashCode()); if (descriptor.getSettings().getClassPathEntries() != null) { ! List fileList = Arrays.asList(descriptor.getSettings().getClassPathEntries()); ! ((ClassPathListVisualPanel)getComponent()).setFileList(fileList); } this.installedLibraries = ManagementNode.getExtras(descriptor.getSettings().getConnectionType()); --- 120,124 ---- System.out.println("Reading " + settings.hashCode()); if (descriptor.getSettings().getClassPathEntries() != null) { ! ((ClassPathListVisualPanel)getComponent()).setFileList(descriptor.getSettings().getClassPathEntries()); } this.installedLibraries = ManagementNode.getExtras(descriptor.getSettings().getConnectionType()); *************** *** 130,138 **** public void storeSettings(Object settings) { ! List fileList = component.getFileList(); //System.out.println("Storing the latest libraries"); ! this.descriptor.getSettings().setClassPathEntries((File[]) fileList.toArray(new File[fileList.size()])); ! } --- 126,133 ---- public void storeSettings(Object settings) { ! List<File> fileList = component.getFileList(); //System.out.println("Storing the latest libraries"); ! this.descriptor.getSettings().setClassPathEntries(fileList); } --- JBossConnectorChoiceVisualPanel.java DELETED --- |