directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376623 [12/38] - in /directory/sandbox/akarasulu/rc1/apacheds: core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/src/main/java/org/...
Date Fri, 10 Feb 2006 10:49:57 GMT
Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AddEntryDialog.java Fri Feb 10 02:48:07 2006
@@ -50,7 +50,7 @@
  */
 public class AddEntryDialog extends JDialog implements ActionListener
 {
-    private static final Logger log = LoggerFactory.getLogger(AddEntryDialog.class);
+    private static final Logger log = LoggerFactory.getLogger( AddEntryDialog.class );
 
     private static final long serialVersionUID = 3544671793504663604L;
 
@@ -77,7 +77,7 @@
      * @param parent the parent frame
      * @param modal whether or not to go modal on the dialog
      */
-    public AddEntryDialog( Frame parent, boolean modal )
+    public AddEntryDialog(Frame parent, boolean modal)
     {
         super( parent, modal );
         m_childEntry.put( "objectClass", "top" );
@@ -90,167 +90,82 @@
      */
     private void initGUI()
     {
-        addWindowListener( new java.awt.event.WindowAdapter(  )
+        addWindowListener( new java.awt.event.WindowAdapter()
         {
             public void windowClosing( java.awt.event.WindowEvent evt )
             {
-                closeDialog( );
+                closeDialog();
             }
         } );
-        pack(  );
+        pack();
         setBounds( new java.awt.Rectangle( 0, 0, 447, 364 ) );
         setTitle( "Add New Entry" );
-        getContentPane(  ).setLayout( new java.awt.GridBagLayout(  ) );
-        getContentPane(  ).add( 
+        getContentPane().setLayout( new java.awt.GridBagLayout() );
+        getContentPane().add(
             m_namePnl,
-            new java.awt.GridBagConstraints( 
-                0,
-                0,
-                1,
-                1,
-                1.0,
-                0.0,
-                java.awt.GridBagConstraints.NORTH,
-                java.awt.GridBagConstraints.HORIZONTAL,
-                new java.awt.Insets( 5, 5, 5, 5 ),
-                0,
-                0 ) );
-        getContentPane(  ).add( 
+            new java.awt.GridBagConstraints( 0, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.NORTH,
+                java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 5, 5, 5, 5 ), 0, 0 ) );
+        getContentPane().add(
             m_attrPnl,
-            new java.awt.GridBagConstraints( 
-                0,
-                1,
-                1,
-                1,
-                1.0,
-                1.0,
-                java.awt.GridBagConstraints.CENTER,
-                java.awt.GridBagConstraints.BOTH,
-                new java.awt.Insets( 5, 5, 5, 5 ),
-                0,
-                0 ) );
-        getContentPane(  ).add( 
+            new java.awt.GridBagConstraints( 0, 1, 1, 1, 1.0, 1.0, java.awt.GridBagConstraints.CENTER,
+                java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 5, 5, 5, 5 ), 0, 0 ) );
+        getContentPane().add(
             m_buttonPnl,
-            new java.awt.GridBagConstraints( 
-                0,
-                2,
-                1,
-                1,
-                1.0,
-                0.05,
-                java.awt.GridBagConstraints.CENTER,
-                java.awt.GridBagConstraints.HORIZONTAL,
-                new java.awt.Insets( 0, 0, 0, 20 ),
-                0,
-                0 ) );
-        m_namePnl.setBorder( 
-            javax.swing.BorderFactory.createTitledBorder( 
-                javax.swing.BorderFactory.createLineBorder( 
-                    new java.awt.Color( 153, 153, 153 ),
-                    1 ),
-                "Naming",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font( "SansSerif", 0, 14 ),
-                new java.awt.Color( 60, 60, 60 ) ) );
-        m_namePnl.setLayout( 
-            new javax.swing.BoxLayout( m_namePnl, javax.swing.BoxLayout.Y_AXIS ) );
+            new java.awt.GridBagConstraints( 0, 2, 1, 1, 1.0, 0.05, java.awt.GridBagConstraints.CENTER,
+                java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 0, 0, 0, 20 ), 0, 0 ) );
+        m_namePnl.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Naming", javax.swing.border.TitledBorder.LEADING,
+            javax.swing.border.TitledBorder.TOP, new java.awt.Font( "SansSerif", 0, 14 ), new java.awt.Color( 60, 60,
+                60 ) ) );
+        m_namePnl.setLayout( new javax.swing.BoxLayout( m_namePnl, javax.swing.BoxLayout.Y_AXIS ) );
         m_namePnl.add( m_rdnPnl );
         m_namePnl.add( m_dnPnl );
         m_rdnLbl.setText( "Rdn:" );
         m_rdnPnl.setLayout( new java.awt.GridBagLayout() );
-        m_rdnPnl.add( 
-            m_rdnChoice,
-            new java.awt.GridBagConstraints( 
-                1,
-                0,
-                1,
-                1,
-                1.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets( 0, 10, 0, 0 ),
-                0,
-                0 ) );
-        m_rdnPnl.add( 
-            m_rdnLbl,
-            new java.awt.GridBagConstraints( 
-                0,
-                0,
-                1,
-                1,
-                0.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets( 0, 10, 0, 0 ),
-                0,
-                0 ) );
-        m_dnPnl.setLayout( new java.awt.GridBagLayout(  ) );
-        m_dnPnl.add( 
-            m_dnText,
-            new java.awt.GridBagConstraints( 
-                1,
-                0,
-                1,
-                1,
-                1.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.HORIZONTAL,
-                new java.awt.Insets( 0, 5, 0, 0 ),
-                0,
-                0 ) );
+        m_rdnPnl.add( m_rdnChoice, new java.awt.GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 10, 0, 0 ), 0,
+            0 ) );
+        m_rdnPnl.add( m_rdnLbl, new java.awt.GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 10, 0, 0 ), 0,
+            0 ) );
+        m_dnPnl.setLayout( new java.awt.GridBagLayout() );
+        m_dnPnl.add( m_dnText, new java.awt.GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.WEST,
+            java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 0, 5, 0, 0 ), 0, 0 ) );
         m_dnText.setText( "unknown" );
         m_dnText.setEditable( false );
-        m_dnText.setBorder( 
-            javax.swing.BorderFactory.createTitledBorder( 
-                javax.swing.BorderFactory.createLineBorder( 
-                    new java.awt.Color( 153, 153, 153 ),
-                    1 ),
-                "Dn",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font( "SansSerif", 0, 14 ),
-                new java.awt.Color( 60, 60, 60 ) ) );
+        m_dnText.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Dn", javax.swing.border.TitledBorder.LEADING,
+            javax.swing.border.TitledBorder.TOP, new java.awt.Font( "SansSerif", 0, 14 ), new java.awt.Color( 60, 60,
+                60 ) ) );
         m_rdnChoice.setEditable( true );
         m_rdnChoice.setMaximumRowCount( 6 );
-        
+
         m_rdnChoice.setSize( new java.awt.Dimension( 130, 24 ) );
-        m_attrPnl.setLayout( new java.awt.BorderLayout(  ) );
+        m_attrPnl.setLayout( new java.awt.BorderLayout() );
         m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER );
-        m_attrScrollPnl.getViewport(  ).add( m_attrTbl );
+        m_attrScrollPnl.getViewport().add( m_attrTbl );
         m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) );
         m_attrTbl.setCellSelectionEnabled( true );
-        
+
         m_doneBut.setText( "Done" );
-        m_buttonPnl.setLayout( 
-            new java.awt.FlowLayout( java.awt.FlowLayout.RIGHT, 10, 5 ) );
+        m_buttonPnl.setLayout( new java.awt.FlowLayout( java.awt.FlowLayout.RIGHT, 10, 5 ) );
         m_buttonPnl.add( m_doneBut );
         m_buttonPnl.add( m_cancelBut );
         m_cancelBut.setText( "Cancel" );
-        m_cancelBut.addActionListener( new ActionListener () 
+        m_cancelBut.addActionListener( new ActionListener()
         {
             public void actionPerformed( ActionEvent a_evt )
             {
                 closeDialog();
             }
         } );
-        m_attrScrollPnl.setBorder( 
-            javax.swing.BorderFactory.createTitledBorder( 
-                javax.swing.BorderFactory.createLineBorder( 
-                    new java.awt.Color( 153, 153, 153 ),
-                    1 ),
-                "Attributes",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font( "SansSerif", 0, 14 ),
-                new java.awt.Color( 60, 60, 60 ) ) );
-
-        m_attrTbl.setModel( new AttributesTableModel( m_childEntry, 
-            null, null, true ) );
-    
+        m_attrScrollPnl.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory
+            .createLineBorder( new java.awt.Color( 153, 153, 153 ), 1 ), "Attributes",
+            javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP, new java.awt.Font(
+                "SansSerif", 0, 14 ), new java.awt.Color( 60, 60, 60 ) ) );
+
+        m_attrTbl.setModel( new AttributesTableModel( m_childEntry, null, null, true ) );
+
         //
         // Build the table's popup menu
         //
@@ -264,57 +179,54 @@
         l_menuItem.setActionCommand( "Delete" );
         l_menuItem.addActionListener( this );
         m_popup.add( l_menuItem );
-    
+
         // Add listener to components that can bring up popup menus.
         m_attrTbl.addMouseListener( new PopupListener() );
-        
+
         setUpEditor( m_attrTbl );
     }
 
 
-    private void setUpEditor( JTable l_table ) 
+    private void setUpEditor( JTable l_table )
     {
         //Set up the editor for the integer cells.
         final JTextField l_textField = new JTextField();
 
-        
-        DefaultCellEditor l_textEditor = 
-            new DefaultCellEditor( l_textField ) 
+        DefaultCellEditor l_textEditor = new DefaultCellEditor( l_textField )
         {
             private static final long serialVersionUID = 3256727286014554675L;
 
+
             //Override DefaultCellEditor's getCellEditorValue method
             //to return an Integer, not a String:
-            public Object getCellEditorValue() 
+            public Object getCellEditorValue()
             {
-                if (log.isDebugEnabled())
+                if ( log.isDebugEnabled() )
                     log.debug( "Editor returning '" + l_textField.getText() + "'" );
                 return l_textField.getText();
             }
         };
-        
+
         l_table.setDefaultEditor( String.class, l_textEditor );
     }
 
