javax.swing.tree

Class AbstractLayoutCache

Implemented Interfaces:
RowMapper
Known Direct Subclasses:
FixedHeightLayoutCache, VariableHeightLayoutCache

public abstract class AbstractLayoutCache
extends Object
implements RowMapper

class AbstractLayoutCache

Nested Class Summary

static class
AbstractLayoutCache.NodeDimensions
class NodeDimensions

Field Summary

protected AbstractLayoutCache.NodeDimensions
nodeDimensions
nodeDimensions
protected boolean
rootVisible
rootVisible
protected int
rowHeight
rowHeight
protected TreeModel
treeModel
treeModel
protected TreeSelectionModel
treeSelectionModel
treeSelectionModel

Constructor Summary

AbstractLayoutCache()
Constructor AbstractLayoutCache

Method Summary

Rectangle
getBounds(TreePath value0, Rectangle value1)
getBounds
boolean
getExpandedState(TreePath path)
getExpandedState
TreeModel
getModel()
Returns the model that provides the tree data.
AbstractLayoutCache.NodeDimensions
getNodeDimensions()
getNodeDimensions
protected Rectangle
getNodeDimensions(Object value, int row, int depth, boolean expanded, Rectangle bounds)
getNodeDimensions
TreePath
getPathClosestTo(int value0, int value1)
getPathClosestTo
TreePath
getPathForRow(int row)
getPathForRow
int
getPreferredHeight()
getPreferredHeight
int
getPreferredWidth(Rectangle value0)
getPreferredWidth
int
getRowCount()
getRowCount
int
getRowForPath(TreePath path)
getRowForPath
int
getRowHeight()
getRowHeight
int[]
getRowsForPaths(TreePath paths)
getRowsForPaths
TreeSelectionModel
getSelectionModel()
getSelectionModel
int
getVisibleChildCount(TreePath value0)
getVisibleChildCount
Enumeration
getVisiblePathsFrom(TreePath path)
getVisiblePathsFrom
void
invalidatePathBounds(TreePath path)
invalidatePathBounds
void
invalidateSizes()
invalidateSizes
boolean
isExpanded(TreePath value0)
isExpanded
protected boolean
isFixedRowHeight()
isFixedRowHeight
boolean
isRootVisible()
isRootVisible
void
setExpandedState(TreePath value0, boolean value1)
setExpandedState
void
setModel(TreeModel model)
Sets the model that provides the tree data.
void
setNodeDimensions(AbstractLayoutCache.NodeDimensions dimensions)
setNodeDimensions
void
setRootVisible(boolean visible)
setRootVisible
void
setRowHeight(int height)
setRowHeight
void
setSelectionModel(TreeSelectionModel model)
setSelectionModel
void
treeNodesChanged(TreeModelEvent event)
treeNodesChanged
void
treeNodesInserted(TreeModelEvent event)
treeNodesInserted
void
treeNodesRemoved(TreeModelEvent event)
treeNodesRemoved
void
treeStructureChanged(TreeModelEvent event)
treeStructureChanged

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

nodeDimensions

protected AbstractLayoutCache.NodeDimensions nodeDimensions
nodeDimensions


rootVisible

protected boolean rootVisible
rootVisible


rowHeight

protected int rowHeight
rowHeight


treeModel

protected TreeModel treeModel
treeModel


treeSelectionModel

protected TreeSelectionModel treeSelectionModel
treeSelectionModel

Constructor Details

AbstractLayoutCache

public AbstractLayoutCache()
Constructor AbstractLayoutCache

Method Details

getBounds

public Rectangle getBounds(TreePath value0,
                           Rectangle value1)
getBounds

Parameters:
value0 - TODO
value1 - TODO

Returns:
Rectangle


getExpandedState

public boolean getExpandedState(TreePath path)
getExpandedState

Parameters:
path - the tree path

Returns:
boolean


getModel

