directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 9404 - incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber
Date Sat, 13 Mar 2004 07:04:07 GMT
Author: akarasulu
Date: Fri Mar 12 23:04:07 2004
New Revision: 9404

Added:
   incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleTreeAnalyzer.java
      - copied, changed from rev 9399, incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleAnalyzer.java
Removed:
   incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleAnalyzer.java
Log:
rename with a little anal fidgiting

Copied: incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleTreeAnalyzer.java
(from rev 9399, incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleAnalyzer.java)
==============================================================================
--- incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleAnalyzer.java
(original)
+++ incubator/directory/snickers/trunk/ber/src/java/org/apache/snickers/ber/TupleTreeAnalyzer.java
Fri Mar 12 23:04:07 2004
@@ -17,41 +17,41 @@
 package org.apache.snickers.ber ;
 
 
-import javax.swing.JFileChooser;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
+import javax.swing.JMenu ;
 import javax.swing.JTree ;
 import javax.swing.JFrame ;
 import javax.swing.JPanel ;
 import javax.swing.JLabel ;
+import javax.swing.JMenuBar ;
+import javax.swing.JMenuItem ;
 import javax.swing.JTextArea ;
 import javax.swing.JTextField ;
 import javax.swing.JSplitPane ;
 import javax.swing.JScrollPane ;
-import javax.swing.tree.DefaultTreeModel;
+import javax.swing.JFileChooser ;
+import javax.swing.tree.DefaultTreeModel ;
 
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
+import java.awt.Toolkit ;
+import java.awt.Dimension ;
+import java.awt.BorderLayout ;
+import java.awt.event.ActionEvent ;
 import java.awt.event.WindowEvent ;
+import java.awt.event.ActionListener ;
 
 
 /**
- * $todo$ doc me
+ * Simple JTree view of a tuple tree.
  *
  * @author <a href="mailto:directory-dev@incubator.apache.org">
  * Apache Directory Project</a>
  * @version $Rev$
  */
