1 /* DefaultTreeSelectionModel.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
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)
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.
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
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
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. */
39 package javax
.swing
.tree
;
41 import java
.beans
.PropertyChangeListener
;
42 import java
.io
.IOException
;
43 import java
.io
.ObjectInputStream
;
44 import java
.io
.ObjectOutputStream
;
45 import java
.io
.Serializable
;
46 import java
.util
.EventListener
;
47 import java
.util
.Vector
;
48 import javax
.swing
.DefaultListSelectionModel
;
49 import javax
.swing
.event
.SwingPropertyChangeSupport
;
50 import javax
.swing
.event
.EventListenerList
;
51 import javax
.swing
.event
.TreeSelectionEvent
;
52 import javax
.swing
.event
.TreeSelectionListener
;
55 * DefaultTreeSelectionModel
56 * @author Andrew Selkirk
58 public class DefaultTreeSelectionModel
59 implements Cloneable
, Serializable
, TreeSelectionModel
61 static final long serialVersionUID
= 3288129636638950196L;
63 //-------------------------------------------------------------
64 // Variables --------------------------------------------------
65 //-------------------------------------------------------------
68 * SELECTION_MODE_PROPERTY
70 public static final String SELECTION_MODE_PROPERTY
= "selectionMode";
75 protected SwingPropertyChangeSupport changeSupport
;
80 protected TreePath
[] selection
;
85 protected EventListenerList listenerList
;
90 protected transient RowMapper rowMapper
;
95 protected DefaultListSelectionModel listSelectionModel
;
100 protected int selectionMode
;
105 protected TreePath leadPath
;
110 protected int leadIndex
;
115 protected int leadRow
;
118 //-------------------------------------------------------------
119 // Initialization ---------------------------------------------
120 //-------------------------------------------------------------
123 * Constructor DefaultTreeSelectionModel
125 public DefaultTreeSelectionModel() {
127 } // DefaultTreeSelectionModel()
130 //-------------------------------------------------------------
131 // Methods ----------------------------------------------------
132 //-------------------------------------------------------------
136 * @exception CloneNotSupportedException TODO
139 public Object
clone() throws CloneNotSupportedException
{
147 public String
toString() {
154 * @exception IOException TODO
156 private void writeObject(ObjectOutputStream value0
) throws IOException
{
163 * @exception IOException TODO
164 * @exception ClassNotFoundException TODO
166 private void readObject(ObjectInputStream value0
) throws IOException
, ClassNotFoundException
{
174 public void setRowMapper(RowMapper value0
) {
182 public RowMapper
getRowMapper() {
190 public void setSelectionMode(int value0
) {
192 } // setSelectionMode()
198 public int getSelectionMode() {
200 } // getSelectionMode()
206 public void setSelectionPath(TreePath value0
) {
208 } // setSelectionPath()
214 public void setSelectionPaths(TreePath
[] value0
) {
216 } // setSelectionPaths()
222 public void addSelectionPath(TreePath value0
) {
224 } // addSelectionPath()
230 public void addSelectionPaths(TreePath
[] value0
) {
232 } // addSelectionPaths()
235 * removeSelectionPath
238 public void removeSelectionPath(TreePath value0
) {
240 } // removeSelectionPath()
243 * removeSelectionPaths
246 public void removeSelectionPaths(TreePath
[] value0
) {
248 } // removeSelectionPaths()
254 public TreePath
getSelectionPath() {
256 } // getSelectionPath()
260 * @returns TreePath[]
262 public TreePath
[] getSelectionPaths() {
264 } // getSelectionPaths()
270 public int getSelectionCount() {
272 } // getSelectionCount()
279 public boolean isPathSelected(TreePath value0
) {
280 return false; // TODO
281 } // isPathSelected()
287 public boolean isSelectionEmpty() {
288 return false; // TODO
289 } // isSelectionEmpty()
294 public void clearSelection() {
296 } // clearSelection()
299 * addTreeSelectionListener
302 public void addTreeSelectionListener(TreeSelectionListener value0
) {
304 } // addTreeSelectionListener()
307 * removeTreeSelectionListener
310 public void removeTreeSelectionListener(TreeSelectionListener value0
) {
312 } // removeTreeSelectionListener()
318 protected void fireValueChanged(TreeSelectionEvent value0
) {
320 } // fireValueChanged()
325 * @returns EventListener[]
327 public EventListener
[] getListeners(Class value0
) {
335 public int[] getSelectionRows() {
337 } // getSelectionRows()
343 public int getMinSelectionRow() {
345 } // getMinSelectionRow()
351 public int getMaxSelectionRow() {
353 } // getMaxSelectionRow()
360 public boolean isRowSelected(int value0
) {
361 return false; // TODO
367 public void resetRowSelection() {
369 } // resetRowSelection()
372 * getLeadSelectionRow
375 public int getLeadSelectionRow() {
377 } // getLeadSelectionRow()
380 * getLeadSelectionPath
383 public TreePath
getLeadSelectionPath() {
385 } // getLeadSelectionPath()
388 * addPropertyChangeListener
391 public synchronized void addPropertyChangeListener(PropertyChangeListener value0
) {
393 } // addPropertyChangeListener()
396 * removePropertyChangeListener
399 public synchronized void removePropertyChangeListener(PropertyChangeListener value0
) {
401 } // removePropertyChangeListener()
404 * insureRowContinuity
406 protected void insureRowContinuity() {
408 } // insureRowContinuity()
415 protected boolean arePathsContiguous(TreePath
[] value0
) {
416 return false; // TODO
417 } // arePathsContiguous()
424 protected boolean canPathsBeAdded(TreePath
[] value0
) {
425 return false; // TODO
426 } // canPathsBeAdded()
433 protected boolean canPathsBeRemoved(TreePath
[] value0
) {
434 return false; // TODO
435 } // canPathsBeRemoved()
442 protected void notifyPathChange(Vector value0
, TreePath value1
) {
444 } // notifyPathChange()
449 protected void updateLeadIndex() {
451 } // updateLeadIndex()
456 protected void insureUniqueness() {
458 } // insureUniqueness()
461 } // DefaultTreeSelectionModel