org.xulux.guilayer.swing.models
Class SwingTreeModel
java.lang.Object
org.xulux.dataprovider.contenthandlers.ContentHandlerAbstract
org.xulux.dataprovider.contenthandlers.TreeContentHandler
org.xulux.guilayer.swing.models.SwingTreeModel
- All Implemented Interfaces:
- javax.swing.tree.TreeModel, org.xulux.api.dataprovider.IContentHandler
public class SwingTreeModel
- extends org.xulux.dataprovider.contenthandlers.TreeContentHandler
- implements javax.swing.tree.TreeModel
A cutom tree root, so we can do magic of our own
- Version:
- $Id: SwingTreeModel.java,v 1.1 2005/12/18 12:58:21 mvdb Exp $
- Author:
- Martin van den Bemt
Fields inherited from class org.xulux.dataprovider.contenthandlers.TreeContentHandler |
widget |
Fields inherited from class org.xulux.dataprovider.contenthandlers.ContentHandlerAbstract |
content, log, view |
Constructor Summary |
SwingTreeModel(org.xulux.dataprovider.contenthandlers.TreeContentHandler contentHandler)
|
Methods inherited from class org.xulux.dataprovider.contenthandlers.TreeContentHandler |
getContent, getWidget, setWidget |
Methods inherited from class org.xulux.dataprovider.contenthandlers.ContentHandlerAbstract |
getViewClass, setContent, setView |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwingTreeModel
public SwingTreeModel(org.xulux.dataprovider.contenthandlers.TreeContentHandler contentHandler)
- Parameters:
contentHandler
- the tree contentHandler to use..
addTreeModelListener
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
- Specified by:
addTreeModelListener
in interface javax.swing.tree.TreeModel
- See Also:
TreeModel.addTreeModelListener(javax.swing.event.TreeModelListener)
getChild
public java.lang.Object getChild(java.lang.Object parent,
int index)
- Specified by:
getChild
in interface javax.swing.tree.TreeModel
- Specified by:
getChild
in class org.xulux.dataprovider.contenthandlers.TreeContentHandler
- See Also:
TreeModel.getChild(java.lang.Object, int)
getChildCount
public int getChildCount(java.lang.Object parent)
- Specified by:
getChildCount
in interface javax.swing.tree.TreeModel
- Specified by:
getChildCount
in class org.xulux.dataprovider.contenthandlers.TreeContentHandler
- See Also:
TreeModel.getChildCount(java.lang.Object)
getIndexOfChild
public int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
- Specified by:
getIndexOfChild
in interface javax.swing.tree.TreeModel
- Specified by:
getIndexOfChild
in class org.xulux.dataprovider.contenthandlers.TreeContentHandler
- See Also:
TreeModel.getIndexOfChild(java.lang.Object, java.lang.Object)
getRoot
public java.lang.Object getRoot()
- Specified by:
getRoot
in interface javax.swing.tree.TreeModel
- Specified by:
getRoot
in class org.xulux.dataprovider.contenthandlers.TreeContentHandler
- See Also:
TreeModel.getRoot()
isLeaf
public boolean isLeaf(java.lang.Object node)
- Specified by:
isLeaf
in interface javax.swing.tree.TreeModel
- Specified by:
isLeaf
in class org.xulux.dataprovider.contenthandlers.TreeContentHandler
- See Also:
TreeModel.isLeaf(java.lang.Object)
removeTreeModelListener
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
- Specified by:
removeTreeModelListener
in interface javax.swing.tree.TreeModel
- See Also:
TreeModel.removeTreeModelListener(javax.swing.event.TreeModelListener)
getTreePath
public javax.swing.tree.TreePath getTreePath(java.lang.Object value)
- Parameters:
value
- the value to find the treepath for
- Returns:
- the treepath or null if the value is not found in the content.
valueForPathChanged
public void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
- Specified by:
valueForPathChanged
in interface javax.swing.tree.TreeModel
- See Also:
TreeModel.valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object)
getType
public java.lang.Class getType()
- Specified by:
getType
in interface org.xulux.api.dataprovider.IContentHandler
- Specified by:
getType
in class org.xulux.dataprovider.contenthandlers.ContentHandlerAbstract
- See Also:
org.xulux.nyx.global.IContentHandler#getType()
refresh
public void refresh()
- Specified by:
refresh
in interface org.xulux.api.dataprovider.IContentHandler
- Overrides:
refresh
in class org.xulux.dataprovider.contenthandlers.ContentHandlerAbstract
- See Also:
org.xulux.nyx.global.contenthandlers.TreeContentHandler#refresh()
getInnerContentHandler
public org.xulux.api.dataprovider.IContentHandler getInnerContentHandler()
- Returns:
- the embedded contenthandler.
Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.