-
-
-    class PopupListener extends MouseAdapter 
+    class PopupListener extends MouseAdapter
     {
-        public void mousePressed( MouseEvent e ) 
+        public void mousePressed( MouseEvent e )
         {
             maybeShowPopup( e );
         }
 
-        
-        public void mouseReleased( MouseEvent e ) 
+
+        public void mouseReleased( MouseEvent e )
         {
             maybeShowPopup( e );
         }
 
-      
-        private void maybeShowPopup( MouseEvent e ) 
+
+        private void maybeShowPopup( MouseEvent e )
         {
-            if ( e.isPopupTrigger() ) 
+            if ( e.isPopupTrigger() )
             {
                 m_popup.show( e.getComponent(), e.getX(), e.getY() );
             }
@@ -325,29 +237,26 @@
     public void actionPerformed( ActionEvent a_event )
     {
         String l_cmd = a_event.getActionCommand();
-        AttributesTableModel l_model = ( AttributesTableModel ) 
-            m_attrTbl.getModel();
+        AttributesTableModel l_model = ( AttributesTableModel ) m_attrTbl.getModel();
         int l_row = m_attrTbl.getSelectedRow();
         log.debug( l_cmd );
-        
+
         if ( l_row >= l_model.getRowCount() || l_row < 0 )
         {
-            JOptionPane.showMessageDialog( this, 
-                "Row needs to be selected to apply operation" );
+            JOptionPane.showMessageDialog( this, "Row needs to be selected to apply operation" );
         }
-        
+
         if ( l_cmd.equals( "Add" ) )
         {
-             l_model.insert( l_row, "xxxx", "xxxx" );
+            l_model.insert( l_row, "xxxx", "xxxx" );
         }
         else if ( l_cmd.equals( "Delete" ) )
         {
             l_model.delete( l_row );
         }
-        else 
+        else
         {
-            JOptionPane.showMessageDialog( this, 
-                "Unrecognized action - abandoning action processing." );
+            JOptionPane.showMessageDialog( this, "Unrecognized action - abandoning action processing." );
         }
     }
 
@@ -364,14 +273,14 @@
     {
         m_dnText.setText( dn );
     }
-    
-    
+
+
     public Attributes getChildEntry()
     {
         return m_childEntry;
     }
-    
-    
+
+
     public String getChildDn()
     {
         return m_dnText.getText();

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AnnotatedFilterTreeDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AnnotatedFilterTreeDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AnnotatedFilterTreeDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AnnotatedFilterTreeDialog.java Fri Feb 10 02:48:07 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.partition.impl.btree.gui ;
+package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
 import java.awt.Frame;
@@ -37,8 +37,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class AnnotatedFilterTreeDialog
-    extends JDialog
+public class AnnotatedFilterTreeDialog extends JDialog
 {
     private static final long serialVersionUID = 3690476917916513074L;
     private JPanel jPanel1 = new JPanel();
@@ -49,81 +48,94 @@
     private JScrollPane jScrollPane1 = new JScrollPane();
     private JButton jButton1 = new JButton();
 
+
     /** Creates new form JDialog */
-    public AnnotatedFilterTreeDialog(Frame parent, boolean modal) {
-        super(parent, modal);
+    public AnnotatedFilterTreeDialog(Frame parent, boolean modal)
+    {
+        super( parent, modal );
         initGUI();
     }
 
+
     /** This method is called from within the constructor to initialize the form. */
-    private void initGUI() {
-        addWindowListener(
-            new java.awt.event.WindowAdapter() {
-                public void windowClosing(java.awt.event.WindowEvent evt) {
-                    closeDialog(evt);
-                }
-            });
+    private void initGUI()
+    {
+        addWindowListener( new java.awt.event.WindowAdapter()
+        {
+            public void windowClosing( java.awt.event.WindowEvent evt )
+            {
+                closeDialog( evt );
+            }
+        } );
         pack();
-        getContentPane().setLayout(new java.awt.GridBagLayout());
-        getContentPane().add(jPanel1,
-        new java.awt.GridBagConstraints(0, 0, 1, 1, 1.0, 0.1, java.awt.GridBagConstraints.NORTH, java.awt.GridBagConstraints.BOTH,
-        new java.awt.Insets(10, 5, 5, 5), 0, 0));
-        getContentPane().add(jPanel2,
-        new java.awt.GridBagConstraints(0, 1, 1, 1, 1.0, 0.8, java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.BOTH,
-        new java.awt.Insets(5, 5, 5, 5), 0, 0));
-        getContentPane().add(jPanel3,
-        new java.awt.GridBagConstraints(0, 2, 1, 1, 1.0, 0.1, java.awt.GridBagConstraints.SOUTH, java.awt.GridBagConstraints.HORIZONTAL,
-        new java.awt.Insets(0, 0, 0, 0), 0, 0));
-        jPanel1.setLayout(new java.awt.BorderLayout(10, 10));
-        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(
-        new java.awt.Color(153, 153, 153), 1), "Search Filter", javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP,
-        new java.awt.Font("SansSerif", 0, 14), new java.awt.Color(60, 60, 60)));
-        jPanel1.add(jTextArea1, java.awt.BorderLayout.CENTER);
-        jScrollPane1.getViewport().add(jTree1);
-        jTree1.setBounds(new java.awt.Rectangle(238,142,82,80));
-        jTextArea1.setText("");
-        jTextArea1.setEditable(false);
-        setBounds(new java.awt.Rectangle(0,0,485,414));
-        jPanel2.setLayout(new java.awt.BorderLayout());
-        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(
-        new java.awt.Color(153, 153, 153), 1),
-        "Filter Expression Tree", javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP,
-        new java.awt.Font("SansSerif", 0, 14), new java.awt.Color(60, 60, 60)));
-        jPanel2.add(jScrollPane1, java.awt.BorderLayout.CENTER);
-        jButton1.setText("Done");
-        jButton1.setActionCommand("Done");
-		jButton1.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent a_event) {
-                AnnotatedFilterTreeDialog.this.setVisible(false) ;
-				AnnotatedFilterTreeDialog.this.dispose() ;
+        getContentPane().setLayout( new java.awt.GridBagLayout() );
+        getContentPane().add(
+            jPanel1,
+            new java.awt.GridBagConstraints( 0, 0, 1, 1, 1.0, 0.1, java.awt.GridBagConstraints.NORTH,
+                java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 10, 5, 5, 5 ), 0, 0 ) );
+        getContentPane().add(
+            jPanel2,
+            new java.awt.GridBagConstraints( 0, 1, 1, 1, 1.0, 0.8, java.awt.GridBagConstraints.CENTER,
+                java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 5, 5, 5, 5 ), 0, 0 ) );
+        getContentPane().add(
+            jPanel3,
+            new java.awt.GridBagConstraints( 0, 2, 1, 1, 1.0, 0.1, java.awt.GridBagConstraints.SOUTH,
+                java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 0, 0, 0, 0 ), 0, 0 ) );
+        jPanel1.setLayout( new java.awt.BorderLayout( 10, 10 ) );
+        jPanel1.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Search Filter", javax.swing.border.TitledBorder.LEADING,
+            javax.swing.border.TitledBorder.TOP, new java.awt.Font( "SansSerif", 0, 14 ), new java.awt.Color( 60, 60,
+                60 ) ) );
+        jPanel1.add( jTextArea1, java.awt.BorderLayout.CENTER );
+        jScrollPane1.getViewport().add( jTree1 );
+        jTree1.setBounds( new java.awt.Rectangle( 238, 142, 82, 80 ) );
+        jTextArea1.setText( "" );
+        jTextArea1.setEditable( false );
+        setBounds( new java.awt.Rectangle( 0, 0, 485, 414 ) );
+        jPanel2.setLayout( new java.awt.BorderLayout() );
+        jPanel2.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Filter Expression Tree",
+            javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP, new java.awt.Font(
+                "SansSerif", 0, 14 ), new java.awt.Color( 60, 60, 60 ) ) );
+        jPanel2.add( jScrollPane1, java.awt.BorderLayout.CENTER );
+        jButton1.setText( "Done" );
+        jButton1.setActionCommand( "Done" );
+        jButton1.addActionListener( new ActionListener()
+        {
+            public void actionPerformed( ActionEvent a_event )
+            {
+                AnnotatedFilterTreeDialog.this.setVisible( false );
+                AnnotatedFilterTreeDialog.this.dispose();
             }
-        }) ;
-        jButton1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
-        jButton1.setAlignmentX(0.5f);
-        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
-        jPanel3.setPreferredSize(new java.awt.Dimension(79, 41));
-        jPanel3.setMinimumSize(new java.awt.Dimension(79, 41));
-        jPanel3.setSize(new java.awt.Dimension(471,35));
-        jPanel3.setToolTipText("");
-        jPanel3.add(jButton1);
+        } );
+        jButton1.setHorizontalAlignment( javax.swing.SwingConstants.CENTER );
+        jButton1.setAlignmentX( 0.5f );
+        jButton1.setHorizontalTextPosition( javax.swing.SwingConstants.CENTER );
+        jPanel3.setPreferredSize( new java.awt.Dimension( 79, 41 ) );
+        jPanel3.setMinimumSize( new java.awt.Dimension( 79, 41 ) );
+        jPanel3.setSize( new java.awt.Dimension( 471, 35 ) );
+        jPanel3.setToolTipText( "" );
+        jPanel3.add( jButton1 );
     }
 
+
     /** Closes the dialog */
