KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nqadmin > swingSet > SSDataNavigator


1 /* $Id: SSDataNavigator.java,v 1.35 2005/03/08 16:13:50 prasanth Exp $
2  *
3  * Tab Spacing = 4
4  *
5  * Copyright (c) 2003-2005, The Pangburn Company and Prasanth R. Pasala.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer. Redistributions in binary
13  * form must reproduce the above copyright notice, this list of conditions and
14  * the following disclaimer in the documentation and/or other materials
15  * provided with the distribution. The names of its contributors may not be
16  * used to endorse or promote products derived from this software without
17  * specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  *
31  */

32
33 package com.nqadmin.swingSet;
34
35 import java.awt.*;
36 import java.awt.event.*;
37 import javax.swing.*;
38 import java.sql.*;
39 import java.io.*;
40 import com.nqadmin.swingSet.datasources.SSRowSet;
41 import javax.sql.RowSetListener JavaDoc;
42 import javax.sql.RowSetEvent JavaDoc;
43
44 /**
45  * SSDataNavigator.java
46  *<p>
47  * SwingSet - Open Toolkit For Making Swing Controls Database-Aware
48  *<p><pre>
49  * Component that can be used for data navigation. It provides buttons for
50  * navigation, insertion, and deletion of records in a SSRowSet. The modification
51  * of a SSRowSet can be prevented using the setModificaton() method. Any changes
52  * made to the columns of a record will be updated whenever there is a
53  * navigation.
54  *
55  * For example if you are displaying three columns using the JTextField and the
56  * user changes the text in the text fields then the columns will be updated to
57  * the new values when the user navigates the SSRowSet. If the user wants to revert
58  * the changes he made he can press the Undo button, however this must be done
59  * before any navigation. Once navigation takes place changes can't be reverted
60  * using Undo button (has to be done manually by the user).
61  *</pre><p>
62  * @author $Author: prasanth $
63  * @version $Revision: 1.35 $
64  */

