summaryrefslogtreecommitdiffstats
path: root/libjava/javax/swing/tree/DefaultTreeSelectionModel.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/javax/swing/tree/DefaultTreeSelectionModel.java')
-rw-r--r--libjava/javax/swing/tree/DefaultTreeSelectionModel.java865
1 files changed, 464 insertions, 401 deletions
diff --git a/libjava/javax/swing/tree/DefaultTreeSelectionModel.java b/libjava/javax/swing/tree/DefaultTreeSelectionModel.java
index 79f642afc28..4fe69f4fb14 100644
--- a/libjava/javax/swing/tree/DefaultTreeSelectionModel.java
+++ b/libjava/javax/swing/tree/DefaultTreeSelectionModel.java
@@ -1,5 +1,5 @@
/* DefaultTreeSelectionModel.java --
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,9 +45,10 @@ import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.EventListener;
import java.util.Vector;
+
import javax.swing.DefaultListSelectionModel;
-import javax.swing.event.SwingPropertyChangeSupport;
import javax.swing.event.EventListenerList;
+import javax.swing.event.SwingPropertyChangeSupport;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
@@ -60,402 +61,464 @@ public class DefaultTreeSelectionModel
{
static final long serialVersionUID = 3288129636638950196L;
- //-------------------------------------------------------------
- // Variables --------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * SELECTION_MODE_PROPERTY
- */
- public static final String SELECTION_MODE_PROPERTY = "selectionMode";
-
- /**
- * changeSupport
- */
- protected SwingPropertyChangeSupport changeSupport;
-
- /**
- * selection
- */
- protected TreePath[] selection;
-
- /**
- * listenerList
- */
- protected EventListenerList listenerList;
-
- /**
- * rowMapper
- */
- protected transient RowMapper rowMapper;
-
- /**
- * listSelectionModel
- */
- protected DefaultListSelectionModel listSelectionModel;
-
- /**
- * selectionMode
- */
- protected int selectionMode;
-
- /**
- * leadPath
- */
- protected TreePath leadPath;
-
- /**
- * leadIndex
- */
- protected int leadIndex;
-
- /**
- * leadRow
- */
- protected int leadRow;
-
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor DefaultTreeSelectionModel
- */
- public DefaultTreeSelectionModel() {
- // TODO
- } // DefaultTreeSelectionModel()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * clone
- * @exception CloneNotSupportedException TODO
- * @returns Object
- */
- public Object clone() throws CloneNotSupportedException {
- return null; // TODO
- } // clone()
-
- /**
- * toString
- * @returns String
- */
- public String toString() {
- return null; // TODO
- } // toString()
-
- /**
- * writeObject
- * @param value0 TODO
- * @exception IOException TODO
- */
- private void writeObject(ObjectOutputStream value0) throws IOException {
- // TODO
- } // writeObject()
-
- /**
- * readObject
- * @param value0 TODO
- * @exception IOException TODO
- * @exception ClassNotFoundException TODO
- */
- private void readObject(ObjectInputStream value0) throws IOException, ClassNotFoundException {
- // TODO
- } // readObject()
-
- /**
- * setRowMapper
- * @param value0 TODO
- */
- public void setRowMapper(RowMapper value0) {
- // TODO
- } // setRowMapper()
-
- /**
- * getRowMapper
- * @returns RowMapper
- */
- public RowMapper getRowMapper() {
- return null; // TODO
- } // getRowMapper()
-
- /**
- * setSelectionMode
- * @param value0 TODO
- */
- public void setSelectionMode(int value0) {
- // TODO
- } // setSelectionMode()
-
- /**
- * getSelectionMode
- * @returns int
- */
- public int getSelectionMode() {
- return 0; // TODO
- } // getSelectionMode()
-
- /**
- * setSelectionPath
- * @param value0 TODO
- */
- public void setSelectionPath(TreePath value0) {
- // TODO
- } // setSelectionPath()
-
- /**
- * setSelectionPaths
- * @param value0 TODO
- */
- public void setSelectionPaths(TreePath[] value0) {
- // TODO
- } // setSelectionPaths()
-
- /**
- * addSelectionPath
- * @param value0 TODO
- */
- public void addSelectionPath(TreePath value0) {
- // TODO
- } // addSelectionPath()
-
- /**
- * addSelectionPaths
- * @param value0 TODO
- */
- public void addSelectionPaths(TreePath[] value0) {
- // TODO
- } // addSelectionPaths()
-
- /**
- * removeSelectionPath
- * @param value0 TODO
- */
- public void removeSelectionPath(TreePath value0) {
- // TODO
- } // removeSelectionPath()
-
- /**
- * removeSelectionPaths
- * @param value0 TODO
- */
- public void removeSelectionPaths(TreePath[] value0) {
- // TODO
- } // removeSelectionPaths()
-
- /**
- * getSelectionPath
- * @returns TreePath
- */
- public TreePath getSelectionPath() {
- return null; // TODO
- } // getSelectionPath()
-
- /**
- * getSelectionPaths
- * @returns TreePath[]
- */
- public TreePath[] getSelectionPaths() {
- return null; // TODO
- } // getSelectionPaths()
-
- /**
- * getSelectionCount
- * @returns int
- */
- public int getSelectionCount() {
- return 0; // TODO
- } // getSelectionCount()
-
- /**
- * isPathSelected
- * @param value0 TODO
- * @returns boolean
- */
- public boolean isPathSelected(TreePath value0) {
- return false; // TODO
- } // isPathSelected()
-
- /**
- * isSelectionEmpty
- * @returns boolean
- */
- public boolean isSelectionEmpty() {
- return false; // TODO
- } // isSelectionEmpty()
-
- /**
- * clearSelection
- */
- public void clearSelection() {
- // TODO
- } // clearSelection()
-
- /**
- * addTreeSelectionListener
- * @param value0 TODO
- */
- public void addTreeSelectionListener(TreeSelectionListener value0) {
- // TODO
- } // addTreeSelectionListener()
-
- /**
- * removeTreeSelectionListener
- * @param value0 TODO
- */
- public void removeTreeSelectionListener(TreeSelectionListener value0) {
- // TODO
- } // removeTreeSelectionListener()
-
- /**
- * fireValueChanged
- * @param value0 TODO
- */
- protected void fireValueChanged(TreeSelectionEvent value0) {
- // TODO
- } // fireValueChanged()
-
- /**
- * getListeners
- * @param value0 TODO
- * @returns EventListener[]
- */
- public EventListener[] getListeners(Class value0) {
- return null; // TODO
- } // getListeners()
-
- /**
- * getSelectionRows
- * @returns int[]
- */
- public int[] getSelectionRows() {
- return null; // TODO
- } // getSelectionRows()
-
- /**
- * getMinSelectionRow
- * @returns int
- */
- public int getMinSelectionRow() {
- return 0; // TODO
- } // getMinSelectionRow()
-
- /**
- * getMaxSelectionRow
- * @returns int
- */
- public int getMaxSelectionRow() {
- return 0; // TODO
- } // getMaxSelectionRow()
-
- /**
- * isRowSelected
- * @param value0 TODO
- * @returns boolean
- */
- public boolean isRowSelected(int value0) {
- return false; // TODO
- } // isRowSelected()
-
- /**
- * resetRowSelection
- */
- public void resetRowSelection() {
- // TODO
- } // resetRowSelection()
-
- /**
- * getLeadSelectionRow
- * @returns int
- */
- public int getLeadSelectionRow() {
- return 0; // TODO
- } // getLeadSelectionRow()
-
- /**
- * getLeadSelectionPath
- * @returns TreePath
- */
- public TreePath getLeadSelectionPath() {
- return null; // TODO
- } // getLeadSelectionPath()
-
- /**
- * addPropertyChangeListener
- * @param value0 TODO
- */
- public synchronized void addPropertyChangeListener(PropertyChangeListener value0) {
- // TODO
- } // addPropertyChangeListener()
-
- /**
- * removePropertyChangeListener
- * @param value0 TODO
- */
- public synchronized void removePropertyChangeListener(PropertyChangeListener value0) {
- // TODO
- } // removePropertyChangeListener()
-
- /**
- * insureRowContinuity
- */
- protected void insureRowContinuity() {
- // TODO
- } // insureRowContinuity()
-
- /**
- * arePathsContiguous
- * @param value0 TODO
- * @returns boolean
- */
- protected boolean arePathsContiguous(TreePath[] value0) {
- return false; // TODO
- } // arePathsContiguous()
-
- /**
- * canPathsBeAdded
- * @param value0 TODO
- * @returns boolean
- */
- protected boolean canPathsBeAdded(TreePath[] value0) {
- return false; // TODO
- } // canPathsBeAdded()
-
- /**
- * canPathsBeRemoved
- * @param value0 TODO
- * @returns boolean
- */
- protected boolean canPathsBeRemoved(TreePath[] value0) {
- return false; // TODO
- } // canPathsBeRemoved()
-
- /**
- * notifyPathChange
- * @param value0 TODO
- * @param value1 TODO
- */
- protected void notifyPathChange(Vector value0, TreePath value1) {
- // TODO
- } // notifyPathChange()
-
- /**
- * updateLeadIndex
- */
- protected void updateLeadIndex() {
- // TODO
- } // updateLeadIndex()
-
- /**
- * insureUniqueness
- */
- protected void insureUniqueness() {
- // TODO
- } // insureUniqueness()
-
-
-} // DefaultTreeSelectionModel
+ /**
+ * SELECTION_MODE_PROPERTY
+ */
+ public static final String SELECTION_MODE_PROPERTY = "selectionMode";
+
+ /**
+ * changeSupport
+ */
+ protected SwingPropertyChangeSupport changeSupport;
+
+ /**
+ * selection
+ */
+ protected TreePath[] selection;
+
+ /**
+ * listenerList
+ */
+ protected EventListenerList listenerList;
+
+ /**
+ * rowMapper
+ */
+ protected transient RowMapper rowMapper;
+
+ /**
+ * listSelectionModel
+ */
+ protected DefaultListSelectionModel listSelectionModel;
+
+ /**
+ * selectionMode
+ */
+ protected int selectionMode;
+
+ /**
+ * leadPath
+ */
+ protected TreePath leadPath;
+
+ /**
+ * leadIndex
+ */
+ protected int leadIndex;
+
+ /**
+ * leadRow
+ */
+ protected int leadRow;
+
+ /**
+ * Constructor DefaultTreeSelectionModel
+ */
+ public DefaultTreeSelectionModel()
+ {
+ // TODO
+ }
+
+ /**
+ * clone
+ * @exception CloneNotSupportedException TODO
+ * @return Object
+ */
+ public Object clone() throws CloneNotSupportedException
+ {
+ return null; // TODO
+ }
+
+ /**
+ * toString
+ * @return String
+ */
+ public String toString()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * writeObject
+ * @param value0 TODO
+ * @exception IOException TODO
+ */
+ private void writeObject(ObjectOutputStream value0) throws IOException
+ {
+ // TODO
+ }
+
+ /**
+ * readObject
+ * @param value0 TODO
+ * @exception IOException TODO
+ * @exception ClassNotFoundException TODO
+ */
+ private void readObject(ObjectInputStream value0)
+ throws IOException, ClassNotFoundException
+ {
+ // TODO
+ }
+
+ /**
+ * setRowMapper
+ * @param value0 TODO
+ */
+ public void setRowMapper(RowMapper value0)
+ {
+ // TODO
+ }
+
+ /**
+ * getRowMapper
+ * @return RowMapper
+ */
+ public RowMapper getRowMapper()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * setSelectionMode
+ * @param value0 TODO
+ */
+ public void setSelectionMode(int value0)
+ {
+ // TODO
+ }
+
+ /**
+ * getSelectionMode
+ * @return int
+ */
+ public int getSelectionMode()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * setSelectionPath
+ * @param value0 TODO
+ */
+ public void setSelectionPath(TreePath value0)
+ {
+ // TODO
+ }
+
+ /**
+ * setSelectionPaths
+ * @param value0 TODO
+ */
+ public void setSelectionPaths(TreePath[] value0)
+ {
+ // TODO
+ }
+
+ /**
+ * addSelectionPath
+ * @param value0 TODO
+ */
+ public void addSelectionPath(TreePath value0)
+ {
+ // TODO
+ }
+
+ /**
+ * addSelectionPaths
+ * @param value0 TODO
+ */
+ public void addSelectionPaths(TreePath[] value0)
+ {
+ // TODO
+ }
+
+ /**
+ * removeSelectionPath
+ * @param value0 TODO
+ */
+ public void removeSelectionPath(TreePath value0)
+ {
+ // TODO
+ }
+
+ /**
+ * removeSelectionPaths
+ * @param value0 TODO
+ */
+ public void removeSelectionPaths(TreePath[] value0)
+ {
+ // TODO
+ }
+
+ /**
+ * getSelectionPath
+ * @return TreePath
+ */
+ public TreePath getSelectionPath()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getSelectionPaths
+ * @return TreePath[]
+ */
+ public TreePath[] getSelectionPaths()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getSelectionCount
+ * @return int
+ */
+ public int getSelectionCount()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * isPathSelected
+ * @param value0 TODO
+ * @return boolean
+ */
+ public boolean isPathSelected(TreePath value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * isSelectionEmpty
+ * @return boolean
+ */
+ public boolean isSelectionEmpty()
+ {
+ return false; // TODO
+ }
+
+ /**
+ * clearSelection
+ */
+ public void clearSelection()
+ {
+ // TODO
+ }
+
+ /**
+ * Adds a <code>TreeSelectionListener</code> object to this model.
+ *
+ * @param listener the listener to add
+ */
+ public void addTreeSelectionListener(TreeSelectionListener listener)
+ {
+ listenerList.add(TreeSelectionListener.class, listener);
+ }
+
+ /**
+ * Removes a <code>TreeSelectionListener</code> object from this model.
+ *
+ * @param listener the listener to remove
+ */
+ public void removeTreeSelectionListener(TreeSelectionListener listener)
+ {
+ listenerList.remove(TreeSelectionListener.class, listener);
+ }
+
+ /**
+ * Returns all <code>TreeSelectionListener</code> added to this model.
+ *
+ * @return an array of listeners
+ *
+ * @since 1.4
+ */
+ public TreeSelectionListener[] getTreeSelectionListeners()
+ {
+ return (TreeSelectionListener[]) listenerList.getListeners(TreeSelectionListener.class);
+ }
+
+ /**
+ * fireValueChanged
+ *
+ * @param event the event to fire.
+ */
+ protected void fireValueChanged(TreeSelectionEvent event)
+ {
+ TreeSelectionListener[] listeners = getTreeSelectionListeners();
+
+ for (int i = listeners.length - 1; i >= 0; --i)
+ listeners[i].valueChanged(event);
+ }
+
+ /**
+ * Returns all added listeners of a special type.
+ *
+ * @param listenerType the listener type
+ *
+ * @return an array of listeners
+ *
+ * @since 1.3
+ */
+ public EventListener[] getListeners(Class listenerType)
+ {
+ return listenerList.getListeners(listenerType);
+ }
+
+ /**
+ * getSelectionRows
+ * @return int[]
+ */
+ public int[] getSelectionRows()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getMinSelectionRow
+ * @return int
+ */
+ public int getMinSelectionRow()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getMaxSelectionRow
+ * @return int
+ */
+ public int getMaxSelectionRow()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * isRowSelected
+ * @param value0 TODO
+ * @return boolean
+ */
+ public boolean isRowSelected(int value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * resetRowSelection
+ */
+ public void resetRowSelection()
+ {
+ // TODO
+ }
+
+ /**
+ * getLeadSelectionRow
+ * @return int
+ */
+ public int getLeadSelectionRow()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getLeadSelectionPath
+ * @return TreePath
+ */
+ public TreePath getLeadSelectionPath()
+ {
+ return null; // TODO
+ }
+
+ /**
+ * Adds a <code>PropertyChangeListener</code> object to this model.
+ *
+ * @param listener the listener to add.
+ */
+ public void addPropertyChangeListener(PropertyChangeListener listener)
+ {
+ changeSupport.addPropertyChangeListener(listener);
+ }
+
+ /**
+ * Removes a <code>PropertyChangeListener</code> object from this model.
+ *
+ * @param listener the listener to remove.
+ */
+ public void removePropertyChangeListener(PropertyChangeListener listener)
+ {
+ changeSupport.removePropertyChangeListener(listener);
+ }
+
+ /**
+ * Returns all added <code>PropertyChangeListener</code> objects.
+ *
+ * @return an array of listeners.
+ *
+ * @since 1.4
+ */
+ public PropertyChangeListener[] getPropertyChangeListeners()
+ {
+ return changeSupport.getPropertyChangeListeners();
+ }
+
+ /**
+ * insureRowContinuity
+ */
+ protected void insureRowContinuity()
+ {
+ // TODO
+ }
+
+ /**
+ * arePathsContiguous
+ * @param value0 TODO
+ * @return boolean
+ */
+ protected boolean arePathsContiguous(TreePath[] value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * canPathsBeAdded
+ * @param value0 TODO
+ * @return boolean
+ */
+ protected boolean canPathsBeAdded(TreePath[] value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * canPathsBeRemoved
+ * @param value0 TODO
+ * @return boolean
+ */
+ protected boolean canPathsBeRemoved(TreePath[] value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * notifyPathChange
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ protected void notifyPathChange(Vector value0, TreePath value1)
+ {
+ // TODO
+ }
+
+ /**
+ * updateLeadIndex
+ */
+ protected void updateLeadIndex()
+ {
+ // TODO
+ }
+
+ /**
+ * insureUniqueness
+ */
+ protected void insureUniqueness()
+ {
+ // TODO
+ }
+}
OpenPOWER on IntegriCloud