-    private void closeDialog(WindowEvent evt) {
+    private void closeDialog( WindowEvent evt )
+    {
         evt.getWindow();
-        setVisible(false);
+        setVisible( false );
         dispose();
     }
 
 
-    public void setModel(TreeModel a_model)
+    public void setModel( TreeModel a_model )
     {
-        this.jTree1.setModel(a_model) ;
+        this.jTree1.setModel( a_model );
     }
 
 
-    public void setFilter(String a_filter)
+    public void setFilter( String a_filter )
     {
-        this.jTextArea1.setText(a_filter) ;
+        this.jTextArea1.setText( a_filter );
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java Fri Feb 10 02:48:07 2006
@@ -64,23 +64,22 @@
      * @param dn the distinguished name of the entry
      * @param isMutable whether or not the model can be changed
      */
-    public AttributesTableModel( Attributes entry, BigInteger id, String dn,
-                                 boolean isMutable )
+    public AttributesTableModel(Attributes entry, BigInteger id, String dn, boolean isMutable)
     {
         this.dn = dn;
         this.id = id;
         this.entry = entry;
         this.isMutable = isMutable;
-        
+
         NamingEnumeration list = entry.getIDs();
         int rowCount = 0;
-        
-        while( list.hasMoreElements() )
+
+        while ( list.hasMoreElements() )
         {
             String attrId = ( String ) list.nextElement();
             rowCount = rowCount + entry.get( attrId ).size();
         }
-        
+
         keyList = new ArrayList( rowCount );
         valList = new ArrayList( rowCount );
 
@@ -89,10 +88,10 @@
         {
             String l_key = ( String ) list.nextElement();
             Attribute l_attr = this.entry.get( l_key );
-            
+
             for ( int ii = 0; ii < l_attr.size(); ii++ )
             {
-                try 
+                try
                 {
                     keyList.add( l_attr.getID() );
                     valList.add( l_attr.get( ii ) );
@@ -114,15 +113,14 @@
         if ( col == 0 )
         {
             return KEY_COL;
-        } 
+        }
         else if ( col == 1 )
         {
             return VAL_COL;
-        } 
-        else 
+        }
+        else
         {
-            throw new RuntimeException("There can only be 2 columns at index "
-                + "0 and at 1");
+            throw new RuntimeException( "There can only be 2 columns at index " + "0 and at 1" );
         }
     }
 
@@ -168,20 +166,20 @@
      */
     public Object getValueAt( int row, int col )
     {
-		if ( row >= keyList.size() )
+        if ( row >= keyList.size() )
         {
-			return ( "NULL" );
-		}
+            return ( "NULL" );
+        }
 
         if ( getColumnName( col ).equals( KEY_COL ) )
         {
             return keyList.get( row );
-        } 
+        }
         else if ( getColumnName( col ).equals( VAL_COL ) )
         {
             return valList.get( row );
-        } 
-        else 
+        }
+        else
         {
             throw new RuntimeException( "You didn't correctly set col names" );
         }
@@ -194,7 +192,7 @@
     public void setValue( Object val, int row, int col )
     {
         ArrayList list = null;
-        
+
         if ( col > 1 || col < 0 )
         {
             return;
@@ -203,11 +201,11 @@
         {
             list = keyList;
         }
-        else 
+        else
         {
             list = valList;
         }
-        
+
         if ( row >= keyList.size() )
         {
             return;
@@ -227,8 +225,8 @@
     {
         return dn;
     }
-    
-    
+
+
     /**
      * Gets the unique id for the entry.
      *
@@ -251,7 +249,7 @@
         {
             return;
         }
-        
+
         keyList.remove( row );
         valList.remove( row );
         fireTableRowsDeleted( row, row );
@@ -271,7 +269,7 @@
         {
             return;
         }
-        
+
         keyList.add( row, key );
         valList.add( row, val );
         fireTableRowsInserted( row, row );

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryDialog.java Fri Feb 10 02:48:07 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.partition.impl.btree.gui ;
+package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
 import java.awt.Frame;
@@ -42,24 +42,24 @@
 {
     private static final long serialVersionUID = 3761684611092001592L;
 
-    private JPanel m_namePnl = new JPanel() ;
-    private JPanel m_attrPnl = new JPanel() ;
-    private JPanel m_buttonPnl = new JPanel() ;
-    private JPanel m_rdnPnl = new JPanel() ;
-    private JPanel m_dnPnl = new JPanel() ;
-    private JLabel m_rdnLbl = new JLabel() ;
-    private JComboBox m_rdnChoice = new JComboBox() ;
-    private JTextField m_dnText = new JTextField() ;
-    private JScrollPane m_attrScrollPnl = new JScrollPane() ;
-    private JTable m_attrTbl = new JTable() ;
-    private JButton m_doneBut = new JButton() ;
-    private JButton m_cancelBut = new JButton() ;
-
-//    private String m_opMode = "Add" ;
-//    private String m_dn ;
-//    private String m_rdn ;
-//    private Attributes m_entry ;
-
+    private JPanel m_namePnl = new JPanel();
+    private JPanel m_attrPnl = new JPanel();
+    private JPanel m_buttonPnl = new JPanel();
+    private JPanel m_rdnPnl = new JPanel();
+    private JPanel m_dnPnl = new JPanel();
+    private JLabel m_rdnLbl = new JLabel();
+    private JComboBox m_rdnChoice = new JComboBox();
+    private JTextField m_dnText = new JTextField();
+    private JScrollPane m_attrScrollPnl = new JScrollPane();
+    private JTable m_attrTbl = new JTable();
+    private JButton m_doneBut = new JButton();
+    private JButton m_cancelBut = new JButton();
+
+
+    //    private String m_opMode = "Add" ;
+    //    private String m_dn ;
+    //    private String m_rdn ;
+    //    private Attributes m_entry ;
 
     /**
      * Creates new form JDialog
@@ -67,203 +67,119 @@
      * @param a_parent
      * @param a_modal
      */
-    public EntryDialog( Frame a_parent, String a_opMode, boolean a_modal )
+    public EntryDialog(Frame a_parent, String a_opMode, boolean a_modal)
     {
-        super( a_parent, a_modal ) ;
-//        m_opMode = a_opMode ;
-        initGUI() ;
+        super( a_parent, a_modal );
+        //        m_opMode = a_opMode ;
+        initGUI();
     }
 
 
     /** 
      * This method is called from within the constructor to initialize the form.
      */
-    private void initGUI( )
+    private void initGUI()
     {
-        addWindowListener( new java.awt.event.WindowAdapter(  )
+        addWindowListener( new java.awt.event.WindowAdapter()
         {
             public void windowClosing( java.awt.event.WindowEvent evt )
             {
-                closeDialog( ) ;
+                closeDialog();
             }
-        } ) ;
-        pack(  ) ;
-        setBounds( new java.awt.Rectangle( 0, 0, 447, 364 ) ) ;
-        setTitle( "Entry Dialog" ) ;
-        getContentPane(  ).setLayout( new java.awt.GridBagLayout(  ) ) ;
-        getContentPane(  ).add( 
+        } );
+        pack();
+        setBounds( new java.awt.Rectangle( 0, 0, 447, 364 ) );
+        setTitle( "Entry Dialog" );
+        getContentPane().setLayout( new java.awt.GridBagLayout() );
+        getContentPane().add(
             m_namePnl,
-            new java.awt.GridBagConstraints( 
-                0,
-                0,
-                1,
-                1,
-                1.0,
-                0.0,
-                java.awt.GridBagConstraints.NORTH,
-                java.awt.GridBagConstraints.HORIZONTAL,
-                new java.awt.Insets( 5, 5, 5, 5 ),
-                0,
-                0 ) ) ;
-        getContentPane(  ).add( 
+            new java.awt.GridBagConstraints( 0, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.NORTH,
+                java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 5, 5, 5, 5 ), 0, 0 ) );
+        getContentPane().add(
             m_attrPnl,
-            new java.awt.GridBagConstraints( 
-                0,
-                1,
-                1,
-                1,
-                1.0,
-                1.0,
-                java.awt.GridBagConstraints.CENTER,
-                java.awt.GridBagConstraints.BOTH,
-                new java.awt.Insets( 5, 5, 5, 5 ),
-                0,
-                0 ) ) ;
-        getContentPane(  ).add( 
+            new java.awt.GridBagConstraints( 0, 1, 1, 1, 1.0, 1.0, java.awt.GridBagConstraints.CENTER,
+                java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 5, 5, 5, 5 ), 0, 0 ) );
+        getContentPane().add(
             m_buttonPnl,
-            new java.awt.GridBagConstraints( 
-                0,
-                2,
-                1,
-                1,
-                1.0,
-                0.05,
-                java.awt.GridBagConstraints.CENTER,
-                java.awt.GridBagConstraints.HORIZONTAL,
-                new java.awt.Insets( 0, 0, 0, 20 ),
-                0,
-                0 ) ) ;
-        m_namePnl.setBorder( 
-            javax.swing.BorderFactory.createTitledBorder( 
-                javax.swing.BorderFactory.createLineBorder( 
-                    new java.awt.Color( 153, 153, 153 ),
-                    1 ),
-                "Naming",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font( "SansSerif", 0, 14 ),
-                new java.awt.Color( 60, 60, 60 ) ) ) ;
-        m_namePnl.setLayout( 
-            new javax.swing.BoxLayout( m_namePnl, javax.swing.BoxLayout.Y_AXIS ) ) ;
-        m_namePnl.add( m_rdnPnl ) ;
-        m_namePnl.add( m_dnPnl ) ;
-        m_rdnLbl.setText( "Rdn:" ) ;
-        m_rdnPnl.setLayout( new java.awt.GridBagLayout() ) ;
-        m_rdnPnl.add( 
-            m_rdnChoice,
-            new java.awt.GridBagConstraints( 
-                1,
-                0,
-                1,
-                1,
-                1.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets( 0, 10, 0, 0 ),
-                0,
-                0 ) ) ;
-        m_rdnPnl.add( 
-            m_rdnLbl,
-            new java.awt.GridBagConstraints( 
-                0,
-                0,
-                1,
-                1,
-                0.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets( 0, 10, 0, 0 ),
-                0,
-                0 ) ) ;
-        m_dnPnl.setLayout( new java.awt.GridBagLayout(  ) ) ;
-        m_dnPnl.add( 
-            m_dnText,
-            new java.awt.GridBagConstraints( 
-                1,
-                0,
-                1,
-                1,
-                1.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.HORIZONTAL,
-                new java.awt.Insets( 0, 5, 0, 0 ),
-                0,
-                0 ) ) ;
-        m_dnText.setText( "unknown" ) ;
-        m_dnText.setEditable( false ) ;
-        m_dnText.setBorder( 
-            javax.swing.BorderFactory.createTitledBorder( 
-                javax.swing.BorderFactory.createLineBorder( 
-                    new java.awt.Color( 153, 153, 153 ),
-                    1 ),
-                "Dn",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font( "SansSerif", 0, 14 ),
-                new java.awt.Color( 60, 60, 60 ) ) ) ;
-        m_rdnChoice.setEditable( true ) ;
-        m_rdnChoice.setMaximumRowCount( 6 ) ;
-        
-        m_rdnChoice.setSize( new java.awt.Dimension( 130, 24 ) ) ;
-        m_attrPnl.setLayout( new java.awt.BorderLayout(  ) ) ;
-        m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER ) ;
-        m_attrScrollPnl.getViewport(  ).add( m_attrTbl ) ;
-        m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) ) ;
-        m_attrTbl.setEditingColumn( 1 ) ;
-        m_attrTbl.setCellSelectionEnabled( true ) ;
-        m_doneBut.setText( "Done" ) ;
-        m_buttonPnl.setLayout( 
-            new java.awt.FlowLayout( java.awt.FlowLayout.RIGHT, 10, 5 ) ) ;
-        m_buttonPnl.add( m_doneBut ) ;
-        m_buttonPnl.add( m_cancelBut ) ;
-        m_cancelBut.setText( "Cancel" ) ;
-        m_cancelBut.addActionListener( new ActionListener () 
+            new java.awt.GridBagConstraints( 0, 2, 1, 1, 1.0, 0.05, java.awt.GridBagConstraints.CENTER,
+                java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 0, 0, 0, 20 ), 0, 0 ) );
+        m_namePnl.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Naming", javax.swing.border.TitledBorder.LEADING,
+            javax.swing.border.TitledBorder.TOP, new java.awt.Font( "SansSerif", 0, 14 ), new java.awt.Color( 60, 60,
+                60 ) ) );
+        m_namePnl.setLayout( new javax.swing.BoxLayout( m_namePnl, javax.swing.BoxLayout.Y_AXIS ) );
+        m_namePnl.add( m_rdnPnl );
+        m_namePnl.add( m_dnPnl );
+        m_rdnLbl.setText( "Rdn:" );
+        m_rdnPnl.setLayout( new java.awt.GridBagLayout() );
+        m_rdnPnl.add( m_rdnChoice, new java.awt.GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 10, 0, 0 ), 0,
+            0 ) );
+        m_rdnPnl.add( m_rdnLbl, new java.awt.GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 10, 0, 0 ), 0,
+            0 ) );
+        m_dnPnl.setLayout( new java.awt.GridBagLayout() );
+        m_dnPnl.add( m_dnText, new java.awt.GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.WEST,
+            java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 0, 5, 0, 0 ), 0, 0 ) );
+        m_dnText.setText( "unknown" );
+        m_dnText.setEditable( false );
+        m_dnText.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Dn", javax.swing.border.TitledBorder.LEADING,
+            javax.swing.border.TitledBorder.TOP, new java.awt.Font( "SansSerif", 0, 14 ), new java.awt.Color( 60, 60,
+                60 ) ) );
+        m_rdnChoice.setEditable( true );
+        m_rdnChoice.setMaximumRowCount( 6 );
+
+        m_rdnChoice.setSize( new java.awt.Dimension( 130, 24 ) );
+        m_attrPnl.setLayout( new java.awt.BorderLayout() );
+        m_attrPnl.add( m_attrScrollPnl, java.awt.BorderLayout.CENTER );
+        m_attrScrollPnl.getViewport().add( m_attrTbl );
+        m_attrTbl.setBounds( new java.awt.Rectangle( 78, 60, 32, 32 ) );
+        m_attrTbl.setEditingColumn( 1 );
+        m_attrTbl.setCellSelectionEnabled( true );
+        m_doneBut.setText( "Done" );
+        m_buttonPnl.setLayout( new java.awt.FlowLayout( java.awt.FlowLayout.RIGHT, 10, 5 ) );
+        m_buttonPnl.add( m_doneBut );
+        m_buttonPnl.add( m_cancelBut );
+        m_cancelBut.setText( "Cancel" );
+        m_cancelBut.addActionListener( new ActionListener()
         {
             public void actionPerformed( ActionEvent a_evt )
             {
-                closeDialog() ;
+                closeDialog();
             }
-        } ) ;
-        m_attrScrollPnl.setBorder( 
-            javax.swing.BorderFactory.createTitledBorder( 
-                javax.swing.BorderFactory.createLineBorder( 
-                    new java.awt.Color( 153, 153, 153 ),
-                    1 ),
-                "Attributes",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font( "SansSerif", 0, 14 ),
-                new java.awt.Color( 60, 60, 60 ) ) ) ;
+        } );
+        m_attrScrollPnl.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory
+            .createLineBorder( new java.awt.Color( 153, 153, 153 ), 1 ), "Attributes",
+            javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP, new java.awt.Font(
+                "SansSerif", 0, 14 ), new java.awt.Color( 60, 60, 60 ) ) );
     }
 
 
     /** Closes the dialog */
     private void closeDialog()
     {
-        setVisible( false ) ;
-        dispose() ;
+        setVisible( false );
+        dispose();
     }
 
 
     public void setDn( String a_dn )
     {
-//        m_dn = a_dn ;
-        m_dnText.setText( a_dn ) ;
+        //        m_dn = a_dn ;
+        m_dnText.setText( a_dn );
     }
