From: Jan S. <st...@us...> - 2002-02-26 00:59:54
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes In directory usw-pr-cvs1:/tmp/cvs-serv11441 Modified Files: Bundle.properties Added Files: DataFolderPanel.java DataFolderPanel.form Log Message: Panel for snapshot saving. --- NEW FILE: DataFolderPanel.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.module.nodes; import java.awt.event.KeyEvent; import java.io.IOException; import java.lang.ref.*; import java.util.StringTokenizer; import java.util.ResourceBundle; import java.beans.*; import java.util.Enumeration; import java.text.MessageFormat; import javax.swing.tree.TreeSelectionModel; import javax.swing.tree.TreePath; import javax.swing.tree.DefaultTreeSelectionModel; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; import javax.swing.ListSelectionModel; import javax.swing.JButton; import javax.swing.KeyStroke; import javax.swing.SwingUtilities; import org.openide.TopManager; import org.openide.DialogDescriptor; import org.openide.WizardDescriptor; import org.openide.loaders.*; import org.openide.nodes.*; import org.openide.explorer.view.*; import org.openide.explorer.ExplorerManager; import org.openide.explorer.propertysheet.editors.EnhancedCustomPropertyEditor; import org.openide.filesystems.*; import org.openide.util.UserCancelException; import org.openide.util.HelpCtx; import org.openide.util.Mutex; import org.openide.util.Utilities; import org.openide.util.NbBundle; import org.openide.util.enum.*; import org.openide.windows.TopComponent; /** * A panel for selecting an existing data folder. */ public class DataFolderPanel extends TopComponent implements DocumentListener, DataFilter, EnhancedCustomPropertyEditor, PropertyChangeListener, VetoableChangeListener { /** Resource bundle for this class. */ private static final ResourceBundle bundle=NbBundle.getBundle(DataFolderPanel.class); /** Prefered dimmension of the panels. */ static java.awt.Dimension PREF_DIM = new java.awt.Dimension(450, 250); /** Format to for default package. */ private static MessageFormat defaultPackageName; /** System reference (FileSystem). */ private Reference system = new WeakReference(null); /** Root node. */ private Node rootNode; /** Last <code>DataFolder</code> object that can be returned. */ private DataFolder df; /** * Creates new form DataFolderPanel */ public DataFolderPanel() { initComponents(); setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(8, 8, 8, 8))); rootNode=createPackagesNode(); packagesPanel.getExplorerManager().setRootContext(rootNode); packagesPanel.getExplorerManager().addPropertyChangeListener(this); packagesPanel.getExplorerManager().addVetoableChangeListener(this); // registers itself to listen to changes in the content of document packageName.getDocument().addDocumentListener(this); packageName.unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)); } /** * Returns preffered size. */ public java.awt.Dimension getPreferredSize() { return PREF_DIM; } /** * Creates node that displays all packages. */ private Node createPackagesNode() { return TopManager.getDefault().getPlaces().nodes().repository(this); } /** * 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 FormEditor. */ private void initComponents() {//GEN-BEGIN:initComponents java.awt.GridBagConstraints gridBagConstraints; packagesPanel = new org.openide.explorer.ExplorerPanel(); beanTreeView = new org.openide.explorer.view.BeanTreeView(); descriptionLabel = new javax.swing.JLabel(); packageLabel = new javax.swing.JLabel(); packageName = new javax.swing.JTextField(); dirLabel = new javax.swing.JLabel(); directoryName = new javax.swing.JTextField(); createButton = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); nameLabel = new javax.swing.JLabel(); nameTextField = new javax.swing.JTextField(); setLayout(new java.awt.BorderLayout()); packagesPanel.setLayout(new java.awt.GridBagLayout()); beanTreeView.setPopupAllowed(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8); gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; packagesPanel.add(beanTreeView, gridBagConstraints); descriptionLabel.setText(bundle.getString("LAB_TargetLocationDescription")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(8, 8, 0, 8); gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; packagesPanel.add(descriptionLabel, gridBagConstraints); packageLabel.setText(bundle.getString("LAB_package")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8); gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; packagesPanel.add(packageLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; packagesPanel.add(packageName, gridBagConstraints); dirLabel.setText(bundle.getString("LAB_directory")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 8); gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; packagesPanel.add(dirLabel, gridBagConstraints); directoryName.setEnabled(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(8, 0, 8, 8); gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; packagesPanel.add(directoryName, gridBagConstraints); createButton.setText(bundle.getString("CTL_Create")); createButton.setEnabled(false); createButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { createButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8); gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; packagesPanel.add(createButton, gridBagConstraints); jPanel1.setLayout(new java.awt.GridBagLayout()); nameLabel.setText(bundle.getString("LBL_snapshotName")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 8); jPanel1.add(nameLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanel1.add(nameTextField, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(0, 8, 0, 8); packagesPanel.add(jPanel1, gridBagConstraints); add(packagesPanel, java.awt.BorderLayout.CENTER); }//GEN-END:initComponents private void createButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createButtonActionPerformed try { final DataFolder newDf = (DataFolder)getPropertyValue(); updateDirectory(); enableCreateButton(); } catch (IllegalStateException ex) { throw new RuntimeException(ex.getMessage()); } }//GEN-LAST:event_createButtonActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel nameLabel; private javax.swing.JButton createButton; private javax.swing.JLabel packageLabel; private org.openide.explorer.view.BeanTreeView beanTreeView; private javax.swing.JTextField packageName; private javax.swing.JTextField directoryName; private org.openide.explorer.ExplorerPanel packagesPanel; private javax.swing.JLabel dirLabel; private javax.swing.JLabel descriptionLabel; private javax.swing.JPanel jPanel1; private javax.swing.JTextField nameTextField; // End of variables declaration//GEN-END:variables /** * Filter to accept only folders. * * @param obj data object that should be filtered. * @return <code>true</code> if the object should be displayed, * <code>false</code> otherwise */ public boolean acceptDataObject(DataObject obj) { return obj instanceof DataFolder; } /** * Allow only simple selection. */ public void vetoableChange(PropertyChangeEvent ev) throws PropertyVetoException { if (ExplorerManager.PROP_SELECTED_NODES.equals(ev.getPropertyName())) { Node[] arr = (Node[])ev.getNewValue(); if (arr.length > 1) { throw new PropertyVetoException("Only single selection allowed", ev); // NOI18N } } } /** * Changes in selected node in packages. */ public void propertyChange(PropertyChangeEvent ev) { if (ExplorerManager.PROP_SELECTED_NODES.equals(ev.getPropertyName())) { Node[] arr = packagesPanel.getExplorerManager().getSelectedNodes(); if (!isVisible()) { // in the case we are not shown don't update the panel's state return; } if (arr.length==1) { DataFolder df=(DataFolder)arr[0].getCookie(DataFolder.class); if (df!=null) { setTargetFolder(df); enableCreateButton(); return; } } setTargetFolder((DataFolder)null); } } /** * Modification of package name. */ public void changedUpdate(final javax.swing.event.DocumentEvent p1) { if (p1.getDocument()==packageName.getDocument()) { SwingUtilities.invokeLater(new Runnable() { public void run() { String text=packageName.getText(); if (text!=null) { if (isValid()) { setTargetFolder(text); } updateDirectory(); } enableCreateButton(); } }); return; } } public void removeUpdate(final javax.swing.event.DocumentEvent p1) { if (p1.getDocument()==packageName.getDocument()) { SwingUtilities.invokeLater(new Runnable() { public void run() { if (packageName.getText().length()==0) { FileSystem fs=(FileSystem)system.get(); if (fs!=null) { DataFolder df=DataFolder.findFolder(fs.getRoot()); setTargetFolder(df); packageName.selectAll(); } } String text=packageName.getText(); if (text != null) { if (isValid()) { setTargetFolder(text); } updateDirectory(); } enableCreateButton(); } }); } } public void insertUpdate(final javax.swing.event.DocumentEvent p1) { changedUpdate(p1); } /** * Help for this panel. * @return the help or <code>null</code> if no help is supplied */ public org.openide.util.HelpCtx getHelp() { return new HelpCtx(DataFolderPanel.class); } /** * Test whether the panel is finished and it is safe to proceed to the next one. * If the panel is valid, the "Next" (or "Finish") button will be enabled. * @return <code>true</code> if the user has entered satisfactory information */ public boolean isValid() { String text = packageName.getText(); if (text.length() == 0) { Node[] arr = packagesPanel.getExplorerManager().getSelectedNodes(); if (arr.length == 1 && arr[0] == rootNode) { return false; } } if (text.equals(defaultPackageName((FileSystem)system.get()))) { return true; } StringTokenizer tok = new StringTokenizer(text, "."); // NOI18N while (tok.hasMoreElements()) { String pkg = tok.nextToken(); if (!Utilities.isJavaIdentifier(pkg)) { return false; } } return true; } /** * Computes a suggestion for a given prefix and a list of file objects. * * @param node the node to start with * @param pref prefix * @param first [0] is the first node that satisfies the suggestion * @return the longest continuation string for all folders that * starts with prefix */ private static String computeSuggestion(Node node, String pref, Node[] first) { Node[] arr = node.getChildren().getNodes(); String match = null; for (int i = 0; i < arr.length; i++) { String name = arr[i].getName(); if (name.startsWith(pref)) { // ok, has the right prefix if (match==null) { // first match match=name; if (first!=null) { first[0]=arr[i]; } } else { // find common part of the names int indx=pref.length(); int end=Math.min(name.length(), match.length()); while ((indx<end)&&(match.charAt(indx)==name.charAt(indx))) { indx++; } match=match.substring(0, indx); } } } if (match == null || match.length() == pref.length()) { return null; } else { return match.substring(pref.length()); } } /** * Presets a target folder. * * @param f the folder * @return true if succeeded */ boolean setTargetFolder(final DataFolder f) { boolean exact; Node n; String name; boolean defaultPackageNameUsed = false; df = f; if (f!=null) { FileObject fo = f.getPrimaryFile(); name = fo.getPackageName('.'); StringTokenizer st=new StringTokenizer(name, "."); // NOI18N try { FileSystem fs=fo.getFileSystem(); if (fo.isRoot()) { name=""; // NOI18N defaultPackageNameUsed=true; } system = new WeakReference(fs); Enumeration en = new SequenceEnumeration( new SingletonEnumeration(fs.getSystemName()), st ); n = NodeOp.findPath(rootNode, en); exact = true; } catch (FileStateInvalidException ex) { // invalid state of file system => back to root n = rootNode; name = ""; // NOI18N exact = false; } catch (NodeNotFoundException ex) { n = ex.getClosestNode(); DataFolder df = (DataFolder)n.getCookie(DataFolder.class); if (df != null) { name = df.getPrimaryFile().getPackageName('.'); } else { name = ""; // NO-I18N } exact = false; } } else { // null folder => use root n = rootNode; name = null; exact = true; } // remove listener + do change + add listener ExplorerManager em = packagesPanel.getExplorerManager(); em.removePropertyChangeListener(this); packageName.getDocument().removeDocumentListener(this); try { em.setSelectedNodes(new Node[] { n }); } catch (PropertyVetoException ex) { throw new InternalError(); } packageName.setText(name); updateDirectory(); packageName.getDocument().addDocumentListener(this); em.addPropertyChangeListener(this); return exact; } /** * Getter for target folder. If the folder does not * exists it is created at this point. * @param create true if the target folder should be created. * @return the target folder * @exception IOException if the possible creation of the folder fails */ private DataFolder getTargetFolder(boolean create) throws IOException { if (create&&isValid()) { FileSystem fs=(FileSystem)system.get(); if (fs!=null) { DataFolder folder=DataFolder.findFolder(fs.getRoot()); String currentName=packageName.getText(); if (currentName.length()>0) { String f=currentName.replace('.', '/'); folder=DataFolder.create(folder, f); } df=folder; return folder; } } return df; } /** * Presets a target folder. * * @param f the name of target folder * @return true if succeeded */ private boolean setTargetFolder(final String f) { Node n=null; NodeNotFoundException closest=null; // first of all test the currently selected nod // for location of closest java.util.Collection selected=new java.util.HashSet( java.util.Arrays.asList( packagesPanel.getExplorerManager().getSelectedNodes() )); Node[] arr = rootNode.getChildren().getNodes(); for (int i = 0; i < arr.length; i++) { Node root = arr[i]; StringTokenizer st = new StringTokenizer(f, "."); // NOI18N try { n = NodeOp.findPath(root, st); break; } catch (NodeNotFoundException ex) { if (!st.hasMoreElements()) { // a test for !hasMoreElements is here to be sure that // all tokens has been read, so only the last item // has not been found // check whether we can continue from the nod final String sugg = computeSuggestion( ex.getClosestNode(), ex.getMissingChildName(), null ); if (closest==null||selected.contains(root)&&sugg!=null) { // if we can go on and there has been no suggestion o // this is the current filesystem => go o closest = ex; } } } } if (n!=null) { // closest node not used closest=null; } else { if (closest==null) { // the node has not been even found return false; } // we will select the closest node found - old version n=closest.getClosestNode(); } // remove listener + do change + add listener ExplorerManager em=packagesPanel.getExplorerManager(); em.removePropertyChangeListener(this); // change the text if we want to add suggestion if (closest!=null) { Node[] first=new Node[1]; final String sugg=computeSuggestion( closest.getClosestNode(), closest.getMissingChildName(), first ); if (sugg != null) { packageName.getDocument().removeDocumentListener( DataFolderPanel.this ); packageName.setText(f + sugg); updateDirectory(); javax.swing.text.Caret c = packageName.getCaret(); c.setDot(f.length() + sugg.length()); c.moveDot(f.length()); packageName.getDocument().addDocumentListener( DataFolderPanel.this ); } if (first[0] != null) { // show the first node that fits n = first[0]; } } // change the node try { em.setSelectedNodes(new Node[] {n}); //beanTreeView.selectionChanged(new Node[] { n }, em); } catch (PropertyVetoException ex) { throw new InternalError(); } // change the selected filesystem df = (DataFolder)n.getCookie(DataFolder.class); if (df != null) { try { FileSystem fs = df.getPrimaryFile().getFileSystem(); system = new WeakReference(fs); } catch (FileStateInvalidException ex) { } } em.addPropertyChangeListener(this); return closest == null; } /** * Creates default package name for given file system. * * @param fs the file system * @return localized name of default package */ private static String defaultPackageName(FileSystem fs) { if (defaultPackageName == null) { defaultPackageName = new MessageFormat( bundle.getString("FMT_TemplateDefaultPackageName") ); } String n = fs == null ? "" : fs.getDisplayName(); return defaultPackageName.format(new Object[] { n }); } /** * Updates directory name */ private void updateDirectory() { StringBuffer sb = new StringBuffer(); FileSystem fs = (FileSystem)system.get(); if (fs != null) { sb.append(fs.getDisplayName()); } String name = packageName.getText(); if (name.equals(defaultPackageName(fs))) { name = ""; } if (name.length() > 0) { sb.append(java.io.File.separatorChar); sb.append(name.replace('.', java.io.File.separatorChar)); } directoryName.setText(sb.toString()); } /** * Sets the state of the createButton. */ private void enableCreateButton() { String name = null; if (df != null) { name = df.getPrimaryFile().getPackageName('.'); } else { name = ""; } if (name.equals(packageName.getText())) { // nothing to create createButton.setEnabled(false); } else { createButton.setEnabled(isValid()); } } /** * Get the customized property value. * * @return the property value * @exception InvalidStateException when the custom property editor * does not contain a valid property value (and thus it should not be set) */ public Object getPropertyValue() throws IllegalStateException { if (isValid()) { DataFolder old = df; try { df = getTargetFolder(true); return df; } catch (IOException x) { TopManager.getDefault().notifyException(x); throw new IllegalStateException(); } } else { throw new IllegalStateException(); } } /** * Returns name of the snapshot. */ public String getSnapshotName() { return nameTextField.getText(); } } /* * $Log: DataFolderPanel.java,v $ * Revision 1.1 2002/02/26 00:59:51 stolis * Panel for snapshot saving. * */ --- NEW FILE: DataFolderPanel.form --- <?xml version="1.0" encoding="UTF-8" ?> <Form version="1.1"> <SyntheticProperties> <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-111"/> </SyntheticProperties> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> <SubComponents> <Container class="org.openide.explorer.ExplorerPanel" name="packagesPanel"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> <BorderConstraints direction="Center"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Container class="org.openide.explorer.view.BeanTreeView" name="beanTreeView"> <Properties> <Property name="popupAllowed" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="0" gridY="2" gridWidth="3" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="8" insetsBottom="8" insetsRight="8" anchor="10" weightX="1.0" weightY="1.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> </Container> <Component class="javax.swing.JLabel" name="descriptionLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="bundle.getString("LAB_TargetLocationDescription")" type="code"/> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="0" gridY="1" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="8" insetsBottom="0" insetsRight="8" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="packageLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="bundle.getString("LAB_package")" type="code"/> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="0" insetsRight="8" anchor="18" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="packageName"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JLabel" name="dirLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="bundle.getString("LAB_directory")" type="code"/> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="8" insetsBottom="8" insetsRight="8" anchor="18" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="directoryName"> <Properties> <Property name="enabled" type="boolean" value="false"/> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="1" gridY="4" gridWidth="2" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="8" insetsLeft="0" insetsBottom="8" insetsRight="8" anchor="18" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JButton" name="createButton"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="bundle.getString("CTL_Create")" type="code"/> </Property> <Property name="enabled" type="boolean" value="false"/> </Properties> <Events> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="createButtonActionPerformed"/> </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="2" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="0" insetsRight="8" anchor="18" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Container class="javax.swing.JPanel" name="jPanel1"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="0" gridY="0" gridWidth="3" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="8" insetsBottom="0" insetsRight="8" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> <SubComponents> <Component class="javax.swing.JLabel" name="nameLabel"> <Properties> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Connection code="bundle.getString("LBL_snapshotName")" type="code"/> </Property> </Properties> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="8" anchor="10" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> </Component> <Component class="javax.swing.JTextField" name="nameTextField"> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/> </Constraint> </Constraints> </Component> </SubComponents> </Container> </SubComponents> </Container> </SubComponents> </Form> Index: Bundle.properties =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/Bundle.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Bundle.properties 27 Jan 2002 23:13:48 -0000 1.2 --- Bundle.properties 26 Feb 2002 00:59:51 -0000 1.3 *************** *** 40,41 **** --- 40,67 ---- LBL_snapshotTime=Time + + LBL_totalMemory=Total Memory + + LBL_takenMemory=Taken Memory + + LBL_freeMemory=Free Memory + + HINT_freeMemory=Memory in the VM not consumed by the process. + + HINT_totalMemory=Size of the allocated memory by the VM. + + HINT_takenMemory=Memory taken by the process. + + LAB_TargetLocationDescription=Please select a destination for the snapshot + + LAB_directory=Directory + + CTL_Create=Create + + LBL_saveSnapshotDialog=Save snapshot + + LBL_lblSnapshotName=Name: + + LAB_package=Package + + FMT_TemplateDefaultPackageName=<default package> [{0}] |