public TreeModel getModel()
Returns the model that provides the tree data.

Returns:
the model


getNodeDimensions

public AbstractLayoutCache.NodeDimensions getNodeDimensions()
getNodeDimensions

Returns:
NodeDimensions


getNodeDimensions

protected Rectangle getNodeDimensions(Object value,
                                      int row,
                                      int depth,
                                      boolean expanded,
                                      Rectangle bounds)
getNodeDimensions

Parameters:

Returns:
Rectangle


getPathClosestTo

public TreePath getPathClosestTo(int value0,
                                 int value1)
getPathClosestTo

Parameters:
value0 - TODO
value1 - TODO

Returns:
the tree path


getPathForRow

public TreePath getPathForRow(int row)
getPathForRow

Parameters:
row - the row

Returns:
the tree path


getPreferredHeight

public int getPreferredHeight()
getPreferredHeight

Returns:
int


getPreferredWidth

public int getPreferredWidth(Rectangle value0)
getPreferredWidth

Parameters:
value0 - TODO

Returns:
int


getRowCount

public int getRowCount()
getRowCount

Returns:
the number of rows


getRowForPath

public int getRowForPath(TreePath path)
getRowForPath

Parameters:
path - the tree path

Returns:
the row


getRowHeight

public int getRowHeight()
getRowHeight

Returns:
the row height


getRowsForPaths

public int[] getRowsForPaths(TreePath paths)
getRowsForPaths
Specified by:
getRowsForPaths in interface RowMapper

Parameters:
paths - the tree paths

Returns:
an array of rows


getSelectionModel

public TreeSelectionModel getSelectionModel()
getSelectionModel

Returns:
the model


getVisibleChildCount

public int getVisibleChildCount(TreePath value0)
getVisibleChildCount

Parameters:

Returns:
int


getVisiblePathsFrom

public Enumeration getVisiblePathsFrom(TreePath path)
getVisiblePathsFrom

Parameters:
path - the tree path

Returns:
Enumeration


invalidatePathBounds

public void invalidatePathBounds(TreePath path)
invalidatePathBounds

Parameters:
path - the tree path


invalidateSizes

public void invalidateSizes()
invalidateSizes


isExpanded

public boolean isExpanded(TreePath value0)
isExpanded

Parameters:
value0 - TODO

Returns:
boolean


isFixedRowHeight

protected boolean isFixedRowHeight()
isFixedRowHeight

Returns:
boolean


isRootVisible

public boolean isRootVisible()
isRootVisible

Returns:
true if root is visible, false otherwise


setExpandedState

public void setExpandedState(TreePath value0,
                             boolean value1)
setExpandedState

Parameters:
value0 - TODO
value1 - TODO


setModel

public void setModel(TreeModel model)
Sets the model that provides the tree data.

Parameters:


setNodeDimensions

public void setNodeDimensions(AbstractLayoutCache.NodeDimensions dimensions)
setNodeDimensions

Parameters:
dimensions - TODO


setRootVisible

public void setRootVisible(boolean visible)
setRootVisible

Parameters:
visible - true if root should be visible, false otherwise


setRowHeight

public void setRowHeight(int height)
setRowHeight

Parameters:
height - the row height


setSelectionModel

public void setSelectionModel(TreeSelectionModel model)
setSelectionModel

Parameters:
model - the model


treeNodesChanged

public void treeNodesChanged(TreeModelEvent event)
treeNodesChanged

Parameters:
event - the event to send


treeNodesInserted

public void treeNodesInserted(TreeModelEvent event)
treeNodesInserted

Parameters:
event - the event to send


treeNodesRemoved

public void treeNodesRemoved(TreeModelEvent event)
treeNodesRemoved

Parameters:
event - the event to send


treeStructureChanged

public void treeStructureChanged(TreeModelEvent event)
treeStructureChanged

Parameters:
event - the event to send


AbstractLayoutCache.java -- Copyright (C) 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.