-    
-    
+
+
     public void setRdn( String a_rdn )
     {
-//        m_rdn = a_rdn ;
+        //        m_rdn = a_rdn ;
         // m_rdnChoice.setSelectedItem(  ) ;
     }
-    
-    
+
+
     public void setEntry( Attributes a_entry )
     {
-//        m_entry = a_entry ;
+        //        m_entry = a_entry ;
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java Fri Feb 10 02:48:07 2006
@@ -42,45 +42,43 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class EntryNode
-	implements TreeNode
+public class EntryNode implements TreeNode
 {
     private final BTreeDirectoryPartition partition;
     private final EntryNode parent;
-	private final Attributes entry;
+    private final Attributes entry;
     private final ArrayList children;
     private final BigInteger id;
 
 
-    public EntryNode( BigInteger id, EntryNode parent, BTreeDirectoryPartition partition,
-        Attributes entry, HashMap map )
+    public EntryNode(BigInteger id, EntryNode parent, BTreeDirectoryPartition partition, Attributes entry, HashMap map)
     {
         this( id, parent, partition, entry, map, null, null );
     }
 
 
-    public EntryNode( BigInteger id, EntryNode parent, BTreeDirectoryPartition db,
-        Attributes entry, HashMap map, ExprNode exprNode,
-        SearchEngine engine )
+    public EntryNode(BigInteger id, EntryNode parent, BTreeDirectoryPartition db, Attributes entry, HashMap map,
+        ExprNode exprNode, SearchEngine engine)
     {
         this.partition = db;
         this.id = id;
-		this.entry = entry;
+        this.entry = entry;
         this.children = new ArrayList();
 
         if ( parent == null )
         {
             this.parent = this;
-        } 
-        else 
+        }
+        else
         {
             this.parent = parent;
         }
 
-		try {
+        try
+        {
             ArrayList records = new ArrayList();
             NamingEnumeration childList = db.list( id );
-            while( childList.hasMore() )
+            while ( childList.hasMore() )
             {
                 IndexRecord old = ( IndexRecord ) childList.next();
                 IndexRecord newRec = new IndexRecord();
@@ -90,8 +88,8 @@
             childList.close();
 
             Iterator list = records.iterator();
-            
-            while( list.hasNext() )
+
+            while ( list.hasNext() )
             {
                 IndexRecord rec = ( IndexRecord ) list.next();
 
@@ -99,12 +97,12 @@
                 {
                     if ( db.getChildCount( rec.getEntryId() ) == 0 )
                     {
-                        if( engine.evaluate( exprNode, rec.getEntryId() ) )
+                        if ( engine.evaluate( exprNode, rec.getEntryId() ) )
                         {
                             Attributes newEntry = db.lookup( rec.getEntryId() );
-                            EntryNode child = new EntryNode( rec.getEntryId(),
-                                    this, db, newEntry, map, exprNode, engine);
-                            children.add(child);
+                            EntryNode child = new EntryNode( rec.getEntryId(), this, db, newEntry, map, exprNode,
+                                engine );
+                            children.add( child );
                         }
                         else
                         {
@@ -114,21 +112,19 @@
                     else
                     {
                         Attributes newEntry = db.lookup( rec.getEntryId() );
-                        EntryNode child = new EntryNode( rec.getEntryId(),
-                            this, db, newEntry, map, exprNode, engine );
+                        EntryNode child = new EntryNode( rec.getEntryId(), this, db, newEntry, map, exprNode, engine );
                         children.add( child );
                     }
-                } 
+                }
                 else
                 {
                     Attributes newEntry = db.lookup( rec.getEntryId() );
-                    EntryNode child = new EntryNode( rec.getEntryId(), this,
-                        db, newEntry, map );
+                    EntryNode child = new EntryNode( rec.getEntryId(), this, db, newEntry, map );
                     children.add( child );
                 }
             }
-        } 
-        catch ( Exception e ) 
+        }
+        catch ( Exception e )
         {
             e.printStackTrace();
         }
@@ -151,7 +147,7 @@
 
     public TreeNode getChildAt( int childIndex )
     {
-		return ( TreeNode ) children.get( childIndex );
+        return ( TreeNode ) children.get( childIndex );
     }
 
 
@@ -179,34 +175,33 @@
     }
 
 
-    public String getEntryDn()
-        throws NamingException
+    public String getEntryDn() throws NamingException
     {
         return partition.getEntryDn( id );
     }
-    
+
 
     public String toString()
     {
         StringBuffer buf = new StringBuffer();
-        
+
         try
         {
             LdapName dn = new LdapName( partition.getEntryDn( id ) );
             buf.append( "(" ).append( id ).append( ") " );
             buf.append( dn.getRdn() );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             e.printStackTrace();
             buf.append( "ERROR: " + e.getMessage() );
         }
-        
+
         if ( children.size() > 0 )
         {
             buf.append( " [" ).append( children.size() ).append( "]" );
         }
-        
+
         return buf.toString();
     }
 
@@ -215,8 +210,8 @@
     {
         return entry;
     }
-    
-    
+
+
     public BigInteger getEntryId()
     {
         return id;

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/FilterDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/FilterDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/FilterDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/FilterDialog.java Fri Feb 10 02:48:07 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.core.partition.impl.btree.gui ;
+package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
 import java.awt.BorderLayout;
@@ -50,163 +50,171 @@
  */
 public class FilterDialog extends JDialog
 {
-	private static final long serialVersionUID = 3760565295319626294L;
+    private static final long serialVersionUID = 3760565295319626294L;
 
-    public static final String RUN_MODE = "Run" ;
-    public static final String LOAD_MODE = "Load" ;
-    public static final String DEBUG_MODE = "Debug" ;
-	public static final String ANNOTATE_MODE = "Annotate" ;
-
-    public static final String UNLIMITED = "Unlimited" ;
-
-	public static final String BASE_SCOPE = "Base Object" ;
-	public static final String SINGLE_SCOPE = "Single Level" ;
-	public static final String SUBTREE_SCOPE = "Subtree Level" ;
-
-    public static final String LOAD_CMD = "Load" ;
-    public static final String SEARCH_CMD = "Search" ;
-    public static final String CANCEL_CMD = "Cancel" ;
-
-    private JPanel m_northPnl = new JPanel() ;
-    private JPanel m_centerPnl = new JPanel() ;
-    private JTextArea m_filterText = new JTextArea() ;
-    private JLabel m_scopeLbl = new JLabel() ;
-    private JComboBox m_scopeChoice = new JComboBox() ;
-    private JLabel m_limitLbl = new JLabel() ;
-    private JTextField m_limitField = new JTextField() ;
-    private JPanel m_southPnl = new JPanel() ;
-    private JButton m_searchBut = new JButton() ;
-    private JButton m_cancelBut = new JButton() ;
-    private JScrollPane m_scrollPane = new JScrollPane() ;
-    private final String m_mode ;
+    public static final String RUN_MODE = "Run";
+    public static final String LOAD_MODE = "Load";
+    public static final String DEBUG_MODE = "Debug";
+    public static final String ANNOTATE_MODE = "Annotate";
+
+    public static final String UNLIMITED = "Unlimited";
+
+    public static final String BASE_SCOPE = "Base Object";
+    public static final String SINGLE_SCOPE = "Single Level";
+    public static final String SUBTREE_SCOPE = "Subtree Level";
+
+    public static final String LOAD_CMD = "Load";
+    public static final String SEARCH_CMD = "Search";
+    public static final String CANCEL_CMD = "Cancel";
+
+    private JPanel m_northPnl = new JPanel();
+    private JPanel m_centerPnl = new JPanel();
+    private JTextArea m_filterText = new JTextArea();
+    private JLabel m_scopeLbl = new JLabel();
+    private JComboBox m_scopeChoice = new JComboBox();
+    private JLabel m_limitLbl = new JLabel();
+    private JTextField m_limitField = new JTextField();
+    private JPanel m_southPnl = new JPanel();
+    private JButton m_searchBut = new JButton();
+    private JButton m_cancelBut = new JButton();
+    private JScrollPane m_scrollPane = new JScrollPane();
+    private final String m_mode;
     private JTextField m_baseText = new JTextField();
     private JPanel m_basePnl = new JPanel();
     private JLabel jLabel1 = new JLabel();
 
+
     /** Creates new form JDialog */
     public FilterDialog(String a_mode, JFrame parent, boolean modal)
     {
-        super(parent, modal) ;
-        m_mode = a_mode ;
-        initGUI() ;
+        super( parent, modal );
+        m_mode = a_mode;
+        initGUI();
     }
 
 
-	public void addActionListener(ActionListener l_listener)
+    public void addActionListener( ActionListener l_listener )
     {
-        m_searchBut.addActionListener(l_listener) ;
-        m_cancelBut.addActionListener(l_listener) ;
+        m_searchBut.addActionListener( l_listener );
+        m_cancelBut.addActionListener( l_listener );
     }
 
 
-
-	/**
+    /**
      * This method is called from within the constructor to initialize the form
      */
-    private void initGUI() {
-        m_baseText.setText("");
-        addWindowListener(
-            new WindowAdapter() {
-                public void windowClosing(WindowEvent evt) {
-                    closeDialog(evt);
-                }
-            }) ;
-        pack() ;
-
-        getContentPane().setLayout(new java.awt.GridBagLayout()) ;
-        getContentPane().add(m_northPnl,
-        new java.awt.GridBagConstraints(0, 0, 1, 1, 0.9, 0.0, java.awt.GridBagConstraints.NORTH, java.awt.GridBagConstraints.BOTH,
-        new java.awt.Insets(5, 5, 6, 0), 0, 0));
-        getContentPane().add(m_centerPnl,
-        new GridBagConstraints(0, 1, 1, 1, 0.9, 0.9,
-        GridBagConstraints.CENTER, GridBagConstraints.BOTH,
-        new Insets(10, 10, 10, 10), 0, 0));
-        getContentPane().add(m_southPnl,
-	        new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0,
-        	GridBagConstraints.SOUTH, GridBagConstraints.BOTH,
-    	    new Insets(0, 0, 2, 0), 0, 0)) ;
-        m_northPnl.setLayout(new GridBagLayout()) ;
-        m_northPnl.setBorder(null) ;
-        m_northPnl.add(m_scopeLbl,
-        new java.awt.GridBagConstraints(0, 0, 1, 1, 0.2, 0.0, java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.NONE,
-        new java.awt.Insets(5, 0, 5, 0), 0, 0));
-        m_northPnl.add(m_scopeChoice,
-        new java.awt.GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.HORIZONTAL,
-        new java.awt.Insets(9, 0, 7, 5), 0, 0));
-        m_northPnl.add(m_limitLbl,
-	        new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0,
-            GridBagConstraints.CENTER, GridBagConstraints.NONE,
-        	new Insets(5, 10, 5, 5), 0, 0)) ;
-        m_northPnl.add(m_limitField,
-        new java.awt.GridBagConstraints(3, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.HORIZONTAL,
-        new java.awt.Insets(11, 0, 9, 10), 0, 0));
-        m_northPnl.add(m_basePnl,
-        new java.awt.GridBagConstraints(0, 1, 4, 1, 0.0, 0.0, java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.BOTH,
-        new java.awt.Insets(5, 10, 5, 10), 0, 0));
-        m_filterText.setText("") ;
-        m_filterText.setBorder(null) ;
-        m_centerPnl.setLayout(new BorderLayout()) ;
-        m_centerPnl.setBorder(BorderFactory.createTitledBorder(
-            BorderFactory.createLineBorder(
-        		new Color(153, 153, 153), 1), "Search Filter",
-                TitledBorder.LEADING, TitledBorder.TOP,
-        		new Font("SansSerif", 0, 14), new Color(60, 60, 60))) ;
-        m_scrollPane.getViewport().add(m_filterText);
-        m_centerPnl.add(m_scrollPane, BorderLayout.CENTER) ;
-        m_scopeLbl.setText("Scope:") ;
-        m_scopeLbl.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 14));
-        m_scopeChoice.setSize(new java.awt.Dimension(115, 25));
-        m_scopeChoice.setMaximumSize(new Dimension(32767,25)) ;
-        m_scopeChoice.setMinimumSize(new java.awt.Dimension(115, 25));
-        m_scopeChoice.setPreferredSize(new Dimension(115, 25)) ;
-		m_scopeChoice.addItem(BASE_SCOPE) ;
-		m_scopeChoice.addItem(SINGLE_SCOPE) ;
-		m_scopeChoice.addItem(SUBTREE_SCOPE) ;
-
-        m_limitLbl.setText("Limit:") ;
-        m_limitField.setText("Unlimited") ;
-        m_limitField.setHorizontalAlignment(JTextField.CENTER) ;
-        m_southPnl.setLayout(new FlowLayout(FlowLayout.CENTER, 15, 5)) ;
-        m_southPnl.add(m_searchBut) ;
+    private void initGUI()
+    {
+        m_baseText.setText( "" );
+        addWindowListener( new WindowAdapter()
+        {
+            public void windowClosing( WindowEvent evt )
+            {
+                closeDialog( evt );
+            }
+        } );
+        pack();
+
+        getContentPane().setLayout( new java.awt.GridBagLayout() );
+        getContentPane().add(
+            m_northPnl,
+            new java.awt.GridBagConstraints( 0, 0, 1, 1, 0.9, 0.0, java.awt.GridBagConstraints.NORTH,
+                java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 5, 5, 6, 0 ), 0, 0 ) );
+        getContentPane().add(
+            m_centerPnl,
+            new GridBagConstraints( 0, 1, 1, 1, 0.9, 0.9, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+                new Insets( 10, 10, 10, 10 ), 0, 0 ) );
+        getContentPane().add(
+            m_southPnl,
+            new GridBagConstraints( 0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.SOUTH, GridBagConstraints.BOTH,
+                new Insets( 0, 0, 2, 0 ), 0, 0 ) );
+        m_northPnl.setLayout( new GridBagLayout() );
+        m_northPnl.setBorder( null );
+        m_northPnl.add( m_scopeLbl, new java.awt.GridBagConstraints( 0, 0, 1, 1, 0.2, 0.0,
+            java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 5, 0, 5, 0 ), 0,
+            0 ) );
+        m_northPnl.add( m_scopeChoice, new java.awt.GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0,
+            java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.HORIZONTAL,
+            new java.awt.Insets( 9, 0, 7, 5 ), 0, 0 ) );
+        m_northPnl.add( m_limitLbl, new GridBagConstraints( 2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+            GridBagConstraints.NONE, new Insets( 5, 10, 5, 5 ), 0, 0 ) );
+        m_northPnl.add( m_limitField, new java.awt.GridBagConstraints( 3, 0, 1, 1, 1.0, 0.0,
+            java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.HORIZONTAL, new java.awt.Insets( 11, 0, 9,
+                10 ), 0, 0 ) );
+        m_northPnl.add( m_basePnl, new java.awt.GridBagConstraints( 0, 1, 4, 1, 0.0, 0.0,
+            java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 5, 10, 5, 10 ),
+            0, 0 ) );
+        m_filterText.setText( "" );
+        m_filterText.setBorder( null );
+        m_centerPnl.setLayout( new BorderLayout() );
+        m_centerPnl.setBorder( BorderFactory.createTitledBorder( BorderFactory.createLineBorder( new Color( 153, 153,
+            153 ), 1 ), "Search Filter", TitledBorder.LEADING, TitledBorder.TOP, new Font( "SansSerif", 0, 14 ),
+            new Color( 60, 60, 60 ) ) );
+        m_scrollPane.getViewport().add( m_filterText );
+        m_centerPnl.add( m_scrollPane, BorderLayout.CENTER );
+        m_scopeLbl.setText( "Scope:" );
+        m_scopeLbl.setFont( new java.awt.Font( "Dialog", java.awt.Font.PLAIN, 14 ) );
+        m_scopeChoice.setSize( new java.awt.Dimension( 115, 25 ) );
+        m_scopeChoice.setMaximumSize( new Dimension( 32767, 25 ) );
+        m_scopeChoice.setMinimumSize( new java.awt.Dimension( 115, 25 ) );
+        m_scopeChoice.setPreferredSize( new Dimension( 115, 25 ) );
+        m_scopeChoice.addItem( BASE_SCOPE );
+        m_scopeChoice.addItem( SINGLE_SCOPE );
+        m_scopeChoice.addItem( SUBTREE_SCOPE );
+
+        m_limitLbl.setText( "Limit:" );
+        m_limitField.setText( "Unlimited" );
+        m_limitField.setHorizontalAlignment( JTextField.CENTER );
+        m_southPnl.setLayout( new FlowLayout( FlowLayout.CENTER, 15, 5 ) );
+        m_southPnl.add( m_searchBut );
 
