KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* $Id: SSDBNav.java,v 1.11 2005/02/09 17:21:21 yoda2 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 /**
36  * SSDBNav.java
37  *<p>
38  * SwingSet - Open Toolkit For Making Swing Controls Database-Aware
39  *<p><pre>
40  * Interface that provides a set of functions to perform some custom operation
41  * before a record is added, after a record is added, before a record is deleted
42  * and after a record is deleted.
43  *
44  * These functions are called by the SSDataNavigator if the SSDBNav datamember of
45  * the SSDataNavigator is set using the setDBNav() function of the
46  * SSDataNavigator.
47  *
48  * performPreInsertOps() is called when the user presses the insert button.
49  *
50  * performPostInsertOps() is called when the user presses the commit button
51  * after updating the values for the newly inserted row. If the user
52  * presses the Undo button after the insert button is pressed the
53  * insertion is cancelled and this function will not be called.
54  *
55  * performPreDeletionOps() is called when the user presses the delete
56  * button, but just before the deleteRow() method is called on the
57  * SSRowSet.
58  *
59  * performPostDeletionOps() is called when the user presses the delete
60  * button and after the deleteRow() method is called on the SSRowSet.
61  *
62  * Note that both the performPreDeletionOps() and performPostDeletionOps()
63  * will be executed when the user presses the delete button.
64  *</pre><p>
65  * @author $Author: yoda2 $
66  * @version $Revision: 1.11 $
67  */

68 public interface SSDBNav {
69
70     /**
71      * Constant indicating the navigation button next.
72      */

73     public static final int NAVIGATION_NEXT = 1;
74
75     /**
76      * Constant indicating the navigation button previous.
77      */

78     public static final int NAVIGATION_PREVIOUS = 2;
79
80     /**
81      * Constant indicating the navigation button first.
82      */

83     public static final int NAVIGATION_FIRST = 3;
84
85     /**
86      * Constant indicating the navigation button last.
87      */

88     public static final int NAVIGATION_LAST = 4;
89
90     /**
91      * Method to perform pre-insertion operations.
92      */

93     public void performPreInsertOps();
94
95     /**
96      * Method to perform post-insertion operations.
97      *
98      * In addition to this you can have a listener on the SSRowSet attached
99      * to a SSDataNavigator to get notified when a row is inserted.
100      */

101     public void performPostInsertOps();
102
103     /**
104      * Method to perform operations when the user is on the insert row and
105      * cancels the insert by clicking on the undo button.
106      */

107     public void performCancelOps();
108
109     /**
110      * Method to perform pre-deletion operations.
111      *
112      * SSRowSet does not provide any notifications before the deletion of a row. but a notification
113      * will be received after the deletion if you have listener for the SSRowSet.
114      */

115     public void performPreDeletionOps();
116
117     /**
118      * Method to perform post-deletion operations.
119      *
120      * The SSRowSet listener also provides the notification after the deletion of the row.
121      */

122     public void performPostDeletionOps();
123
124     /**
125      * Method to perform navigation-related operations.
126      *
127      * Possible values are NAVIGATION_NEXT, NAVIGATION_PREVIOUS, NAVIGATION_FIRST,
128      * NAVIGATION_LAST.
129      *
130      * @param _navigationType this indicates the type of navigation.
131      */

132     public void performNavigationOps(int _navigationType);
133
134     /**
135      * Method to perform operations when the user hits the refresh button.
136      */

137     public void performRefreshOps();
138
139 } // end public interface SSDBNav {
140

141
142
143 /*
144  * $Log: SSDBNav.java,v $
145  * Revision 1.11 2005/02/09 17:21:21 yoda2
146  * JavaDoc cleanup.
147  *
148  * Revision 1.10 2005/02/04 22:48:53 yoda2
149  * API cleanup & updated Copyright info.
150  *
151  * Revision 1.9 2004/11/11 14:45:48 yoda2
152  * Using TextPad, converted all tabs to "soft" tabs comprised of four actual spaces.
153  *
154  * Revision 1.8 2004/11/01 15:53:30 yoda2
155  * Fixed various JavaDoc errors.
156  *
157  * Revision 1.7 2004/10/25 22:13:44 yoda2
158  * Updated JavaDoc for new datasource abstraction layer in 0.9.0 release.
159  *
160  * Revision 1.6 2004/08/10 22:06:59 yoda2
161  * Added/edited JavaDoc, made code layout more uniform across classes, made various small coding improvements suggested by PMD.
162  *
163  * Revision 1.5 2004/03/08 16:43:37 prasanth
164  * Updated copy right year.
165  *
166  * Revision 1.4 2003/12/16 18:01:40 prasanth
167  * Documented versions for release 0.6.0
168  *
169  * Revision 1.3 2003/11/26 21:21:50 prasanth
170  * Added function performCancelOps().
171  *
172  * Revision 1.2 2003/09/25 14:27:45 yoda2
173  * Removed unused Import statements and added preformatting tags to JavaDoc descriptions.
174  *
175  * Revision 1.1.1.1 2003/09/25 13:56:43 yoda2
176  * Initial CVS import for SwingSet.
177  *
178  */

179
Popular Tags