65 public class SSDataNavigator extends JPanel {
66
67     /**
68      * Button to navigate to the first record in the SSRowSet.
69      */

70     protected JButton firstButton = new JButton();
71
72     /**
73      * Button to navigate to the previous record in the SSRowSet.
74      */

75     protected JButton previousButton = new JButton();
76
77     /**
78      * Text field for viewing/changing the current record number.
79      */

80     protected JTextField txtCurrentRow = new JTextField();
81
82     /**
83      * Button to navigate to the next record in the SSRowSet.
84      */

85     protected JButton nextButton = new JButton();
86
87     /**
88      * Button to navigate to the last record in the SSRowSet.
89      */

90     protected JButton lastButton = new JButton();
91
92     /**
93      * Button to commit screen changes to the SSRowSet.
94      */

95     protected JButton commitButton = new JButton(); // Commit button
96

97     /**
98      * Button to revert screen changes based on the SSRowSet.
99      */

100     protected JButton undoButton = new JButton();
101
102     /**
103      * Button to refresh the screen based on any changes to the SSRowSet.
104      */

105     protected JButton refreshButton = new JButton(); // REFRESH BUTTON
106

107     /**
108      * Button to add a record to the SSRowSet.
109      */

110     protected JButton addButton = new JButton();
111
112     /**
113      * Button to delete the current record in the SSRowSet.
114      */

115     protected JButton deleteButton = new JButton();
116
117     /**
118      * Label to display the total number of records in the SSRowSet.
119      */

120     protected JLabel lblRowCount = new JLabel();
121
122     /**
123      * Indicator to allow/disallow changes to the SSRowSet.
124      */

125     protected boolean modification = true;
126
127     /**
128      * Indicator to allow/disallow deletions from the SSRowSet.
129      */

130     protected boolean deletion = true;
131
132     /**
133      * Indicator to allow/disallow insertions to the SSRowSet.
134      */

135     protected boolean insertion = true;
136
137     /**
138      * Indicator to force confirmation of SSRowSet deletions.
139      */

140     protected boolean confirmDeletes = true;
141
142     /**
143      * Indicator to cause the navigator to skip the execute() function call on
144      * the specified SSRowSet. Must be false for MySQL (see FAQ).
145      */

146     protected boolean callExecute = true;
147
148     /**
149      * SSRowSet from which component will get/set values.
150      */

151     protected SSRowSet sSRowSet = null;
152
153     /**
154      * Container (frame or internal frame) which contains the navigator.
155      */

156     protected SSDBNav dBNav = null;
157
158     /**
159      * Number of rows in SSRowSet. Set to zero if next() method returns false.
160      */

161     protected int rowCount = 0;
162
163     /**
164      * Row number for current record in SSRowSet.
165      */

166     protected int currentRow = 0;
167
168     /**
169      * Indicator used to determine if a row is being inserted into the SSRowSet.
170      */

171     protected boolean onInsertRow = false;
172
173     /**
174      * Navigator button dimensions.
175      */

176     protected Dimension buttonSize = new Dimension(40, 20);
177
178     /**
179      * Current record text field dimensions.
180      */

181     protected Dimension txtFieldSize = new Dimension(65, 20);
182
183     /**
184      * Listener on the SSRowSet used by data navigator.
185      */

186     private final SSDBNavRowSetListener sSRowSetListener = new SSDBNavRowSetListener();
187
188     /**
189      * Creates a object of SSDataNavigator.
190      * Note: you have to set the SSRowSet before you can start using it.
191      */

192     public SSDataNavigator() {
193         addToolTips();
194         createPanel();
195         addListeners();
196     }
197
198     /**
199      * Constructs a SSDataNavigator for the given SSRowSet
200      *
201      * @param _sSRowSet The SSRowSet to which the SSDataNavigator has to be bound
202      */

203     public SSDataNavigator(SSRowSet _sSRowSet) {
204         setSSRowSet(_sSRowSet);
205         addToolTips();
206         createPanel();
207         addListeners();
208     }
209
210     /**
211      * Constructs the SSDataNavigator with the given SSRowSet and sets the size of the buttons
212      * on the navigator to the given size
213      *
214      * @param _sSRowSet the SSRowSet to which the navigator is bound to
215      * @param _buttonSize the size to which the button on navigator have to be set
216      */

217     public SSDataNavigator(SSRowSet _sSRowSet, Dimension _buttonSize) {
218         buttonSize = _buttonSize;
219         setSSRowSet(_sSRowSet);
220         addToolTips();
221         createPanel();
222         addListeners();
223     }
224
225     /**
226      * Returns true if the SSRowSet contains one or more rows, else false.
227      *
228      * @return return true if SSRowSet contains data else false.
229      */

230      public boolean containsRows() {
231
232          if ( rowCount == 0 ) {
233             return false;
234          }
235
236          return true;
237      }
238
239     /**
240      * Method to cause the navigator to skip the execute() function call on the
241      * underlying SSRowSet. This is necessary for MySQL (see FAQ).
242      *
243      * @param _callExecute false if using MySQL database - otherwise true
244      */

245     public void setCallExecute(boolean _callExecute) {
246         boolean oldValue = callExecute;
247         callExecute = _callExecute;
248         firePropertyChange("callExecute", oldValue, callExecute);
249     }
250
251     /**
252      * Indicates if the navigator will skip the execute function call on the
253      * underlying SSRowSet (needed for MySQL - see FAQ).
254      *
255      * @return value of execute() indicator
256      */

257     public boolean getCallExecute() {
258         return callExecute;
259     }
260
261     /**
262      * Sets the preferredSize and the MinimumSize of the buttons to the specified size
263      *
264      * @param _buttonSize the required dimension of the buttons
265      */

266     public void setButtonSize(Dimension _buttonSize) {
267         Dimension oldValue = buttonSize;
268         buttonSize = _buttonSize;
269         firePropertyChange("buttonSize", oldValue, buttonSize);
270         setButtonSizes();
271     }
272
273     /**
274      * Returns the size of buttons on the data navigator.
275      *
276      * @return returns a Dimension object representing the size of each button
277      * on the data navigator.
278      */

279     public Dimension getButtonSize() {
280         return buttonSize;
281     }
282
283     /**
284      * Function that passes the implementation of the SSDBNav interface. This
285      * interface can be implemented by the developer to perform custom actions
286      * when the insert button is pressed
287      *
288      * @param _dBNav implementation of the SSDBNav interface
289      */

290     public void setDBNav(SSDBNav _dBNav) {
291         SSDBNav oldValue = dBNav;
292         dBNav = _dBNav;
293         firePropertyChange("dBNav", oldValue, dBNav);
294     }
295
296     /**
297      * Returns any custom implementation of the SSDBNav interface, which is used
298      * when the insert button is pressed to perform custom actions.
299      *
300      * @return any custom implementation of the SSDBNav interface
301      */

302     public SSDBNav getDBNav() {
303         return dBNav;
304     }
305
306     /**
307      * Enables or disables the modification-related buttons on the SSDataNavigator.
308      * If the user can only navigate through the records with out making any changes
309      * set this to false. By default, the modification-related buttons are enabled.
310      *
311      * @param _modification indicates whether or not the modification-related
312      * buttons are enabled.
313      */

314     public void setModification(boolean _modification) {
315         boolean oldValue = modification;
316         modification = _modification;
317         firePropertyChange("modification", oldValue, modification);
318
319         if (!modification) {
320             commitButton.setEnabled(false);
321             undoButton.setEnabled(false);
322             addButton.setEnabled(false);
323             deleteButton.setEnabled(false);
324         } else {
325             commitButton.setEnabled(true);
326             undoButton.setEnabled(true);
327             addButton.setEnabled(true);
328             deleteButton.setEnabled(true);
329         }
330     }
331
332     /**
333      * Returns true if the user can modify the data in the SSRowSet, else false.
334      *
335      * @return returns true if the user modifications are written back to the
336      * database, else false.
337      */

338     public boolean getModification() {
339         return modification;
340     }
341
342     /**
343      * Enables or disables the row deletion button. This method should be used
344      * if row deletions are not allowed. True by default.
345      *
346      * @param _deletion indicates whether or not to allow deletions
347      */

348     public void setDeletion(boolean _deletion) {
349         boolean oldValue = deletion;
350         deletion = _deletion;
351         firePropertyChange("deletion", oldValue, deletion);
352
353         if (!deletion) {
354             deleteButton.setEnabled(false);
355         } else {
356             deleteButton.setEnabled(true);
357         }
358     }
359
360     /**
361      * Returns true if deletions are allowed, else false.
362      *
363      * @return returns true if deletions are allowed, else false.
364      */

365     public boolean getDeletion(){
366         return deletion;
367     }
368
369     /**
370      * Enables or disables the row insertion button. This method should be used
371      * if row insertions are not allowed. True by default.
372      *
373      * @param _insertion indicates whether or not to allow insertions
374      */

375     public void setInsertion(boolean _insertion) {
376         boolean oldValue = insertion;
377         insertion = _insertion;
378         firePropertyChange("insertion", oldValue, insertion);
379
380         if (!insertion) {
381             addButton.setEnabled(false);
382         } else{
383             addButton.setEnabled(true);
384         }
385     }
386
387     /**
388      * Returns true if insertions are allowed, else false.
389      *
390      * @return returns true if insertions are allowed, else false.
391      */

392     public boolean getInsertion() {
393         return insertion;
394     }
395
396     /**
397      * Sets the confirm deletion indicator. If set to true, every time delete
398      * button is pressed, the navigator pops up a confirmation dialog to the
399      * user. Default value is true.
400      *
401      * @param _confirmDeletes indicates whether or not to confirm deletions
402      */

403     public void setConfirmDeletes(boolean _confirmDeletes) {
404         boolean oldValue = confirmDeletes;
405         confirmDeletes = _confirmDeletes;
406         firePropertyChange("confirmDeletes", oldValue, confirmDeletes);
407     }
408
409     /**
410      * Returns true if deletions must be confirmed by user, else false.
411      *
412      * @return returns true if a confirmation dialog is displayed when the user
413      * deletes a record, else false.
414      */

415     public boolean getConfirmDeletes() {
416         return confirmDeletes;
417     }
418
419     /**
420      * This method changes the SSRowSet to which the navigator is bound.
421      * The execute() and next() methods MUST be called on the SSRowSet
422      * before you set the SSRowSet for the SSDataNavigator.
423      *
424      * @param _sSRowSet a SSRowSet object to which the navigator will be bound
425      */

426     public void setSSRowSet(SSRowSet _sSRowSet) {
427         if(sSRowSet != null){
428             sSRowSet.removeRowSetListener(sSRowSetListener);
429         }
430
431         SSRowSet oldValue = sSRowSet;
432         sSRowSet = _sSRowSet;
433         firePropertyChange("sSRowSet", oldValue, sSRowSet);
434
435         // SEE IF THERE ARE ANY ROWS IN THE GIVEN SSROWSET
436
try {
437             if (callExecute) {
438                 sSRowSet.execute();
439             }
440
441             if (!sSRowSet.next()) {
442                 rowCount = 0;
443                 currentRow = 0;
444             } else {
445             // IF THERE ARE ROWS GET THE ROW COUNT
446
sSRowSet.last();
447                 rowCount = sSRowSet.getRow();
448                 sSRowSet.first();
449                 currentRow = sSRowSet.getRow();
450             }
451         // SET THE ROW COUNT AS LABEL
452
lblRowCount.setText("of " + rowCount);
453             txtCurrentRow.setText(String.valueOf(currentRow));
454
455             sSRowSet.addRowSetListener(sSRowSetListener);
456         } catch(SQLException se) {
457             se.printStackTrace();
458         }
459
460         //IF NO ROWS ARE PRESENT DISABLE NAVIGATION
461
//ELSE ENABLE THEN ELSE IS USEFUL WHEN THE SSROWSET IS CHNAGED
462
// IF THE INITIAL SSROWSET HAS ZERO ROWS NEXT IF THE USER SETS A NEW SSROWSET THEN THE
463
// BUTTONS HAVE TO BE ENABLED
464
if (rowCount == 0) {
465             firstButton.setEnabled(false);
466             previousButton.setEnabled(false);
467             nextButton.setEnabled(false);
468             lastButton.setEnabled(false);
469         } else{
470             firstButton.setEnabled(true);
471             previousButton.setEnabled(true);
472             nextButton.setEnabled(true);
473             lastButton.setEnabled(true);
474         }
475
476         try {
477             if (sSRowSet.isLast()) {
478                 nextButton.setEnabled(false);
479                 lastButton.setEnabled(false);
480             }
481             if (sSRowSet.isFirst()) {
482                 firstButton.setEnabled(false);
483                 previousButton.setEnabled(false);
484             }
485
486         } catch(SQLException se) {
487             se.printStackTrace();
488         }
489
490     // ENABLE OTHER BUTTONS IF NEED BE.
491

492         // THIS IS NEEDED TO HANDLE USER LEAVING THE SCREEN IN AN INCONSISTENT
493
// STATE EXAMPLE: USER CLICKS ADD BUTTON, THIS DISABLES ALL THE BUTTONS
494
// EXCEPT COMMIT & UNDO. WITH OUT COMMITING OR UNDOING THE ADD USER
495
// CLOSES THE SCREEN. NOW IF THE SCREEN IS OPENED WITH A NEW SSROWSET.
496
// THE REFRESH, ADD & DELETE WILL BE DISABLED.
497
refreshButton.setEnabled(true);
498         if (insertion) {
499             addButton.setEnabled(true);
500         }
501         if (deletion) {
502             deleteButton.setEnabled(true);
503         }
504     }
505
506     /**
507      * Returns the SSRowSet being used.
508      *
509      * @return returns the SSRowSet being used.
510      */

511     public SSRowSet getSSRowSet() {
512         return sSRowSet;
513     }
514
515     /**
516      * Writes the present row back to the SSRowSet. This is done automatically
517      * when any navigation takes place, but can also be called manually.
518      *
519      * @return returns true if update succeeds else false.
520      */

521     public boolean updatePresentRow() {
522         try {
523             if (!onInsertRow) {
524                 sSRowSet.updateRow();
525             }
526             return true;
527         } catch(Exception JavaDoc e) {
528             return false;
529         }
530     }
531
532     /**
533      * Calls the doClick on First Button.
534      */

535     public void doFirstButtonClick(){
536         firstButton.doClick();
537     }
538
539     /**
540      * Calls the doClick on Previous Button.
541      */

542     public void doPreviousButtonClick(){
543         previousButton.doClick();
544     }
545
546     /**
547      * Calls the doClick on Next Button.
548      */

549     public void doNextButtonClick(){
550         nextButton.doClick();
551     }
552
553     /**
554      * Calls the doClick on Last Button.
555      */

556     public void doLastButtonClick(){
557         lastButton.doClick();
558     }
559
560     /**
561      * Calls the doClick on Refresh Button.
562      */

563     public void doRefreshButtonClick(){
564         refreshButton.doClick();
565     }
566
567     /**
568      * Calls the doClick on Commit Button.
569      */

570     public void doCommitButtonClick(){
571         commitButton.doClick();
572     }
573
574     /**
575      * Calls the doClick on Undo Button.
576      */

577     public void doUndoButtonClick(){
578         undoButton.doClick();
579     }
580
581     /**
582      * Calls the doClick on Add Button.
583      */

584     public void doAddButtonClick(){
585         addButton.doClick();
586     }
587
588     /**
589      * Calls the doClick on Delete Button.
590      */

591     public void doDeleteButtonClick(){
592         deleteButton.doClick();
593     }
594
595     /**
596      * Method to add tooltips and button graphics (or text) to navigator components.
597      */

598     protected void addToolTips() {
599
600         try {
601             ClassLoader JavaDoc cl = this.getClass().getClassLoader();
602             firstButton.setIcon(new ImageIcon(cl.getResource("images/first.gif")));
603             previousButton.setIcon(new ImageIcon(cl.getResource("images/prev.gif")));
604             nextButton.setIcon(new ImageIcon(cl.getResource("images/next.gif")));
605             lastButton.setIcon(new ImageIcon(cl.getResource("images/last.gif")));
606             commitButton.setIcon(new ImageIcon(cl.getResource("images/commit.gif")));
607             undoButton.setIcon(new ImageIcon(cl.getResource("images/undo.gif")));
608             refreshButton.setIcon(new ImageIcon(cl.getResource("images/refresh.gif")));
609             addButton.setIcon(new ImageIcon(cl.getResource("images/add.gif")));
610             deleteButton.setIcon(new ImageIcon(cl.getResource("images/delete.gif")));
611         } catch(Exception JavaDoc e) {
612             firstButton.setText("<<");
613             previousButton.setText("<");
614             nextButton.setText(">");
615             lastButton.setText(">>");
616             commitButton.setText("Commit");
617             undoButton.setText("Undo");
618             refreshButton.setText("Refresh");
619             addButton.setText("Add");
620             deleteButton.setText("Delete");
621             System.out.println("Unable to load images for navigator buttons");
622         }
623
624         firstButton.setToolTipText("First");
625         previousButton.setToolTipText("Previous");
626         nextButton.setToolTipText("Next");
627         lastButton.setToolTipText("Last");
628         commitButton.setToolTipText("Commit");
629         undoButton.setToolTipText("Undo");
630         refreshButton.setToolTipText("Refresh");
631         addButton.setToolTipText("Add Record");
632         deleteButton.setToolTipText("Delete Record");
633
634     } // end protected void addToolTips() {
635

636     /**
637      * Sets the dimensions for the navigator components.
638      */

639     protected void setButtonSizes() {
640
641         // SET THE PREFERRED SIZES
642
firstButton.setPreferredSize(buttonSize);
643             previousButton.setPreferredSize(buttonSize);
644             nextButton.setPreferredSize(buttonSize);
645             lastButton.setPreferredSize(buttonSize);
646             commitButton.setPreferredSize(buttonSize);
647             undoButton.setPreferredSize(buttonSize);
648             refreshButton.setPreferredSize(buttonSize);
649             addButton.setPreferredSize(buttonSize);
650             deleteButton.setPreferredSize(buttonSize);
651             txtCurrentRow.setPreferredSize(txtFieldSize);
652             lblRowCount.setPreferredSize(txtFieldSize);
653             lblRowCount.setHorizontalAlignment(SwingConstants.CENTER);
654
655         // SET MINIMUM BUTTON SIZES
656
firstButton.setMinimumSize(buttonSize);
657             previousButton.setMinimumSize(buttonSize);
658             nextButton.setMinimumSize(buttonSize);
659             lastButton.setMinimumSize(buttonSize);
660             commitButton.setMinimumSize(buttonSize);
661             undoButton.setMinimumSize(buttonSize);
662             refreshButton.setMinimumSize(buttonSize);
663             addButton.setMinimumSize(buttonSize);
664             deleteButton.setMinimumSize(buttonSize);
665             txtCurrentRow.setMinimumSize(txtFieldSize);
666             lblRowCount.setMinimumSize(txtFieldSize);
667     }
668
669     /**
670      * Adds the navigator components to the navigator panel.
671      */

672     protected void createPanel() {
673
674         setButtonSizes();
675         //SET THE BOX LAYOUT
676
setLayout(new BoxLayout(this,BoxLayout.LINE_AXIS) );
677
678         // ADD BUTTONS TO THE PANEL
679
add(firstButton);
680         add(previousButton);
681         add(txtCurrentRow);
682         add(nextButton);
683         add(lastButton);
684         add(commitButton);
685         add(undoButton);
686         add(refreshButton);
687         add(addButton);
688         add(deleteButton);
689         add(lblRowCount);
690         //pack();
691

692     }
693
694     /**
695      * Adds the listeners for the navigator components.
696      */

697     private void addListeners() {
698
699         // WHEN THIS BUTTON IS PRESSED THE RECORD ON WHICH USER WAS WORKING IS SAVED
700
// AND MOVES THE SSROWSET TO THE FIRST ROW
701
// SINCE ROW SET IS IN FIRST ROW DISABLE PREVIOUS BUTTON AND ENABLE NEXT BUTTON
702
firstButton.addActionListener(new ActionListener(){
703                 public void actionPerformed(ActionEvent ae) {
704                     try {
705                         if ( modification ) {
706                             sSRowSet.updateRow();
707                         }
708                         sSRowSet.first();
709
710                         firstButton.setEnabled(false);
711                         previousButton.setEnabled(false);
712                         if (!sSRowSet.isLast()) {
713                             nextButton.setEnabled(true);
714                             lastButton.setEnabled(true);
715                         } else {
716                             nextButton.setEnabled(false);
717                             lastButton.setEnabled(false);
718                         }
719                         if ( dBNav != null ) {
720                             dBNav.performNavigationOps(SSDBNav.NAVIGATION_FIRST);
721                         }
722                     // GET THE ROW NUMBER AND SET IT TO ROW NUMBER TEXT FIELD
723
currentRow = 1;
724                         txtCurrentRow.setText(String.valueOf(currentRow));
725                     } catch(SQLException se) {
726                         se.printStackTrace();
727                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while updating row or moving the cursor.\n"+se.getMessage());
728                     }
729                 }
730             });
731
732         // WHEN BUTTON 2 IS PRESSED THE CURRENT RECORD IS SAVED AND SSROWSET IS
733
// MOVED TO PREVIOUS RECORD
734
// CALLING PREVIOUS ON ENPTY SSROWSET IS ILLEGAL SO A CHECK IS MADE FOR THAT
735
// IF NUMBER OF ROWS == 0 THEN SSROWSET IS EMPTY
736
previousButton.addActionListener(new ActionListener() {
737                 public void actionPerformed(ActionEvent ae) {
738                     try {
739                         //if( sSRowSet.rowUpdated() )
740
if ( modification ) {
741                             sSRowSet.updateRow();
742                         }
743                         if ( sSRowSet.getRow() != 0 && !sSRowSet.previous() ) {
744                             sSRowSet.first();
745                         }
746                         // IF IN THE FIRST RECORD DISABLE PREVIOUS BUTTON
747
if (sSRowSet.isFirst() || sSRowSet.getRow() == 0){
748                             firstButton.setEnabled(false);
749                             previousButton.setEnabled(false);
750                         }
751
752                         // IF NEXT BUTTON IS DISABLED ENABLE IT.
753
if ( !sSRowSet.isLast() ) {
754                             nextButton.setEnabled(true);
755                             lastButton.setEnabled(true);
756                         }
757
758                         if ( dBNav != null ) {
759                             dBNav.performNavigationOps(SSDBNav.NAVIGATION_PREVIOUS);
760                         }
761                     // GET THE ROW NUMBER AND SET IT TO ROW NUMBER TEXT FIELD
762
currentRow = sSRowSet.getRow();
763                         txtCurrentRow.setText(String.valueOf(currentRow));
764                     } catch(SQLException se) {
765                         se.printStackTrace();
766                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while updating row or moving the cursor.\n"+se.getMessage());
767                     }
768                 }
769             });
770
771         // WHEN BUTTON 3 PRESSED THE CURRENT RECORD IS SAVED AND THE SSROWSET IS
772
// MOVED TO NEXT RECORD. IF THIS IS THE LAST RECORD THEN BUTTON 3 IS DISABLED
773
// ALSO IF THE PREVIOUS BUTTON IS NOT ENABLED THEN IT IS ENABLED
774
nextButton.addActionListener(new ActionListener() {
775                 public void actionPerformed(ActionEvent ae) {
776                     try {
777                         //if( sSRowSet.rowUpdated() )
778
if ( modification ) {
779                             sSRowSet.updateRow();
780                         }
781                         if ( !sSRowSet.next() ) {
782                             nextButton.setEnabled(false);
783                             lastButton.setEnabled(false);
784                             sSRowSet.last();
785                         }
786                         // IF LAST RECORD THEN DISABLE NEXT BUTTON
787
if ( sSRowSet.isLast() ) {
788                             nextButton.setEnabled(false);
789                             lastButton.setEnabled(false);
790                         }
791
792                         // IF THIS IS NOT FIRST ROW ENABLE FIRST AND PREVIOUS BUTTONS
793
if ( !sSRowSet.isFirst() ) {
794                             previousButton.setEnabled(true);
795                             firstButton.setEnabled(true);
796                         }
797
798                         if ( dBNav != null ) {
799                             dBNav.performNavigationOps(SSDBNav.NAVIGATION_NEXT);
800                         }
801                     // GET THE ROW NUMBER AND SET IT TO ROW NUMBER TEXT FIELD
802
currentRow = sSRowSet.getRow();
803                         txtCurrentRow.setText(String.valueOf(currentRow));
804                     } catch(SQLException se) {
805                         se.printStackTrace();
806                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while updating row or moving the cursor.\n"+se.getMessage());
807                     }
808                 }
809             });
810
811
812         // BUTTON 4 ( "LAST" BUTTON ) CAUSED THE SSROWSET TO MOVE TO LAST RECORD.
813
// BEFORE MOVING CURRENT RECORD IS SAVED
814
// AFTER MOVING TO LAST RECORD THE NEXT BUTTON IS DIAABLED AND PREVIOUS BUTTON
815
// ENABLED
816
lastButton.addActionListener(new ActionListener() {
817                 public void actionPerformed(ActionEvent ae) {
818                     try {
819                         //if( sSRowSet.rowUpdated() )
820
if ( modification ) {
821                             sSRowSet.updateRow();
822                         }
823                         sSRowSet.last();
824
825                         nextButton.setEnabled(false);
826                         lastButton.setEnabled(false);
827                         if (!sSRowSet.isFirst()) {
828                             firstButton.setEnabled(true);
829                             previousButton.setEnabled(true);
830                         } else {
831                             firstButton.setEnabled(false);
832                             previousButton.setEnabled(false);
833                         }
834                         if ( dBNav != null ) {
835                             dBNav.performNavigationOps(SSDBNav.NAVIGATION_LAST);
836                         }
837                     // GET THE ROW NUMBER AND SET IT TO ROW NUMBER TEXT FIELD
838
currentRow = sSRowSet.getRow();
839                         txtCurrentRow.setText(String.valueOf(currentRow));
840                     } catch(SQLException se) {
841                         se.printStackTrace();
842                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while updating row or moving the cursor.\n"+se.getMessage());
843                     }
844                 }
845             });
846
847         // THIS BUTTON INSERTS THE ROW AND MOVES TO THE NEWLY INSERTED ROW.
848
// WHEN INSERT BUTTON IS PRESSED NAVIGATION WILL BE DISABLED SO THOSE HAVE TO BE
849
// ENABLED HERE
850
commitButton.addActionListener(new ActionListener() {
851                 public void actionPerformed(ActionEvent ae) {
852                     try {
853                         if (onInsertRow) {
854                         // IF ON INSERT ROW ADD THE ROW.
855
sSRowSet.insertRow();
856                             if ( dBNav != null ) {
857                                 dBNav.performPostInsertOps();
858                             }
859
860                             sSRowSet.moveToCurrentRow();
861                         // MOVE TO CURRENT ROW MOVES SSROWSET TO RECORD AT WHICH ADD WAS PRESSED.
862
// BUT IT NICE TO BE ON THE ADDED ROW WHICH IS THE LAST ONE IN THE SSROWSET.
863
// ALSO MOVE TO CURRENT ROW MOVES THE SSROWSET POSITION BUT DOES NOT TRIGGER
864
// ANY EVENT FOR THE LISTENERS AS A RESULT VALUES ON THE SCREEN WILL NOT
865
// DISPLAY THE CURRENT RECORD VALUES.
866
sSRowSet.last();
867                         // INCREMENT THE ROW COUNT
868
rowCount++;
869                         // SET THE ROW COUNT AS LABEL
870
lblRowCount.setText("of " + rowCount);
871                         // GET CURRENT ROW NUMBER
872
currentRow = sSRowSet.getRow();
873                         // UPDATE THE TEXT FEILD
874
txtCurrentRow.setText(String.valueOf(currentRow));
875                         } else {
876                         // ELSE UPDATE THE PRESENT ROW VALUES.
877
sSRowSet.updateRow();
878                         }
879
880                         onInsertRow = false;
881
882                         if (!sSRowSet.isFirst()) {
883                             firstButton.setEnabled(true);
884                             previousButton.setEnabled(true);
885                         }
886                         if (!sSRowSet.isLast()) {
887                             nextButton.setEnabled(true);
888                             lastButton.setEnabled(true);
889                         }
890                         refreshButton.setEnabled(true);
891
892                         if (insertion) {
893                             addButton.setEnabled(true);
894                         }
895                         if (deletion) {
896                             deleteButton.setEnabled(true);
897                         }
898                     } catch(SQLException se) {
899                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while inserting row.\n"+se.getMessage());
900                         se.printStackTrace();
901                     }
902                 }
903             });
904
905         // THIS BUTTON IS USED TO CANCEL THE CHANGES MADE TO THE RECORD.
906
// IT CAN ALSO BE USED TO CANCEL INSERT ROW.
907
// SO THE BUTTONS DISABLED AT THE INSERT BUTTON EVENT HAVE TO BE ENABLED
908
undoButton.addActionListener(new ActionListener() {
909                 public void actionPerformed(ActionEvent ae) {
910                     try {
911                     // CALL MOVE TO CURRENT ROW IF ON INSERT ROW.
912
if(onInsertRow){
913                             sSRowSet.moveToCurrentRow();
914                         }
915                     // THIS FUNCTION IS NOT NEED IF ON INSERT ROW
916
// BUT MOVETOINSERTROW WILL NOT TRIGGER ANY EVENT SO FOR THE SCREEN
917
// TO UPDATE WE NEED TO TRIGGER SOME THING.
918
// SINCE USER IS MOVED TO CURRENT ROW PRIOR TO INSERT IT IS SAFE TO
919
// CALL CANCELROWUPDATE TO GET A TRIGGER
920
sSRowSet.cancelRowUpdates();
921                         onInsertRow = false;
922                         if (dBNav != null) {
923                             dBNav.performCancelOps();
924                         }
925                         //sSRowSet.deleteRow();
926
//sSRowSet.moveToCurrentRow();
927
firstButton.setEnabled(true);
928                         previousButton.setEnabled(true);
929                         nextButton.setEnabled(true);
930                         lastButton.setEnabled(true);
931                         refreshButton.setEnabled(true);
932                         if (insertion) {
933                             addButton.setEnabled(true);
934                         }
935                         if (deletion) {
936                             deleteButton.setEnabled(true);
937                         }
938                         
939                     // IF MOVED FROM INSERT ROW NEED TO UPDATE THE CURRENT ROW NUMBER.
940
int row = sSRowSet.getRow();
941                         txtCurrentRow.setText(String.valueOf(currentRow));
942                             
943                     } catch(SQLException se) {
944                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while undoing changes.\n"+se.getMessage());
945                         se.printStackTrace();
946                     }
947                 }
948             });
949
950         // REFETCH REFETCHES THE ROWS FROMS THE DATABASE AND MOVES THE CURSOR TO THE FIRST
951
// RECORD IF THERE ARE NO RECORDS NAVIGATION BUTTONS ARE DIABLED
952
// EVEN IS THERE ARE RECORDS PREVIOUS BUTTON IS DISABLED BECAUSE THE SSROWSET IS ON
953
// THE FIRST ROW
954
refreshButton.addActionListener(new ActionListener() {
955                 public void actionPerformed(ActionEvent ae) {
956                     sSRowSet.removeRowSetListener(sSRowSetListener);
957                     try {
958                         if (callExecute) {
959                             sSRowSet.execute();
960                             if (!sSRowSet.next()) {
961                                 rowCount = 0;
962                                 currentRow = 0;
963                                 firstButton.setEnabled(false);
964                                 previousButton.setEnabled(false);
965                                 nextButton.setEnabled(false);
966                                 lastButton.setEnabled(false);
967
968                             } else {
969                             // IF THERE ARE ROWS GET THE ROW COUNT
970
sSRowSet.last();
971                                 rowCount = sSRowSet.getRow();
972                                 sSRowSet.first();
973                                 currentRow = sSRowSet.getRow();
974                                 firstButton.setEnabled(false);
975                                 previousButton.setEnabled(false);
976                                 nextButton.setEnabled(true);
977                                 lastButton.setEnabled(true);
978                             }
979                         // SET THE ROW COUNT AS LABEL
980
lblRowCount.setText("of " + rowCount);
981                             txtCurrentRow.setText(String.valueOf(currentRow));
982                         }
983
984                         if ( dBNav != null ) {
985                             dBNav.performRefreshOps();
986                         }
987
988                     } catch(SQLException se) {
989                         se.printStackTrace();
990                         JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured refreshing the data.\n"+se.getMessage());
991                     }
992                     sSRowSet.addRowSetListener(sSRowSetListener);
993                 }
994             });
995
996         // INSERT ROW BUTTON MOVES THE SSROWSET TO THE INSERT ROW POSITION
997
// AT THIS TIME NAVIGATION HAS TO BE DISABLED
998
// ONLY COMMIT AND CANCEL ARE ENABLED
999
addButton.addActionListener(new ActionListener() {
1000                public void actionPerformed(ActionEvent ae) {
1001                    try {
1002                        sSRowSet.moveToInsertRow();
1003                        onInsertRow = true;
1004
1005                        if ( dBNav != null ) {
1006                            dBNav.performPreInsertOps();
1007                        }
1008                        //sSRowSet.updateString("client_name", "prasanh reddy");
1009
//sSRowSet.insertRow();
1010
//sSRowSet.moveToCurrentRow();
1011
firstButton.setEnabled(false);
1012                        previousButton.setEnabled(false);
1013                        nextButton.setEnabled(false);
1014                        lastButton.setEnabled(false);
1015                        commitButton.setEnabled(true);
1016                        undoButton.setEnabled(true);
1017                        refreshButton.setEnabled(false);
1018                        addButton.setEnabled(false);
1019                        deleteButton.setEnabled(false);
1020
1021                    } catch(SQLException se) {
1022                        JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while moving to insert row.\n"+se.getMessage());
1023                        se.printStackTrace();
1024                    }
1025                }
1026            });
1027
1028        // DELETES THE CURRENT ROW AND MOVES TO NEXT ROW
1029
// IF THE DELETED ROW IS THE LAST ROW THEN MOVES TO LAST ROW IN SSROWSET
1030
// AFTER THE DELETION IS MADE (THATS THE PREVIOUS ROW TO THE DELETED ROW)
1031
deleteButton.addActionListener(new ActionListener() {
1032                public void actionPerformed(ActionEvent ae) {
1033                    try {
1034                        int answer = JOptionPane.showConfirmDialog(SSDataNavigator.this,"Are you sure you want to delete this record?","Delete Present Record", JOptionPane.YES_NO_OPTION);
1035                        if ( answer != JOptionPane.YES_OPTION ) {
1036                            return;
1037                        }
1038
1039                        if ( dBNav != null ) {
1040                            dBNav.performPreDeletionOps();
1041                        }
1042                        sSRowSet.deleteRow();
1043                        if ( dBNav != null ) {
1044                            dBNav.performPostDeletionOps();
1045                        }
1046
1047                        if (! sSRowSet.next() ) {
1048                            sSRowSet.last();
1049                        }
1050                    // SEEMS DELETION WAS SUCCESSFULL DECREMENT ROWCOUNT
1051
rowCount--;
1052                    // SET THE ROW COUNT AS LABEL
1053
lblRowCount.setText("of " + rowCount);
1054                    // GET CURRENT ROW NUMBER
1055
currentRow = sSRowSet.getRow();
1056                    // UPDATE THE TEXT FEILD
1057
txtCurrentRow.setText(String.valueOf(currentRow));
1058                    } catch(SQLException se) {
1059                        JOptionPane.showMessageDialog(SSDataNavigator.this,"Exception occured while deleting row.\n"+se.getMessage());
1060                        se.printStackTrace();
1061                    }
1062                }
1063            });
1064
1065        // LISTENER FOR THE TEXT FIELD. USER CAN ENTER A ROW NUMBER IN THE TEXT
1066
// FIELD TO MOVE THE THE SPEICIFIED ROW.
1067
// IF ITS NOT A NUMBER OR IF ITS NOT VALID FOR THE CURRENT SSROWSET
1068
// NOTHING HAPPENS.
1069
txtCurrentRow.addKeyListener(new KeyAdapter() {
1070                public void keyReleased(KeyEvent ke) {
1071                    if (ke.getKeyCode() == KeyEvent.VK_ENTER) {
1072                        try {
1073                            int row = Integer.parseInt(txtCurrentRow.getText().trim());
1074                            if (row <= rowCount && row >0) {
1075                                sSRowSet.absolute(row);
1076                            }
1077                        } catch(Exception JavaDoc e) {
1078                            // do nothing
1079
}
1080                    }
1081                }
1082            });
1083
1084    }
1085
1086    /**
1087     * Adds the listeners on the SSRowSet used by data navigator.
1088     */

1089    private class SSDBNavRowSetListener implements RowSetListener JavaDoc {
1090
1091        public void cursorMoved(RowSetEvent JavaDoc rse){
1092        // IF THERE ARE ROWS GET THE ROW COUNT
1093
try{
1094                currentRow = sSRowSet.getRow();
1095                updateInfo();
1096            }catch(SQLException se){
1097                se.printStackTrace();
1098            }
1099        }
1100
1101        public void rowChanged(RowSetEvent JavaDoc rse){
1102        // DO NOTHING
1103
}
1104
1105        public void rowSetChanged(RowSetEvent JavaDoc rse){
1106        // IF THERE ARE ROWS GET THE ROW COUNT
1107
try{
1108                sSRowSet.last();
1109                rowCount = sSRowSet.getRow();
1110                sSRowSet.first();
1111                currentRow = sSRowSet.getRow();
1112                updateInfo();
1113            }catch(SQLException se){
1114                se.printStackTrace();
1115            }
1116            updateInfo();
1117        }
1118
1119        protected void updateInfo(){
1120        // SET THE ROW COUNT AS LABEL
1121
lblRowCount.setText("of " + rowCount);
1122            txtCurrentRow.setText(String.valueOf(currentRow));
1123        // ENABLE OR DISABLE BUTTONS
1124
if (rowCount == 0) {
1125                firstButton.setEnabled(false);
1126                previousButton.setEnabled(false);
1127                nextButton.setEnabled(false);
1128                lastButton.setEnabled(false);
1129            } else{
1130                firstButton.setEnabled(true);
1131                previousButton.setEnabled(true);
1132                nextButton.setEnabled(true);
1133                lastButton.setEnabled(true);
1134            }
1135
1136            try {
1137                if (sSRowSet.isLast()) {
1138                    nextButton.setEnabled(false);
1139                    lastButton.setEnabled(false);
1140                }
1141                if (sSRowSet.isFirst()) {
1142                    firstButton.setEnabled(false);
1143                    previousButton.setEnabled(false);
1144                }
1145
1146            } catch(SQLException se) {
1147                se.printStackTrace();
1148            }
1149        }
1150    }
1151
1152
1153// DEPRECATED STUFF....................
1154

1155    /**
1156     * Sets the new SSRowSet for the combo box.
1157     *
1158     * @param _sSRowSet SSRowSet to which the combo has to update values.
1159     *
1160     * @deprecated
1161     * @see #setSSRowSet
1162     */

1163    public void setRowSet(SSRowSet _sSRowSet) {
1164        setSSRowSet(_sSRowSet);
1165    }
1166
1167    /**
1168     * Returns the SSRowSet being used.
1169     *
1170     * @return returns the SSRowSet being used.
1171     *
1172     * @deprecated
1173     * @see #getSSRowSet
1174     */

1175     public SSRowSet getRowSet() {
1176        return sSRowSet;
1177     }
1178
1179} // end public class SSDataNavigator extends JPanel {
1180