-        if ( m_mode != LOAD_MODE ) 
+        if ( m_mode != LOAD_MODE )
         {
-            m_searchBut.setText( SEARCH_CMD ) ;
-            m_searchBut.setActionCommand( SEARCH_CMD ) ;
-            m_southPnl.add( m_cancelBut ) ;
-        } 
-        else 
+            m_searchBut.setText( SEARCH_CMD );
+            m_searchBut.setActionCommand( SEARCH_CMD );
+            m_southPnl.add( m_cancelBut );
+        }
+        else
         {
-            m_searchBut.setText( LOAD_CMD ) ;
-            m_searchBut.setActionCommand( LOAD_CMD ) ;
+            m_searchBut.setText( LOAD_CMD );
+            m_searchBut.setActionCommand( LOAD_CMD );
         }
 
-        m_cancelBut.setText(CANCEL_CMD) ;
-        m_cancelBut.setActionCommand(CANCEL_CMD) ;
-        setBounds(new java.awt.Rectangle(0,0,595,331));
-        m_basePnl.setLayout(new java.awt.GridBagLayout());
-        m_basePnl.add(jLabel1,
-        new java.awt.GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE,
-        new java.awt.Insets(0, 0, 0, 0), 0, 0));
-        m_basePnl.add(m_baseText,
-        new java.awt.GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, java.awt.GridBagConstraints.EAST, java.awt.GridBagConstraints.HORIZONTAL,
-        new java.awt.Insets(5, 5, 5, 0), 0, 0));
-        jLabel1.setText("Search Base:");
-        jLabel1.setFont(new java.awt.Font("SansSerif", java.awt.Font.PLAIN, 14));
-
-        if(m_mode == RUN_MODE) {
-	        setTitle("Search Filter Dialog: Execute mode") ;
-        } else if(m_mode == LOAD_MODE) {
-            setTitle("Search Filter Dialog: Load mode") ;
-        } else if(m_mode == DEBUG_MODE) {
-	        setTitle("Search Filter Dialog: Debug mode") ;
-        } else if(m_mode == ANNOTATE_MODE) {
-	        setTitle("Search Filter Dialog: Annotate mode") ;
-            this.m_scopeChoice.setEnabled(false) ;
-            this.m_limitField.setEnabled(false) ;
-            this.m_baseText.setEnabled(false) ;
-        } else {
-            throw new RuntimeException("Unrecognized mode.") ;
+        m_cancelBut.setText( CANCEL_CMD );
+        m_cancelBut.setActionCommand( CANCEL_CMD );
+        setBounds( new java.awt.Rectangle( 0, 0, 595, 331 ) );
+        m_basePnl.setLayout( new java.awt.GridBagLayout() );
+        m_basePnl.add( jLabel1,
+            new java.awt.GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, java.awt.GridBagConstraints.WEST,
+                java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 0, 0, 0 ), 0, 0 ) );
+        m_basePnl.add( m_baseText, new java.awt.GridBagConstraints( 1, 0, 1, 1, 1.0, 0.0,
+            java.awt.GridBagConstraints.EAST, java.awt.GridBagConstraints.HORIZONTAL,
+            new java.awt.Insets( 5, 5, 5, 0 ), 0, 0 ) );
+        jLabel1.setText( "Search Base:" );
+        jLabel1.setFont( new java.awt.Font( "SansSerif", java.awt.Font.PLAIN, 14 ) );
+
+        if ( m_mode == RUN_MODE )
+        {
+            setTitle( "Search Filter Dialog: Execute mode" );
+        }
+        else if ( m_mode == LOAD_MODE )
+        {
+            setTitle( "Search Filter Dialog: Load mode" );
+        }
+        else if ( m_mode == DEBUG_MODE )
+        {
+            setTitle( "Search Filter Dialog: Debug mode" );
+        }
+        else if ( m_mode == ANNOTATE_MODE )
+        {
+            setTitle( "Search Filter Dialog: Annotate mode" );
+            this.m_scopeChoice.setEnabled( false );
+            this.m_limitField.setEnabled( false );
+            this.m_baseText.setEnabled( false );
+        }
+        else
+        {
+            throw new RuntimeException( "Unrecognized mode." );
         }
     }
 