-public class TupleAnalyzer extends JFrame 
+public class TupleTreeAnalyzer extends JFrame 
 {
     DefaultMutableTupleNode root = null ;
     
     /** Creates new form JFrame */
-    public TupleAnalyzer( DefaultMutableTupleNode root ) 
+    public TupleTreeAnalyzer( DefaultMutableTupleNode root ) 
     {
         this.root = root ;
         
@@ -59,7 +59,8 @@
         pack() ;
     }
 
-    /** This method is called from within the constructor to initialize the form. */
+    /** This method is called from within 
+     * the constructor to initialize the form. */
     private void initGUI() {
 
         getContentPane().setLayout(layout);
@@ -101,7 +102,7 @@
         openFile.addActionListener(
             new java.awt.event.ActionListener() {
                 public void actionPerformed(java.awt.event.ActionEvent e) {
-                    int returnVal = fc.showOpenDialog(TupleAnalyzer.this);
+                    int returnVal = fc.showOpenDialog(TupleTreeAnalyzer.this);
                     if (returnVal == javax.swing.JFileChooser.APPROVE_OPTION) {
                         java.io.File file = fc.getSelectedFile();
                         // Write your code here what to do with selected file
@@ -117,12 +118,12 @@
         saveFile.addActionListener(
             new java.awt.event.ActionListener() {
                 public void actionPerformed(java.awt.event.ActionEvent e) {
-                    int returnVal = fc.showSaveDialog(TupleAnalyzer.this);
+                    int returnVal = fc.showSaveDialog(TupleTreeAnalyzer.this);
                     if (returnVal == JFileChooser.APPROVE_OPTION) {
                         java.io.File file = fc.getSelectedFile();
                         // Write your code here what to do with selected file
                     } else {
-                        // Write your code here what to do if user has canceled Save dialog
+// Write your code here what to do if user has canceled Save dialog
                     }
                 }
             });
@@ -172,16 +173,24 @@
         jTree1.setShowsRootHandles(true);
         jPanel1.setLayout(new java.awt.GridBagLayout());
         jPanel1.add(jPanel2,
-        new java.awt.GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, java.awt.GridBagConstraints.WEST,
java.awt.GridBagConstraints.HORIZONTAL,
+        new java.awt.GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, 
+                        java.awt.GridBagConstraints.WEST, 
+                        java.awt.GridBagConstraints.HORIZONTAL,
         new java.awt.Insets(0, 9, 0, 9), 0, 0));
         jPanel1.add(jPanel3,
-        new java.awt.GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, java.awt.GridBagConstraints.WEST,
java.awt.GridBagConstraints.HORIZONTAL,
+        new java.awt.GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, 
+                        java.awt.GridBagConstraints.WEST, 
+                        java.awt.GridBagConstraints.HORIZONTAL,
         new java.awt.Insets(0, 9, 0, 9), 0, 0));
         jPanel1.add(jPanel4,
-        new java.awt.GridBagConstraints(0, 3, 1, 35, 1.0, 1.0, java.awt.GridBagConstraints.CENTER,
java.awt.GridBagConstraints.BOTH,
+        new java.awt.GridBagConstraints(0, 3, 1, 35, 1.0, 1.0, 
+                        java.awt.GridBagConstraints.CENTER, 
+                        java.awt.GridBagConstraints.BOTH,
         new java.awt.Insets(9, 12, 9, 12), 0, 0));
         jPanel1.add(jPanel5,
-        new java.awt.GridBagConstraints(0, 2, 1, 1, 1.0, 1.0, java.awt.GridBagConstraints.WEST,
java.awt.GridBagConstraints.HORIZONTAL,
+        new java.awt.GridBagConstraints(0, 2, 1, 1, 1.0, 1.0, 
+                        java.awt.GridBagConstraints.WEST, 
+                        java.awt.GridBagConstraints.HORIZONTAL,
         new java.awt.Insets(0, 9, 0, 9), 0, 0));
         jLabel1.setText("Tag Id:");
         jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
@@ -192,9 +201,13 @@
         jPanel3.add(jLabel2);
         jPanel3.add(jTextField2);
         jPanel4.setLayout(new java.awt.BorderLayout());
-        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(
-        new java.awt.Color(153, 153, 153), 1), "Value", javax.swing.border.TitledBorder.LEADING,
javax.swing.border.TitledBorder.TOP,
-        new java.awt.Font("Comic Sans MS", 0, 14), new java.awt.Color(60, 60, 60)));
+        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(
+                        javax.swing.BorderFactory.createLineBorder(
+        new java.awt.Color(153, 153, 153), 1), "Value", 
+                        javax.swing.border.TitledBorder.LEADING, 
+                        javax.swing.border.TitledBorder.TOP,
+        new java.awt.Font("Comic Sans MS", 0, 14), 
+                        new java.awt.Color(60, 60, 60)));
         jPanel4.add(jScrollPane2, java.awt.BorderLayout.CENTER);
         jTextArea1.setText("");
         jScrollPane2.getViewport().add(jTextArea1);
@@ -206,8 +219,10 @@
         jTextField2.setPreferredSize(new java.awt.Dimension(104,25));
         jTextField2.setMinimumSize(new java.awt.Dimension(104,25));
         jTextField2.setEditable(true);
-        jScrollPane2.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
-        jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
+        jScrollPane2.setVerticalScrollBarPolicy(
+                javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
+        jScrollPane2.setHorizontalScrollBarPolicy(
+                javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
         jScrollPane2.setBorder(null);
         
         jTree1.setModel( new DefaultTreeModel( root ) ) ;
@@ -224,9 +239,12 @@
         setSize( 800, 640 ) ;
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
         Dimension frameSize = getSize();
-        frameSize.height = ((frameSize.height > screenSize.height) ? screenSize.height
: frameSize.height);
-        frameSize.width = ((frameSize.width > screenSize.width) ? screenSize.width : frameSize.width);
-        setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height)
/ 2);
+        frameSize.height = ((frameSize.height > screenSize.height) 
+                ? screenSize.height : frameSize.height);
+        frameSize.width = ((frameSize.width > screenSize.width) 
+                ? screenSize.width : frameSize.width);
+        setLocation((screenSize.width - frameSize.width) / 2, 
+                (screenSize.height - frameSize.height) / 2);
         setVisible(true);
     }
 

Mime
View raw message