1 /* AbstractLayoutCache.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. */
38 package javax
.swing
.tree
;
43 import javax
.swing
.event
.*;
47 * @author Andrew Selkirk
49 public abstract class AbstractLayoutCache
implements RowMapper
{
51 //-------------------------------------------------------------
52 // Classes ----------------------------------------------------
53 //-------------------------------------------------------------
58 public abstract static class NodeDimensions
{
60 //-------------------------------------------------------------
61 // Initialization ---------------------------------------------
62 //-------------------------------------------------------------
65 * Constructor NodeDimensions
67 public NodeDimensions() {
72 //-------------------------------------------------------------
73 // Methods ----------------------------------------------------
74 //-------------------------------------------------------------
85 public abstract Rectangle
getNodeDimensions(Object value0
, int value1
, int value2
, boolean value3
, Rectangle value4
);
91 //-------------------------------------------------------------
92 // Variables --------------------------------------------------
93 //-------------------------------------------------------------
98 protected NodeDimensions nodeDimensions
;
103 protected TreeModel treeModel
;
108 protected TreeSelectionModel treeSelectionModel
;
113 protected boolean rootVisible
;
118 protected int rowHeight
;
121 //-------------------------------------------------------------
122 // Initialization ---------------------------------------------
123 //-------------------------------------------------------------
126 * Constructor AbstractLayoutCache
128 public AbstractLayoutCache() {
130 } // AbstractLayoutCache()
133 //-------------------------------------------------------------
134 // Methods ----------------------------------------------------
135 //-------------------------------------------------------------
141 public void setNodeDimensions(NodeDimensions value0
) {
143 } // setNodeDimensions()
147 * @returns NodeDimensions
149 public NodeDimensions
getNodeDimensions() {
151 } // getNodeDimensions()
162 protected Rectangle
getNodeDimensions(Object value0
, int value1
, int value2
, boolean value3
, Rectangle value4
) {
164 } // getNodeDimensions()
170 public void setModel(TreeModel value0
) {
178 public TreeModel
getModel() {
186 public void setRootVisible(boolean value0
) {
188 } // setRootVisible()
194 public boolean isRootVisible() {
195 return false; // TODO
202 public void setRowHeight(int value0
) {
210 public int getRowHeight() {
218 public void setSelectionModel(TreeSelectionModel value0
) {
220 } // setSelectionModel()
224 * @returns TreeSelectionModel
226 public TreeSelectionModel
getSelectionModel() {
228 } // getSelectionModel()
234 public int getPreferredHeight() {
236 } // getPreferredHeight()
243 public int getPreferredWidth(Rectangle value0
) {
245 } // getPreferredWidth()
252 public abstract boolean isExpanded(TreePath value0
);
260 public abstract Rectangle
getBounds(TreePath value0
, Rectangle value1
);
267 public abstract TreePath
getPathForRow(int value0
);
274 public abstract int getRowForPath(TreePath value0
);
282 public abstract TreePath
getPathClosestTo(int value0
, int value1
);
285 * getVisiblePathsFrom
287 * @returns Enumeration
289 public abstract Enumeration
getVisiblePathsFrom(TreePath value0
);
292 * getVisibleChildCount
296 public abstract int getVisibleChildCount(TreePath value0
);
303 public abstract void setExpandedState(TreePath value0
, boolean value1
);
310 public abstract boolean getExpandedState(TreePath value0
);
316 public abstract int getRowCount();
321 public abstract void invalidateSizes();
324 * invalidatePathBounds
327 public abstract void invalidatePathBounds(TreePath value0
);
333 public abstract void treeNodesChanged(TreeModelEvent value0
);
339 public abstract void treeNodesInserted(TreeModelEvent value0
);
345 public abstract void treeNodesRemoved(TreeModelEvent value0
);
348 * treeStructureChanged
351 public abstract void treeStructureChanged(TreeModelEvent value0
);
358 public int[] getRowsForPaths(TreePath
[] value0
) {
360 } // getRowsForPaths()
366 protected boolean isFixedRowHeight() {
367 return false; // TODO
368 } // isFixedRowHeight()
371 } // AbstractLayoutCache