@@ -214,76 +222,77 @@
     /**
      * Closes the dialog
      */
-    public void closeDialog(WindowEvent evt)
+    public void closeDialog( WindowEvent evt )
     {
-        setVisible(false) ;
-        dispose() ;
+        setVisible( false );
+        dispose();
     }
 
 
-	public String getScope()
+    public String getScope()
     {
-		int l_selected = m_scopeChoice.getSelectedIndex() ;
-        return (String) m_scopeChoice.getItemAt(l_selected) ;
+        int l_selected = m_scopeChoice.getSelectedIndex();
+        return ( String ) m_scopeChoice.getItemAt( l_selected );
     }
 
 
     /*
-	public int getScope()
-    {
-		int l_selected = m_scopeChoice.getSelectedIndex() ;
-        String l_scope = (String) m_scopeChoice.getItemAt(l_selected) ;
+     public int getScope()
+     {
+     int l_selected = m_scopeChoice.getSelectedIndex() ;
+     String l_scope = (String) m_scopeChoice.getItemAt(l_selected) ;
+
+     if(l_scope == BASE_SCOPE) {
+     return Backend.BASE_SCOPE ;
+     } else if(l_scope == SINGLE_SCOPE) {
+     return Backend.SINGLE_SCOPE ;
+     } else if(l_scope == SUBTREE_SCOPE) {
+     return Backend.SUBTREE_SCOPE ;
+     }
 
-		if(l_scope == BASE_SCOPE) {
-			return Backend.BASE_SCOPE ;
-        } else if(l_scope == SINGLE_SCOPE) {
-            return Backend.SINGLE_SCOPE ;
-        } else if(l_scope == SUBTREE_SCOPE) {
-            return Backend.SUBTREE_SCOPE ;
-        }
-
-        throw new RuntimeException("Unexpected scope parameter: " + l_scope) ;
-    }
-	*/
+     throw new RuntimeException("Unexpected scope parameter: " + l_scope) ;
+     }
+     */
 
     public String getLimit()
     {
-		return m_limitField.getText() ;
+        return m_limitField.getText();
     }
 
-/*
-    public String getLimit()
-    {
-        String l_limit = m_limitField.getText() ;
 
-		if(l_limit.equals(UNLIMITED)) {
-            return -1 ;
-        }
+    /*
+     public String getLimit()
+     {
+     String l_limit = m_limitField.getText() ;
+
+     if(l_limit.equals(UNLIMITED)) {
+     return -1 ;
+     }
 
-        return Integer.parseInt(l_limit) ;
-    }
-*/
+     return Integer.parseInt(l_limit) ;
+     }
+     */
 
     public String getFilter()
     {
-		return this.m_filterText.getText() ;
+        return this.m_filterText.getText();
     }
 
 
-    public void setBase(String a_base)
+    public void setBase( String a_base )
     {
-        this.m_baseText.setText(a_base) ;
+        this.m_baseText.setText( a_base );
     }
 
 
