1 | /* DefaultTreeSelectionModel.java --
|
---|
2 | Copyright (C) 2002 Free Software Foundation, Inc.
|
---|
3 |
|
---|
4 | This file is part of GNU Classpath.
|
---|
5 |
|
---|
6 | GNU Classpath is free software; you can redistribute it and/or modify
|
---|
7 | it under the terms of the GNU General Public License as published by
|
---|
8 | the Free Software Foundation; either version 2, or (at your option)
|
---|
9 | any later version.
|
---|
10 |
|
---|
11 | GNU Classpath is distributed in the hope that it will be useful, but
|
---|
12 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | General Public License for more details.
|
---|
15 |
|
---|
16 | You should have received a copy of the GNU General Public License
|
---|
17 | along with GNU Classpath; see the file COPYING. If not, write to the
|
---|
18 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
---|
19 | 02111-1307 USA.
|
---|
20 |
|
---|
21 | Linking this library statically or dynamically with other modules is
|
---|
22 | making a combined work based on this library. Thus, the terms and
|
---|
23 | conditions of the GNU General Public License cover the whole
|
---|
24 | combination.
|
---|
25 |
|
---|
26 | As a special exception, the copyright holders of this library give you
|
---|
27 | permission to link this library with independent modules to produce an
|
---|
28 | executable, regardless of the license terms of these independent
|
---|
29 | modules, and to copy and distribute the resulting executable under
|
---|
30 | terms of your choice, provided that you also meet, for each linked
|
---|
31 | independent module, the terms and conditions of the license of that
|
---|
32 | module. An independent module is a module which is not derived from
|
---|
33 | or based on this library. If you modify this library, you may extend
|
---|
34 | this exception to your version of the library, but you are not
|
---|
35 | obligated to do so. If you do not wish to do so, delete this
|
---|
36 | exception statement from your version. */
|
---|
37 |
|
---|
38 | package javax.swing.tree;
|
---|
39 |
|
---|
40 | // Imports
|
---|
41 | import java.beans.*;
|
---|
42 | import java.io.*;
|
---|
43 | import java.util.*;
|
---|
44 | import javax.swing.*;
|
---|
45 | import javax.swing.event.*;
|
---|
46 |
|
---|
47 | /**
|
---|
48 | * DefaultTreeSelectionModel
|
---|
49 | * @author Andrew Selkirk
|
---|
50 | */
|
---|
51 | public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeSelectionModel {
|
---|
52 |
|
---|
53 | //-------------------------------------------------------------
|
---|
54 | // Variables --------------------------------------------------
|
---|
55 | //-------------------------------------------------------------
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * SELECTION_MODE_PROPERTY
|
---|
59 | */
|
---|
60 | public static final String SELECTION_MODE_PROPERTY = "selectionMode";
|
---|
61 |
|
---|
62 | /**
|
---|
63 | * changeSupport
|
---|
64 | */
|
---|
65 | protected SwingPropertyChangeSupport changeSupport;
|
---|
66 |
|
---|
67 | /**
|
---|
68 | * selection
|
---|
69 | */
|
---|
70 | protected TreePath[] selection;
|
---|
71 |
|
---|
72 | /**
|
---|
73 | * listenerList
|
---|
74 | */
|
---|
75 | protected EventListenerList listenerList;
|
---|
76 |
|
---|
77 | /**
|
---|
78 | * rowMapper
|
---|
79 | */
|
---|
80 | protected transient RowMapper rowMapper;
|
---|
81 |
|
---|
82 | /**
|
---|
83 | * listSelectionModel
|
---|
84 | */
|
---|
85 | protected DefaultListSelectionModel listSelectionModel;
|
---|
86 |
|
---|
87 | /**
|
---|
88 | * selectionMode
|
---|
89 | */
|
---|
90 | protected int selectionMode;
|
---|
91 |
|
---|
92 | /**
|
---|
93 | * leadPath
|
---|
94 | */
|
---|
95 | protected TreePath leadPath;
|
---|
96 |
|
---|
97 | /**
|
---|
98 | * leadIndex
|
---|
99 | */
|
---|
100 | protected int leadIndex;
|
---|
101 |
|
---|
102 | /**
|
---|
103 | * leadRow
|
---|
104 | */
|
---|
105 | protected int leadRow;
|
---|
106 |
|
---|
107 |
|
---|
108 | //-------------------------------------------------------------
|
---|
109 | // Initialization ---------------------------------------------
|
---|
110 | //-------------------------------------------------------------
|
---|
111 |
|
---|
112 | /**
|
---|
113 | * Constructor DefaultTreeSelectionModel
|
---|
114 | */
|
---|
115 | public DefaultTreeSelectionModel() {
|
---|
116 | // TODO
|
---|
117 | } // DefaultTreeSelectionModel()
|
---|
118 |
|
---|
119 |
|
---|
120 | //-------------------------------------------------------------
|
---|
121 | // Methods ----------------------------------------------------
|
---|
122 | //-------------------------------------------------------------
|
---|
123 |
|
---|
124 | /**
|
---|
125 | * clone
|
---|
126 | * @exception CloneNotSupportedException TODO
|
---|
127 | * @returns Object
|
---|
128 | */
|
---|
129 | public Object clone() throws CloneNotSupportedException {
|
---|
130 | return null; // TODO
|
---|
131 | } // clone()
|
---|
132 |
|
---|
133 | /**
|
---|
134 | * toString
|
---|
135 | * @returns String
|
---|
136 | */
|
---|
137 | public String toString() {
|
---|
138 | return null; // TODO
|
---|
139 | } // toString()
|
---|
140 |
|
---|
141 | /**
|
---|
142 | * writeObject
|
---|
143 | * @param value0 TODO
|
---|
144 | * @exception IOException TODO
|
---|
145 | */
|
---|
146 | private void writeObject(ObjectOutputStream value0) throws IOException {
|
---|
147 | // TODO
|
---|
148 | } // writeObject()
|
---|
149 |
|
---|
150 | /**
|
---|
151 | * readObject
|
---|
152 | * @param value0 TODO
|
---|
153 | * @exception IOException TODO
|
---|
154 | * @exception ClassNotFoundException TODO
|
---|
155 | */
|
---|
156 | private void readObject(ObjectInputStream value0) throws IOException, ClassNotFoundException {
|
---|
157 | // TODO
|
---|
158 | } // readObject()
|
---|
159 |
|
---|
160 | /**
|
---|
161 | * setRowMapper
|
---|
162 | * @param value0 TODO
|
---|
163 | */
|
---|
164 | public void setRowMapper(RowMapper value0) {
|
---|
165 | // TODO
|
---|
166 | } // setRowMapper()
|
---|
167 |
|
---|
168 | /**
|
---|
169 | * getRowMapper
|
---|
170 | * @returns RowMapper
|
---|
171 | */
|
---|
172 | public RowMapper getRowMapper() {
|
---|
173 | return null; // TODO
|
---|
174 | } // getRowMapper()
|
---|
175 |
|
---|
176 | /**
|
---|
177 | * setSelectionMode
|
---|
178 | * @param value0 TODO
|
---|
179 | */
|
---|
180 | public void setSelectionMode(int value0) {
|
---|
181 | // TODO
|
---|
182 | } // setSelectionMode()
|
---|
183 |
|
---|
184 | /**
|
---|
185 | * getSelectionMode
|
---|
186 | * @returns int
|
---|
187 | */
|
---|
188 | public int getSelectionMode() {
|
---|
189 | return 0; // TODO
|
---|
190 | } // getSelectionMode()
|
---|
191 |
|
---|
192 | /**
|
---|
193 | * setSelectionPath
|
---|
194 | * @param value0 TODO
|
---|
195 | */
|
---|
196 | public void setSelectionPath(TreePath value0) {
|
---|
197 | // TODO
|
---|
198 | } // setSelectionPath()
|
---|
199 |
|
---|
200 | /**
|
---|
201 | * setSelectionPaths
|
---|
202 | * @param value0 TODO
|
---|
203 | */
|
---|
204 | public void setSelectionPaths(TreePath[] value0) {
|
---|
205 | // TODO
|
---|
206 | } // setSelectionPaths()
|
---|
207 |
|
---|
208 | /**
|
---|
209 | * addSelectionPath
|
---|
210 | * @param value0 TODO
|
---|
211 | */
|
---|
212 | public void addSelectionPath(TreePath value0) {
|
---|
213 | // TODO
|
---|
214 | } // addSelectionPath()
|
---|
215 |
|
---|
216 | /**
|
---|
217 | * addSelectionPaths
|
---|
218 | * @param value0 TODO
|
---|
219 | */
|
---|
220 | public void addSelectionPaths(TreePath[] value0) {
|
---|
221 | // TODO
|
---|
222 | } // addSelectionPaths()
|
---|
223 |
|
---|
224 | /**
|
---|
225 | * removeSelectionPath
|
---|
226 | * @param value0 TODO
|
---|
227 | */
|
---|
228 | public void removeSelectionPath(TreePath value0) {
|
---|
229 | // TODO
|
---|
230 | } // removeSelectionPath()
|
---|
231 |
|
---|
232 | /**
|
---|
233 | * removeSelectionPaths
|
---|
234 | * @param value0 TODO
|
---|
235 | */
|
---|
236 | public void removeSelectionPaths(TreePath[] value0) {
|
---|
237 | // TODO
|
---|
238 | } // removeSelectionPaths()
|
---|
239 |
|
---|
240 | /**
|
---|
241 | * getSelectionPath
|
---|
242 | * @returns TreePath
|
---|
243 | */
|
---|
244 | public TreePath getSelectionPath() {
|
---|
245 | return null; // TODO
|
---|
246 | } // getSelectionPath()
|
---|
247 |
|
---|
248 | /**
|
---|
249 | * getSelectionPaths
|
---|
250 | * @returns TreePath[]
|
---|
251 | */
|
---|
252 | public TreePath[] getSelectionPaths() {
|
---|
253 | return null; // TODO
|
---|
254 | } // getSelectionPaths()
|
---|
255 |
|
---|
256 | /**
|
---|
257 | * getSelectionCount
|
---|
258 | * @returns int
|
---|
259 | */
|
---|
260 | public int getSelectionCount() {
|
---|
261 | return 0; // TODO
|
---|
262 | } // getSelectionCount()
|
---|
263 |
|
---|
264 | /**
|
---|
265 | * isPathSelected
|
---|
266 | * @param value0 TODO
|
---|
267 | * @returns boolean
|
---|
268 | */
|
---|
269 | public boolean isPathSelected(TreePath value0) {
|
---|
270 | return false; // TODO
|
---|
271 | } // isPathSelected()
|
---|
272 |
|
---|
273 | /**
|
---|
274 | * isSelectionEmpty
|
---|
275 | * @returns boolean
|
---|
276 | */
|
---|
277 | public boolean isSelectionEmpty() {
|
---|
278 | return false; // TODO
|
---|
279 | } // isSelectionEmpty()
|
---|
280 |
|
---|
281 | /**
|
---|
282 | * clearSelection
|
---|
283 | */
|
---|
284 | public void clearSelection() {
|
---|
285 | // TODO
|
---|
286 | } // clearSelection()
|
---|
287 |
|
---|
288 | /**
|
---|
289 | * addTreeSelectionListener
|
---|
290 | * @param value0 TODO
|
---|
291 | */
|
---|
292 | public void addTreeSelectionListener(TreeSelectionListener value0) {
|
---|
293 | // TODO
|
---|
294 | } // addTreeSelectionListener()
|
---|
295 |
|
---|
296 | /**
|
---|
297 | * removeTreeSelectionListener
|
---|
298 | * @param value0 TODO
|
---|
299 | */
|
---|
300 | public void removeTreeSelectionListener(TreeSelectionListener value0) {
|
---|
301 | // TODO
|
---|
302 | } // removeTreeSelectionListener()
|
---|
303 |
|
---|
304 | /**
|
---|
305 | * fireValueChanged
|
---|
306 | * @param value0 TODO
|
---|
307 | */
|
---|
308 | protected void fireValueChanged(TreeSelectionEvent value0) {
|
---|
309 | // TODO
|
---|
310 | } // fireValueChanged()
|
---|
311 |
|
---|
312 | /**
|
---|
313 | * getListeners
|
---|
314 | * @param value0 TODO
|
---|
315 | * @returns EventListener[]
|
---|
316 | */
|
---|
317 | public EventListener[] getListeners(Class value0) {
|
---|
318 | return null; // TODO
|
---|
319 | } // getListeners()
|
---|
320 |
|
---|
321 | /**
|
---|
322 | * getSelectionRows
|
---|
323 | * @returns int[]
|
---|
324 | */
|
---|
325 | public int[] getSelectionRows() {
|
---|
326 | return null; // TODO
|
---|
327 | } // getSelectionRows()
|
---|
328 |
|
---|
329 | /**
|
---|
330 | * getMinSelectionRow
|
---|
331 | * @returns int
|
---|
332 | */
|
---|
333 | public int getMinSelectionRow() {
|
---|
334 | return 0; // TODO
|
---|
335 | } // getMinSelectionRow()
|
---|
336 |
|
---|
337 | /**
|
---|
338 | * getMaxSelectionRow
|
---|
339 | * @returns int
|
---|
340 | */
|
---|
341 | public int getMaxSelectionRow() {
|
---|
342 | return 0; // TODO
|
---|
343 | } // getMaxSelectionRow()
|
---|
344 |
|
---|
345 | /**
|
---|
346 | * isRowSelected
|
---|
347 | * @param value0 TODO
|
---|
348 | * @returns boolean
|
---|
349 | */
|
---|
350 | public boolean isRowSelected(int value0) {
|
---|
351 | return false; // TODO
|
---|
352 | } // isRowSelected()
|
---|
353 |
|
---|
354 | /**
|
---|
355 | * resetRowSelection
|
---|
356 | */
|
---|
357 | public void resetRowSelection() {
|
---|
358 | // TODO
|
---|
359 | } // resetRowSelection()
|
---|
360 |
|
---|
361 | /**
|
---|
362 | * getLeadSelectionRow
|
---|
363 | * @returns int
|
---|
364 | */
|
---|
365 | public int getLeadSelectionRow() {
|
---|
366 | return 0; // TODO
|
---|
367 | } // getLeadSelectionRow()
|
---|
368 |
|
---|
369 | /**
|
---|
370 | * getLeadSelectionPath
|
---|
371 | * @returns TreePath
|
---|
372 | */
|
---|
373 | public TreePath getLeadSelectionPath() {
|
---|
374 | return null; // TODO
|
---|
375 | } // getLeadSelectionPath()
|
---|
376 |
|
---|
377 | /**
|
---|
378 | * addPropertyChangeListener
|
---|
379 | * @param value0 TODO
|
---|
380 | */
|
---|
381 | public synchronized void addPropertyChangeListener(PropertyChangeListener value0) {
|
---|
382 | // TODO
|
---|
383 | } // addPropertyChangeListener()
|
---|
384 |
|
---|
385 | /**
|
---|
386 | * removePropertyChangeListener
|
---|
387 | * @param value0 TODO
|
---|
388 | */
|
---|
389 | public synchronized void removePropertyChangeListener(PropertyChangeListener value0) {
|
---|
390 | // TODO
|
---|
391 | } // removePropertyChangeListener()
|
---|
392 |
|
---|
393 | /**
|
---|
394 | * insureRowContinuity
|
---|
395 | */
|
---|
396 | protected void insureRowContinuity() {
|
---|
397 | // TODO
|
---|
398 | } // insureRowContinuity()
|
---|
399 |
|
---|
400 | /**
|
---|
401 | * arePathsContiguous
|
---|
402 | * @param value0 TODO
|
---|
403 | * @returns boolean
|
---|
404 | */
|
---|
405 | protected boolean arePathsContiguous(TreePath[] value0) {
|
---|
406 | return false; // TODO
|
---|
407 | } // arePathsContiguous()
|
---|
408 |
|
---|
409 | /**
|
---|
410 | * canPathsBeAdded
|
---|
411 | * @param value0 TODO
|
---|
412 | * @returns boolean
|
---|
413 | */
|
---|
414 | protected boolean canPathsBeAdded(TreePath[] value0) {
|
---|
415 | return false; // TODO
|
---|
416 | } // canPathsBeAdded()
|
---|
417 |
|
---|
418 | /**
|
---|
419 | * canPathsBeRemoved
|
---|
420 | * @param value0 TODO
|
---|
421 | * @returns boolean
|
---|
422 | */
|
---|
423 | protected boolean canPathsBeRemoved(TreePath[] value0) {
|
---|
424 | return false; // TODO
|
---|
425 | } // canPathsBeRemoved()
|
---|
426 |
|
---|
427 | /**
|
---|
428 | * notifyPathChange
|
---|
429 | * @param value0 TODO
|
---|
430 | * @param value1 TODO
|
---|
431 | */
|
---|
432 | protected void notifyPathChange(Vector value0, TreePath value1) {
|
---|
433 | // TODO
|
---|
434 | } // notifyPathChange()
|
---|
435 |
|
---|
436 | /**
|
---|
437 | * updateLeadIndex
|
---|
438 | */
|
---|
439 | protected void updateLeadIndex() {
|
---|
440 | // TODO
|
---|
441 | } // updateLeadIndex()
|
---|
442 |
|
---|
443 | /**
|
---|
444 | * insureUniqueness
|
---|
445 | */
|
---|
446 | protected void insureUniqueness() {
|
---|
447 | // TODO
|
---|
448 | } // insureUniqueness()
|
---|
449 |
|
---|
450 |
|
---|
451 | } // DefaultTreeSelectionModel
|
---|