1181
1182
1183/*
1184 * $Log: SSDataNavigator.java,v $
1185 * Revision 1.35 2005/03/08 16:13:50 prasanth
1186 * In undoButton listener based on insertRow flag changing the function call.
1187 * cancelRowUpdates throws exception if current row is on insertRow.
1188 * Used to work in 1.4.2 (though java docs say it would not).
1189 * Also updating the current row number when undo is pressed.
1190 *
1191 * Revision 1.34 2005/02/13 15:38:20 yoda2
1192 * Removed redundant PropertyChangeListener and VetoableChangeListener class variables and methods from components with JComponent as an ancestor.
1193 *
1194 * Revision 1.33 2005/02/12 03:29:26 yoda2
1195 * Added bound properties (for beans).
1196 *
1197 * Revision 1.32 2005/02/11 22:59:28 yoda2
1198 * Imported PropertyVetoException and added some bound properties.
1199 *
1200 * Revision 1.31 2005/02/11 20:16:04 yoda2
1201 * Added infrastructure to support property & vetoable change listeners (for beans).
1202 *
1203 * Revision 1.30 2005/02/10 20:13:00 yoda2
1204 * Setter/getter cleanup & method reordering for consistency.
1205 *
1206 * Revision 1.29 2005/02/07 22:47:15 yoda2
1207 * Replaced internal calls to setRowSet() with calls to setSSRowSet().
1208 *
1209 * Revision 1.28 2005/02/07 22:19:33 yoda2
1210 * Fixed infinite loop in deprecated setRowSet() which was calling setRowSet() rather than setSSRowSet()
1211 *
1212 * Revision 1.27 2005/02/07 20:27:26 yoda2
1213 * JavaDoc cleanup & made private listener data members final.
1214 *
1215 * Revision 1.26 2005/02/04 22:48:54 yoda2
1216 * API cleanup & updated Copyright info.
1217 *
1218 * Revision 1.25 2005/01/09 03:56:14 prasanth
1219 * Added public methods to programmatically perform different button clicks.
1220 *
1221 * Revision 1.24 2004/11/11 14:45:48 yoda2
1222 * Using TextPad, converted all tabs to "soft" tabs comprised of four actual spaces.
1223 *
1224 * Revision 1.23 2004/11/01 15:53:30 yoda2
1225 * Fixed various JavaDoc errors.
1226 *
1227 * Revision 1.22 2004/10/25 22:03:17 yoda2
1228 * Updated JavaDoc for new datasource abstraction layer in 0.9.0 release.
1229 *
1230 * Revision 1.21 2004/10/25 19:51:02 prasanth
1231 * Modified to use the new SSRowSet instead of RowSet.
1232 *
1233 * Revision 1.20 2004/09/21 18:58:28 prasanth
1234 * removing the sSRowSet listener while doing the refresh ops.
1235 *
1236 * Revision 1.19 2004/09/21 14:15:33 prasanth
1237 * Displaying error messages when an exception occurs, when the user presses
1238 * any button.
1239 *
1240 * Revision 1.18 2004/09/08 18:41:54 prasanth
1241 * Added a sSRowSet listener.
1242 *
1243 * Revision 1.17 2004/09/02 16:37:05 prasanth
1244 * Moving to the last record if your has added a record & pressed commit button.
1245 * This would keep the user in the added record.
1246 *
1247 * Revision 1.16 2004/09/01 18:42:08 prasanth
1248 * Was calling next in the refresh listener. This would move to second record
1249 * if refresh is pressed. If there is only one record then user will not be able to
1250 * see as the navigation buttons are also disabled.
1251 *
1252 * Revision 1.15 2004/08/26 22:00:00 prasanth
1253 * Setting all the buttons when a new sSRowSet is set.
1254 *
1255 * Revision 1.14 2004/08/24 22:21:03 prasanth
1256 * Changed the way images are loaded.
1257 *
1258 * Revision 1.13 2004/08/16 20:51:16 yoda2
1259 * Gave button names in code more meaningful names (e.g. button1 -> firstButton).
1260 *
1261 * Revision 1.12 2004/08/13 14:55:28 prasanth
1262 * Changed the default size of buttons (decreased).
1263 * Also that of text field & label (increased).
1264 * Displaying "of" before rowcount.
1265 *
1266 * Revision 1.11 2004/08/12 23:50:24 prasanth
1267 * Changing the row count when a new row is added or a row is deleted.
1268 *
1269 * Revision 1.10 2004/08/11 20:29:01 prasanth
1270 * When sSRowSet has no rows the values in text field and row count label were
1271 * not updated so corrected this.
1272 *
1273 * Revision 1.9 2004/08/10 22:06:59 yoda2
1274 * Added/edited JavaDoc, made code layout more uniform across classes, made various small coding improvements suggested by PMD.
1275 *
1276 * Revision 1.8 2004/08/02 15:04:06 prasanth
1277 * 1. Added a text field to display current row number.
1278 * 2. Added a label to display the total number of rows in the sSRowSet.
1279 * 3. Added listener to text field so that user can enter a row number
1280 * to navigate to that row.
1281 *
1282 * Revision 1.7 2004/03/08 16:40:00 prasanth
1283 * Added the if condition to check for callExecute in the listener for refresh button.
1284 *
1285 * Revision 1.6 2004/02/23 16:36:00 prasanth
1286 * Added setMySQLDB function.
1287 * Skipping execute call on the sSRowSet if mySQL is true.
1288 *
1289 * Revision 1.5 2004/01/27 17:13:03 prasanth
1290 * Changed the behaviour of commit button. When not on insert row will update
1291 * present row.
1292 *
1293 * Also modified enabling and disabling of navigation buttons.
1294 *
1295 * Revision 1.4 2003/11/26 21:24:49 prasanth
1296 * Calling performCancelOps().
1297 *
1298 * Revision 1.3 2003/10/31 16:02:52 prasanth
1299 * Added login to disable the navigation buttons when only one record is present
1300 * in the sSRowSet.
1301 *
1302 * Revision 1.2 2003/09/25 14:27:45 yoda2
1303 * Removed unused Import statements and added preformatting tags to JavaDoc descriptions.
1304 *
1305 * Revision 1.1.1.1 2003/09/25 13:56:43 yoda2
1306 * Initial CVS import for SwingSet.
1307 *
1308 */
Popular Tags