-    public void setScope(String a_scope)
+    public void setScope( String a_scope )
     {
-        this.m_scopeChoice.setSelectedItem(a_scope) ;
+        this.m_scopeChoice.setSelectedItem( a_scope );
     }
 
 
     public String getBase()
     {
-        return this.m_baseText.getText() ;
+        return this.m_baseText.getText();
     }
 }

Modified: directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java?rev=376623&r1=376622&r2=376623&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java Fri Feb 10 02:48:07 2006
@@ -1,4 +1,4 @@
-package org.apache.directory.server.core.partition.impl.btree.gui ;
+package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
 import java.awt.Color;
@@ -43,15 +43,15 @@
  */
 public class IndexDialog extends JDialog
 {
-    private static final Logger log = LoggerFactory.getLogger(IndexDialog.class);
+    private static final Logger log = LoggerFactory.getLogger( IndexDialog.class );
 
     private static final long serialVersionUID = 3689917253680445238L;
 
-    public static final String DEFAULT_CURSOR = "Default" ;
-    public static final String EQUALITY_CURSOR = "Equality" ;
-    public static final String GREATER_CURSOR = "Greater" ;
-    public static final String LESS_CURSOR = "Less" ;
-    public static final String REGEX_CURSOR = "Regex" ;
+    public static final String DEFAULT_CURSOR = "Default";
+    public static final String EQUALITY_CURSOR = "Equality";
+    public static final String GREATER_CURSOR = "Greater";
+    public static final String LESS_CURSOR = "Less";
+    public static final String REGEX_CURSOR = "Regex";
 
     private Panel mainPnl = new Panel();
     private JTabbedPane tabbedPane = new JTabbedPane();
@@ -66,59 +66,60 @@
     private JTextField keyText = new JTextField();
     private JLabel jLabel2 = new JLabel();
     private JButton scanBut = new JButton();
-    
-    private Index index = null ;
+
+    private Index index = null;
+
 
     /** Creates new form JDialog */
-    public IndexDialog( Frame parent, boolean modal, Index index )
+    public IndexDialog(Frame parent, boolean modal, Index index)
     {
-        super ( parent, modal ) ;
-        this.index = index ;
-        initGUI() ;
+        super( parent, modal );
+        this.index = index;
+        initGUI();
     }
 
+
     /**
      * This method is called from within the constructor to initialize the
      * form.
      */
     private void initGUI()
     {
-        addWindowListener(new java.awt.event.WindowAdapter()
+        addWindowListener( new java.awt.event.WindowAdapter()
         {
-            public void windowClosing(java.awt.event.WindowEvent evt)
+            public void windowClosing( java.awt.event.WindowEvent evt )
             {
                 closeDialog();
             }
-        });
+        } );
 
         pack();
-        setTitle("Index On Attribute '" + index.getAttribute().getName() + "'");
-        setBounds(new java.awt.Rectangle(0, 0, 512, 471));
-        getContentPane().add(mainPnl, java.awt.BorderLayout.CENTER);
-        mainPnl.setLayout(new java.awt.BorderLayout());
-        mainPnl.add(tabbedPane, java.awt.BorderLayout.CENTER);
-        tabbedPane.add(listPnl, "Listing");
-        listPnl.setLayout(new java.awt.GridBagLayout());
+        setTitle( "Index On Attribute '" + index.getAttribute().getName() + "'" );
+        setBounds( new java.awt.Rectangle( 0, 0, 512, 471 ) );
+        getContentPane().add( mainPnl, java.awt.BorderLayout.CENTER );
+        mainPnl.setLayout( new java.awt.BorderLayout() );
+        mainPnl.add( tabbedPane, java.awt.BorderLayout.CENTER );
+        tabbedPane.add( listPnl, "Listing" );
+        listPnl.setLayout( new java.awt.GridBagLayout() );
 
-        
         RadioButtonListener radioListener = new RadioButtonListener();
         JRadioButton radioDefault = new JRadioButton( DEFAULT_CURSOR );
         radioDefault.setActionCommand( DEFAULT_CURSOR );
         radioDefault.setSelected( true );
         radioDefault.addActionListener( radioListener );
-        
+
         JRadioButton radioEquality = new JRadioButton( EQUALITY_CURSOR );
         radioEquality.setActionCommand( EQUALITY_CURSOR );
         radioEquality.addActionListener( radioListener );
-        
+
         JRadioButton radioGreater = new JRadioButton( GREATER_CURSOR );
         radioGreater.setActionCommand( GREATER_CURSOR );
         radioGreater.addActionListener( radioListener );
-        
+
         JRadioButton radioLess = new JRadioButton( LESS_CURSOR );
         radioLess.setActionCommand( LESS_CURSOR );
         radioLess.addActionListener( radioListener );
-        
+
         JRadioButton radioRegex = new JRadioButton( REGEX_CURSOR );
         radioRegex.setActionCommand( REGEX_CURSOR );
         radioRegex.addActionListener( radioListener );
@@ -137,169 +138,78 @@
         radioPanel.add( radioGreater );
         radioPanel.add( radioLess );
         radioPanel.add( radioRegex );
-        
-        listPnl.add(
-            cursorPnl,
-            new java.awt.GridBagConstraints(
-                0,
-                0,
-                1,
-                1,
-                1.0,
-                0.15,
-                java.awt.GridBagConstraints.NORTH,
-                java.awt.GridBagConstraints.BOTH,
-                new java.awt.Insets(15, 0, 30, 0),
-                0,
-                0));
-        listPnl.add(
-            resultsPnl,
-            new java.awt.GridBagConstraints(
-                0,
-                1,
-                1,
-                1,
-                1.0,
-                0.8,
-                java.awt.GridBagConstraints.CENTER,
-                java.awt.GridBagConstraints.BOTH,
-                new java.awt.Insets(0, 0, 0, 0),
-                0,
-                0));
-        listPnl.add(
-            buttonPnl,
-            new java.awt.GridBagConstraints(
-                0,
-                2,
-                1,
-                1,
-                1.0,
-                0.05,
-                java.awt.GridBagConstraints.CENTER,
-                java.awt.GridBagConstraints.BOTH,
-                new java.awt.Insets(0, 0, 0, 0),
-                0,
-                0));
-        cursorPnl.setLayout(new java.awt.GridBagLayout());
-        cursorPnl.setBorder(
-            javax.swing.BorderFactory.createTitledBorder(
-                javax.swing.BorderFactory.createLineBorder(
-                    new java.awt.Color(153, 153, 153),
-                    1),
-                "Display Cursor Constraints",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font("SansSerif", 0, 14),
-                new java.awt.Color(60, 60, 60)));
-        cursorPnl.add(
-            jLabel1,
-            new java.awt.GridBagConstraints(
-                0,
-                1,
-                1,
-                1,
-                0.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets(0, 15, 0, 10),
-                0,
-                0));
-        cursorPnl.add(
-            keyText,
-            new java.awt.GridBagConstraints(
-                1,
-                1,
-                1,
-                1,
-                0.4,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.BOTH,
-                new java.awt.Insets(5, 5, 5, 236),
-                0,
-                0));
-        cursorPnl.add(
-            jLabel2,
-            new java.awt.GridBagConstraints(
-                0,
-                0,
-                1,
-                1,
-                0.0,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets(0, 15, 0, 10),
-                0,
-                0));
-        cursorPnl.add(
-            radioPanel,
-            new java.awt.GridBagConstraints(
-                1,
-                0,
-                1,
-                1,
-                0.4,
-                0.0,
-                java.awt.GridBagConstraints.WEST,
-                java.awt.GridBagConstraints.NONE,
-                new java.awt.Insets(5, 5, 5, 0),
-                0,
-                0));
-        resultsPnl.setLayout(new java.awt.BorderLayout());
-        resultsPnl.setBorder(
-            javax.swing.BorderFactory.createTitledBorder(
-                javax.swing.BorderFactory.createLineBorder(
-                    new java.awt.Color(153, 153, 153),
-                    1),
-                "Scan Results",
-                javax.swing.border.TitledBorder.LEADING,
-                javax.swing.border.TitledBorder.TOP,
-                new java.awt.Font("SansSerif", 0, 14),
-                new java.awt.Color(60, 60, 60)));
-        resultsPnl.add(jScrollPane2, java.awt.BorderLayout.CENTER);
-        jScrollPane2.getViewport().add(resultsTbl);
-        buttonPnl.setLayout(
-            new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 15, 5));
-        buttonPnl.add(doneBut);
-        buttonPnl.add(scanBut);
-        doneBut.setText("Done");
-        doneBut.addActionListener(new ActionListener()
+
+        listPnl.add( cursorPnl, new java.awt.GridBagConstraints( 0, 0, 1, 1, 1.0, 0.15,
+            java.awt.GridBagConstraints.NORTH, java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 15, 0, 30, 0 ),
+            0, 0 ) );
+        listPnl.add( resultsPnl, new java.awt.GridBagConstraints( 0, 1, 1, 1, 1.0, 0.8,
+            java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 0, 0, 0, 0 ), 0,
+            0 ) );
+        listPnl.add( buttonPnl, new java.awt.GridBagConstraints( 0, 2, 1, 1, 1.0, 0.05,
+            java.awt.GridBagConstraints.CENTER, java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 0, 0, 0, 0 ), 0,
+            0 ) );
+        cursorPnl.setLayout( new java.awt.GridBagLayout() );
+        cursorPnl.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Display Cursor Constraints",
+            javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP, new java.awt.Font(
+                "SansSerif", 0, 14 ), new java.awt.Color( 60, 60, 60 ) ) );
+        cursorPnl.add( jLabel1, new java.awt.GridBagConstraints( 0, 1, 1, 1, 0.0, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 15, 0, 10 ), 0,
+            0 ) );
+        cursorPnl.add( keyText, new java.awt.GridBagConstraints( 1, 1, 1, 1, 0.4, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.BOTH, new java.awt.Insets( 5, 5, 5, 236 ), 0,
+            0 ) );
+        cursorPnl.add( jLabel2, new java.awt.GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0,
+            java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, new java.awt.Insets( 0, 15, 0, 10 ), 0,
+            0 ) );
+        cursorPnl.add( radioPanel,
+            new java.awt.GridBagConstraints( 1, 0, 1, 1, 0.4, 0.0, java.awt.GridBagConstraints.WEST,
+                java.awt.GridBagConstraints.NONE, new java.awt.Insets( 5, 5, 5, 0 ), 0, 0 ) );
+        resultsPnl.setLayout( new java.awt.BorderLayout() );
+        resultsPnl.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createLineBorder(
+            new java.awt.Color( 153, 153, 153 ), 1 ), "Scan Results", javax.swing.border.TitledBorder.LEADING,
+            javax.swing.border.TitledBorder.TOP, new java.awt.Font( "SansSerif", 0, 14 ), new java.awt.Color( 60, 60,
+                60 ) ) );
+        resultsPnl.add( jScrollPane2, java.awt.BorderLayout.CENTER );
+        jScrollPane2.getViewport().add( resultsTbl );
+        buttonPnl.setLayout( new java.awt.FlowLayout( java.awt.FlowLayout.CENTER, 15, 5 ) );
+        buttonPnl.add( doneBut );
+        buttonPnl.add( scanBut );
+        doneBut.setText( "Done" );
+        doneBut.addActionListener( new ActionListener()
         {
-            public void actionPerformed(ActionEvent e)
+            public void actionPerformed( ActionEvent e )
             {
                 closeDialog();
             }
-        });
+        } );
 
