Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual1Project.java URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual1Project.java?rev=1236486&view=auto ============================================================================== --- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual1Project.java (added) +++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual1Project.java Fri Jan 27 01:29:33 2012 @@ -0,0 +1,449 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ComponentPanelVisual1Project.java,v $ + * + * $Revision: 1.16 $ + * + * last change: $Author: sg $ $Date: 2008/10/07 10:19:23 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +package org.openoffice.extensions.projecttemplates.component; + +import java.io.File; +import java.io.FilenameFilter; +import java.io.IOException; +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import javax.swing.filechooser.FileSystemView; +import javax.swing.text.Document; +import org.netbeans.spi.project.ui.support.ProjectChooser; +import org.openide.WizardDescriptor; +import org.openide.WizardValidationException; +import org.openide.filesystems.FileUtil; +import org.openide.util.NbBundle; +import org.openoffice.extensions.config.ConfigurationSettings; +import org.openoffice.extensions.util.LogWriter; + +public class ComponentPanelVisual1Project extends JPanel implements DocumentListener { + + public static final String PROP_PROJECT_NAME = "projectName"; // NOI18N + private ComponentWizardPanel1Project panel; + private boolean serviceNameModified; + + private String[] generatedFiles = new String[]{ "", + "src/uno-extension-manifest.xml\n", + "(...)" + }; // NOI18N + + /** Creates new form PanelProjectLocationVisual */ + public ComponentPanelVisual1Project(ComponentWizardPanel1Project panel) { + initComponents(); + this.panel = panel; + // Register listener on the textFields to make the automatic updates + projectNameTextField.getDocument().addDocumentListener(this); + projectLocationTextField.getDocument().addDocumentListener(this); + serviceNameTextField.getDocument().addDocumentListener(this); + packageTextField.getDocument().addDocumentListener(this); + +// updateCreatedFiles(); +// panel.fireChangeEvent(); + } + + + public String getProjectName() { + return this.projectNameTextField.getText(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents + private void initComponents() { + projectNameLabel = new javax.swing.JLabel(); + projectNameTextField = new javax.swing.JTextField(); + projectLocationLabel = new javax.swing.JLabel(); + projectLocationTextField = new javax.swing.JTextField(); + browseButton = new javax.swing.JButton(); + createdFolderLabel = new javax.swing.JLabel(); + createdFolderTextField = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + serviceNameTextField = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + packageTextField = new javax.swing.JTextField(); + jLabel3 = new javax.swing.JLabel(); + jTextPane1 = new javax.swing.JTextPane(); + + projectNameLabel.setLabelFor(projectNameTextField); + org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ProjectName")); + + projectNameTextField.setToolTipText(org.openide.util.NbBundle.getMessage(ComponentPanelVisual1Project.class, "TF_ProjectName_Tooltip")); + + projectLocationLabel.setLabelFor(projectLocationTextField); + org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ProjectLocation")); + + projectLocationTextField.setToolTipText(org.openide.util.NbBundle.getMessage(ComponentPanelVisual1Project.class, "TF_ProjectLocation_Tooltip")); + + org.openide.awt.Mnemonics.setLocalizedText(browseButton, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ButtonBrowse")); + browseButton.setToolTipText(org.openide.util.NbBundle.getMessage(ComponentPanelVisual1Project.class, "BUTTON_Browse_Tooltip")); + browseButton.setActionCommand("BROWSE"); + browseButton.setName("browse"); + browseButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + browseButtonActionPerformed(evt); + } + }); + + createdFolderLabel.setLabelFor(createdFolderTextField); + org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ProjectFolder")); + + createdFolderTextField.setEditable(false); + createdFolderTextField.setToolTipText(org.openide.util.NbBundle.getMessage(ComponentPanelVisual1Project.class, "TF_ProjectFolder_Tooltip")); + + jLabel1.setLabelFor(serviceNameTextField); + org.openide.awt.Mnemonics.setLocalizedText(jLabel1, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ServiceName")); + + serviceNameTextField.setText("jTextField1"); + serviceNameTextField.setToolTipText(org.openide.util.NbBundle.getMessage(ComponentPanelVisual1Project.class, "TF_ClassName_Tooltip")); + + jLabel2.setLabelFor(packageTextField); + org.openide.awt.Mnemonics.setLocalizedText(jLabel2, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_Package")); + + packageTextField.setText("jTextField2"); + packageTextField.setToolTipText(org.openide.util.NbBundle.getMessage(ComponentPanelVisual1Project.class, "TF_PackageName_Tooltip")); + + jLabel3.setLabelFor(jTextPane1); + org.openide.awt.Mnemonics.setLocalizedText(jLabel3, NbBundle.getMessage(ComponentWizardIterator.class, "LBL_CreatedFiles")); + + jTextPane1.setBorder(null); + jTextPane1.setEditable(false); + jTextPane1.setOpaque(false); + + org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(projectNameLabel) + .add(jLabel2) + .add(jLabel1) + .add(createdFolderLabel) + .add(projectLocationLabel)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(projectNameTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE) + .add(serviceNameTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE) + .add(packageTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE) + .add(projectLocationTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE) + .add(createdFolderTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE))) + .add(layout.createSequentialGroup() + .add(jLabel3) + .add(23, 23, 23) + .add(jTextPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE))) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(browseButton) + .add(12, 12, 12)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(projectNameLabel) + .add(projectNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(serviceNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(jLabel1)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(packageTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(jLabel2)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(projectLocationLabel) + .add(projectLocationTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(browseButton)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(createdFolderLabel) + .add(createdFolderTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(31, 31, 31) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jTextPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE) + .add(jLabel3)) + .addContainerGap()) + ); + }// </editor-fold>//GEN-END:initComponents + + private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed + JFileChooser chooser = new JFileChooser(FileSystemView.getFileSystemView()); + FileUtil.preventFileChooserSymlinkTraversal(chooser, ConfigurationSettings.getDefaultFileChooserStartingDir()); + chooser.setDialogTitle( + NbBundle.getMessage(ComponentWizardIterator.class, "LBL_FileChooser_Title")); + chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + String path = this.projectLocationTextField.getText(); + if (path.length() > 0) { + File f = new File(path); + if (f.exists()) { + chooser.setSelectedFile(f); + } + } + if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) { + File projectDir = chooser.getSelectedFile(); + ConfigurationSettings.storeDefaultFileChooserStartingDir(projectDir); + projectLocationTextField.setText(FileUtil.normalizeFile(projectDir).getAbsolutePath()); + } + panel.fireChangeEvent(); + + }//GEN-LAST:event_browseButtonActionPerformed + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton browseButton; + private javax.swing.JLabel createdFolderLabel; + private javax.swing.JTextField createdFolderTextField; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JTextPane jTextPane1; + private javax.swing.JTextField packageTextField; + private javax.swing.JLabel projectLocationLabel; + private javax.swing.JTextField projectLocationTextField; + private javax.swing.JLabel projectNameLabel; + private javax.swing.JTextField projectNameTextField; + private javax.swing.JTextField serviceNameTextField; + // End of variables declaration//GEN-END:variables + + public void addNotify() { + super.addNotify(); + //same problem as in 31086, initial focus on Cancel button + projectNameTextField.requestFocus(); + } + + private void updateCreatedFiles() { + jTextPane1.setText(generatedFiles[0] + generatedFiles[1] + + generatedFiles[2]); + } + + boolean valid(WizardDescriptor wizardDescriptor) { + + if (projectNameTextField.getText().length() == 0) { + String message = NbBundle.getMessage(ComponentWizardIterator.class, "LBL_Error_ProjectNameNotValid"); + wizardDescriptor.putProperty("WizardPanel_errorMessage", message); // NOI18N + return false; // Display name not specified + } + File f = FileUtil.normalizeFile(new File(projectLocationTextField.getText()).getAbsoluteFile()); + if (!f.isDirectory()) { + String message = NbBundle.getBranding(); + wizardDescriptor.putProperty("WizardPanel_errorMessage", message); // NOI18N + return false; + } + final File destFolder = FileUtil.normalizeFile(new File(createdFolderTextField.getText()).getAbsoluteFile()); + + File projLoc = destFolder; + while (projLoc != null && !projLoc.exists()) { + projLoc = projLoc.getParentFile(); + } + if (projLoc == null || !projLoc.canWrite()) { + String message = NbBundle.getMessage(ComponentWizardIterator.class, "LBL_Error_CreateProjectFolderNot"); + wizardDescriptor.putProperty("WizardPanel_errorMessage", message); // NOI18N + return false; + } + + if (FileUtil.toFileObject(projLoc) == null) { + String message = NbBundle.getMessage(ComponentWizardIterator.class, "LBL_Error_ProjectFolderNotValid"); + wizardDescriptor.putProperty("WizardPanel_errorMessage", message); // NOI18N + return false; + } + + File[] kids = destFolder.listFiles(); + if (destFolder.exists() && kids != null && kids.length > 0) { + // Folder exists and is not empty + String message = NbBundle.getMessage(ComponentWizardIterator.class, "LBL_Error_ProjectFolderNotEmpty"); + wizardDescriptor.putProperty("WizardPanel_errorMessage", message); // NOI18N + return false; + } + wizardDescriptor.putProperty("WizardPanel_errorMessage", ""); // NOI18N + return true; + } + + void store(WizardDescriptor d) { + String name = projectNameTextField.getText().trim(); + String folder = createdFolderTextField.getText().trim(); + + try { + d.putProperty("projdir", new File(folder)); // NOI18N + d.putProperty("name", name); // NOI18N + d.putProperty("package", packageTextField.getText().trim()); // NOI18N + d.putProperty("service", serviceNameTextField.getText().trim()); // NOI18N + + d.putProperty("ProjectDir", new File(folder).getCanonicalPath()); // NOI18N + d.putProperty("ProjectName", name); // NOI18N + d.putProperty("ProjectDisplayName", name); // NOI18N + } + catch (IOException e) { + LogWriter.getLogWriter().printStackTrace(e); + } + String mainClass = serviceNameTextField.getText().trim(); + String packageName = packageTextField.getText().trim(); + d.putProperty("mainClassName", mainClass); // NOI18N + d.putProperty("displayName", mainClass); // NOI18N + d.putProperty("packageName", packageName); // NOI18N + d.putProperty("RegistrationClass", packageName + "." + mainClass); // NOI18N + d.putProperty("UnoPackage", packageName); // NOI18N + + } + + void read(WizardDescriptor settings) { + File projectLocation = (File) settings.getProperty("projdir"); // NOI18N + if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) { + projectLocation = ProjectChooser.getProjectsFolder(); + } else { + projectLocation = projectLocation.getParentFile(); + } + this.projectLocationTextField.setText(projectLocation.getAbsolutePath()); + + String projectName = (String) settings.getProperty("name"); // NOI18N + if(projectName == null) { + projectName = "UnoComponent"; // NOI18N + String[] fileList = projectLocation.list(new FilenameFilter() { + public boolean accept(File dir, String name) { + if (name.startsWith("UnoComponent")) return true; // NOI18N + return false; + } + }); + boolean searchProjectName = true; + int length = projectName.length(); + for (int i=0; searchProjectName && i<fileList.length + 1; i++) { + switch (i) { + case 0: // keep project name + break; + case 1: // append 1 + projectName = new StringBuffer(projectName).append(1).toString(); + break; + default: // remove number and append the next one + projectName = new StringBuffer(projectName.substring(0, length)).append(i).toString(); + } + // test if the name is already used + searchProjectName = false; + for (int j=0; !searchProjectName && j<fileList.length; j++) { + // if the project name isn't found, searchProjectName stays false and the name is kept + searchProjectName |= fileList[j].equals(projectName); + } + } + } + this.projectNameTextField.setText(projectName); + this.projectNameTextField.selectAll(); + + String mainclass = (String)settings.getProperty("serviceName"); // NOI18N + if (mainclass == null) + mainclass = projectName; + serviceNameTextField.setText(projectName); + + String packagename = (String)settings.getProperty("packageName"); // NOI18N + if (packagename == null) + packagename = NbBundle.getMessage(ConfigurationSettings.class, "default.package"); // NOI18N + packageTextField.setText(packagename); + + updateCreatedFiles(); + } + + void validate(WizardDescriptor d) throws WizardValidationException { + // nothing to validate + } + + // Implementation of DocumentListener -------------------------------------- + + public void changedUpdate(DocumentEvent e) { + updateTexts(e); + if (this.projectNameTextField.getDocument() == e.getDocument()) { + firePropertyChange(PROP_PROJECT_NAME,null,this.projectNameTextField.getText()); + } + } + + public void insertUpdate(DocumentEvent e) { + updateTexts(e); + if (this.projectNameTextField.getDocument() == e.getDocument()) { + firePropertyChange(PROP_PROJECT_NAME,null,this.projectNameTextField.getText()); + } + } + + public void removeUpdate(DocumentEvent e) { + updateTexts(e); + if (this.projectNameTextField.getDocument() == e.getDocument()) { + firePropertyChange(PROP_PROJECT_NAME,null,this.projectNameTextField.getText()); + } + } + + /** Handles changes in the Project name and project directory, */ + private void updateTexts(DocumentEvent e) { + + Document doc = e.getDocument(); + + if (doc == serviceNameTextField.getDocument() && projectNameTextField.getText().length()>0 + && serviceNameTextField.getText().length() > 0) { + if (!serviceNameTextField.getText().equals(projectNameTextField.getText())) + this.serviceNameModified = true; + } + + if (doc == projectNameTextField.getDocument() || doc == projectLocationTextField.getDocument() + || doc == packageTextField.getDocument()) { + + String projectName = projectNameTextField.getText(); + String projectFolder = projectLocationTextField.getText(); + + if (!serviceNameModified) + serviceNameTextField.setText(projectName); + + //if (projectFolder.trim().length() == 0 || projectFolder.equals(oldName)) { + createdFolderTextField.setText(projectFolder + File.separatorChar + projectName); + //} + + String packagePath = "src/" + packageTextField.getText().replace('.', '/') + '/'; // NOI18N + generatedFiles[0] = packagePath + serviceNameTextField.getText() + "Impl.java\n"; // NOI18N + + updateCreatedFiles(); + } + if (doc == serviceNameTextField.getDocument()) { + String packagePath = "src/" + packageTextField.getText().replace('.', '/') + '/'; // NOI18N + generatedFiles[0] = packagePath + serviceNameTextField.getText() + "Impl.java\n"; // NOI18N + updateCreatedFiles(); + } + panel.fireChangeEvent(); // Notify that the panel changed + } + +}
Added: incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual2IdlFiles.form URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual2IdlFiles.form?rev=1236486&view=auto ============================================================================== --- incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual2IdlFiles.form (added) +++ incubator/ooo/devtools/netbeansintegration/src/org/openoffice/extensions/projecttemplates/component/ComponentPanelVisual2IdlFiles.form Fri Jan 27 01:29:33 2012 @@ -0,0 +1,214 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> + <NonVisualComponents> + <Menu class="javax.swing.JPopupMenu" name="jPopupMenu1"> + </Menu> + </NonVisualComponents> + <AuxValues> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel2" pref="424" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jPanel1" alignment="1" pref="285" max="32767" attributes="0"/> + <Component id="jScrollPane1" alignment="1" pref="285" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="addServiceButton" alignment="0" min="-2" pref="157" max="-2" attributes="1"/> + <Component id="defineNewDataTypeButton" alignment="0" min="-2" pref="157" max="-2" attributes="1"/> + <Component id="editDataTypeButton" alignment="0" min="-2" pref="157" max="-2" attributes="0"/> + <Component id="deleteDataTypeButton" alignment="0" min="-2" pref="157" max="-2" attributes="1"/> + <Component id="deleteServiceButton" alignment="0" min="-2" pref="157" max="-2" attributes="1"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" pref="436" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane1" alignment="0" min="-2" pref="109" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="addServiceButton" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="deleteServiceButton" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" pref="90" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="defineNewDataTypeButton" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="editDataTypeButton" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="deleteDataTypeButton" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="addServiceButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_ButtonAddType" replaceFormat="NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ButtonAddType")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="Button_AddServiceInterface_Tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="name" type="java.lang.String" value="addServiceInterface"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addServiceButtonActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/> + </AuxValues> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new BeanTreeView();"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + </Container> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor"> + <ComponentRef name="jScrollPane1"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_ServicesAndInterfaces" replaceFormat="NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ServicesAndInterfaces")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor"> + <ComponentRef name="jPanel1"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_OwnDataTypes" replaceFormat="NbBundle.getMessage(ComponentWizardIterator.class, "LBL_OwnDataTypes")"/> + </Property> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ComponentListPanel(panel, getOwnDataTypesRootNode());"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> + </Container> + <Component class="javax.swing.JButton" name="deleteServiceButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_ButtonDeleteSelected" replaceFormat="org.openide.util.NbBundle.getMessage(ComponentWizardIterator.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="Button_DeleteServiceInterface_Tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="enabled" type="boolean" value="false"/> + <Property name="name" type="java.lang.String" value="deleteSelected"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteServiceButtonActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="defineNewDataTypeButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_ButtonDefineType" replaceFormat="NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ButtonDefineType")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="Button_DefineDataType_Tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="actionCommand" type="java.lang.String" value="Define New Data Type..."/> + <Property name="name" type="java.lang.String" value="defineDataType"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="defineNewDataTypeActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="deleteDataTypeButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_ButtonDeleteSelected2" replaceFormat="NbBundle.getMessage(ComponentWizardIterator.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="Button_DeletDataType_Tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="enabled" type="boolean" value="false"/> + <Property name="name" type="java.lang.String" value="deleteSelected"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteDataTypeActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="editDataTypeButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="LBL_ButtonEdit" replaceFormat="NbBundle.getMessage(ComponentWizardIterator.class, "LBL_ButtonEdit")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openoffice/extensions/projecttemplates/component/Bundle.properties" key="Button_EditDataType_Tooltip" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="enabled" type="boolean" value="false"/> + <Property name="name" type="java.lang.String" value="edit"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="editDataTypeActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/> + </AuxValues> + </Component> + </SubComponents> +</Form>