-        jLabel1.setText("Key Constraint:");
-        keyText.setText("");
-        keyText.setMinimumSize(new java.awt.Dimension(130, 20));
-        keyText.setPreferredSize(new java.awt.Dimension(130, 20));
-        keyText.setMaximumSize(new java.awt.Dimension(130, 20));
-        keyText.setFont(
-            new java.awt.Font("SansSerif", java.awt.Font.PLAIN, 14));
-        keyText.setSize(new java.awt.Dimension(130, 20));
-        jLabel2.setText("Cursor Type:");
+        jLabel1.setText( "Key Constraint:" );
+        keyText.setText( "" );
+        keyText.setMinimumSize( new java.awt.Dimension( 130, 20 ) );
+        keyText.setPreferredSize( new java.awt.Dimension( 130, 20 ) );
+        keyText.setMaximumSize( new java.awt.Dimension( 130, 20 ) );
+        keyText.setFont( new java.awt.Font( "SansSerif", java.awt.Font.PLAIN, 14 ) );
+        keyText.setSize( new java.awt.Dimension( 130, 20 ) );
+        jLabel2.setText( "Cursor Type:" );
 
-        scanBut.setText("Scan");
-        scanBut.addActionListener(new ActionListener()
+        scanBut.setText( "Scan" );
+        scanBut.addActionListener( new ActionListener()
         {
             public void actionPerformed( ActionEvent e )
             {
                 doScan( keyText.getText(), selectedCursorType );
             }
-        });
+        } );
 
         doScan( null, DEFAULT_CURSOR );
     }
 
-
     private String selectedCursorType = DEFAULT_CURSOR;
+
     class RadioButtonListener implements ActionListener
     {
-        public void actionPerformed(ActionEvent e)
+        public void actionPerformed( ActionEvent e )
         {
             if ( e.getActionCommand() == DEFAULT_CURSOR )
             {
@@ -324,124 +234,113 @@
         }
     }
 
-    
+
     private void closeDialog()
     {
-        setVisible( false ) ;
-        dispose() ;
+        setVisible( false );
+        dispose();
     }
 
 
     public boolean doScan( String key, String scanType )
     {
-        if ( key == null || key.trim().equals( "" ) ) 
+        if ( key == null || key.trim().equals( "" ) )
         {
-            key = null ;
+            key = null;
         }
 
-        if ( key == null && scanType != DEFAULT_CURSOR ) 
+        if ( key == null && scanType != DEFAULT_CURSOR )
         {
-            JOptionPane.showMessageDialog( null, "Cannot use a " +
-                scanType + " scan type with a null key constraint.",
-                "Missing Key Constraint", JOptionPane.ERROR_MESSAGE ) ;
-            return false ;
+            JOptionPane.showMessageDialog( null, "Cannot use a " + scanType + " scan type with a null key constraint.",
+                "Missing Key Constraint", JOptionPane.ERROR_MESSAGE );
+            return false;
         }
 
-        try 
+        try
         {
-            NamingEnumeration list = null ;
+            NamingEnumeration list = null;
 
-            if ( scanType == EQUALITY_CURSOR ) 
+            if ( scanType == EQUALITY_CURSOR )
             {
-                list = index.listIndices( key ) ;
-            } 
-            else if (scanType == GREATER_CURSOR ) 
+                list = index.listIndices( key );
+            }
+            else if ( scanType == GREATER_CURSOR )
             {
-                list = index.listIndices( key, true ) ;
-            } 
-            else if ( scanType == LESS_CURSOR ) 
+                list = index.listIndices( key, true );
+            }
+            else if ( scanType == LESS_CURSOR )
             {
-                list = index.listIndices( key, false ) ;
-            } 
-            else if ( scanType == REGEX_CURSOR ) 
+                list = index.listIndices( key, false );
+            }
+            else if ( scanType == REGEX_CURSOR )
             {
-                Pattern regex = StringTools.getRegex( key ) ;
-                int starIndex = key.indexOf( '*' ) ;
+                Pattern regex = StringTools.getRegex( key );
+                int starIndex = key.indexOf( '*' );
 
-                if ( starIndex > 0 ) 
+                if ( starIndex > 0 )
                 {
-                    String prefix = key.substring( 0, starIndex ) ;
+                    String prefix = key.substring( 0, starIndex );
 
-                    if (log.isDebugEnabled())
-                        log.debug( "Regex prefix = " + prefix ) ;
+                    if ( log.isDebugEnabled() )
+                        log.debug( "Regex prefix = " + prefix );
 
-                    list = index.listIndices( regex, prefix ) ;
-                } 
-                else 
+                    list = index.listIndices( regex, prefix );
+                }
+                else
                 {
-                    list = index.listIndices( regex ) ;
+                    list = index.listIndices( regex );
                 }
-            } 
-            else 
+            }
+            else
             {
-                list = index.listIndices() ;
+                list = index.listIndices();
             }
 
-            Object [] cols = new Object [2] ;
-            Object [] row = null ;
-            cols[0] = "Keys ( Attribute Value )" ;
-            cols[1] = "Values ( Entry Id )" ;
-            DefaultTableModel model = new DefaultTableModel( cols, 0 ) ;
-            int count = 0 ;
-            
-            while( list.hasMore() )
-            {
-                IndexRecord rec = ( IndexRecord ) list.next() ;
-                row = new Object [2] ;
-                row[0] = rec.getIndexKey() ;
-                row[1] = rec.getEntryId() ;
-                model.addRow( row ) ;
-                count++ ;
-            }
-
-            resultsTbl.setModel( model ) ;
-            resultsPnl.setBorder(
-                BorderFactory.createTitledBorder(
-                BorderFactory.createLineBorder(
-                new Color( 153, 153, 153 ), 1 ),
-                "Scan Results: " + count,
-                TitledBorder.LEADING,
-                TitledBorder.TOP,
-                new Font( "SansSerif", 0, 14 ),
-                new Color( 60, 60, 60 ) ) ) ;
+            Object[] cols = new Object[2];
+            Object[] row = null;
+            cols[0] = "Keys ( Attribute Value )";
+            cols[1] = "Values ( Entry Id )";
+            DefaultTableModel model = new DefaultTableModel( cols, 0 );
+            int count = 0;
 
-            if ( isVisible() ) 
+            while ( list.hasMore() )
             {
-                validate() ;
+                IndexRecord rec = ( IndexRecord ) list.next();
+                row = new Object[2];
+                row[0] = rec.getIndexKey();
+                row[1] = rec.getEntryId();
+                model.addRow( row );
+                count++;
             }
-        } 
-        catch ( Exception e ) 
+
+            resultsTbl.setModel( model );
+            resultsPnl.setBorder( BorderFactory.createTitledBorder( BorderFactory.createLineBorder( new Color( 153,
+                153, 153 ), 1 ), "Scan Results: " + count, TitledBorder.LEADING, TitledBorder.TOP, new Font(
+                "SansSerif", 0, 14 ), new Color( 60, 60, 60 ) ) );
+
+            if ( isVisible() )
+            {
+                validate();
+            }
+        }
+        catch ( Exception e )
         {
             String msg = ExceptionUtils.getStackTrace( e );
 
-            if ( msg.length() > 1024 ) 
+            if ( msg.length() > 1024 )
             {
-                msg = msg.substring( 0, 1024 )
-                    + "\n. . . TRUNCATED . . ." ;
+                msg = msg.substring( 0, 1024 ) + "\n. . . TRUNCATED . . .";
             }
 
-            msg = "Error while scanning index "
-                + "on attribute " + index.getAttribute() + " using a "
-                + scanType + " cursor type with a key constraint of '"
-                + key + "':\n" + msg ;
-                
-            JTextArea area = new JTextArea() ;
-            area.setText( msg ) ;
-            JOptionPane.showMessageDialog( null, area, "Index Scan Error",
-                    JOptionPane.ERROR_MESSAGE ) ;
-            return false ;
+            msg = "Error while scanning index " + "on attribute " + index.getAttribute() + " using a " + scanType
+                + " cursor type with a key constraint of '" + key + "':\n" + msg;
+
+            JTextArea area = new JTextArea();
+            area.setText( msg );
+            JOptionPane.showMessageDialog( null, area, "Index Scan Error", JOptionPane.ERROR_MESSAGE );
+            return false;
         }
 
-        return true ;
+        return true;
     }
 }



Mime
View raw message