org.jhotdraw.gui.fontchooser
Class FontCollectionNode
java.lang.Object
org.jhotdraw.gui.fontchooser.FontCollectionNode
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable<FontCollectionNode>, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
public class FontCollectionNode
- extends java.lang.Object
- implements javax.swing.tree.MutableTreeNode, java.lang.Comparable<FontCollectionNode>, java.lang.Cloneable
A FontCollectionNode is a MutableTreeNode which only allows FontFamilyNode
as child nodes.
- Author:
- Werner Randelshofer
@version $Id: FontCollectionNode.java 647 2010-01-24 22:52:59Z rawcoder $
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FontCollectionNode
public FontCollectionNode(java.lang.String name)
FontCollectionNode
public FontCollectionNode(java.lang.String name,
java.util.ArrayList<FontFamilyNode> families)
compareTo
public int compareTo(FontCollectionNode that)
- Specified by:
compareTo
in interface java.lang.Comparable<FontCollectionNode>
getName
public java.lang.String getName()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
clone
public FontCollectionNode clone()
- Overrides:
clone
in class java.lang.Object
add
public void add(FontFamilyNode newChild)
addAll
public void addAll(java.util.Collection<FontFamilyNode> c)
insert
public void insert(javax.swing.tree.MutableTreeNode newChild,
int index)
- Specified by:
insert
in interface javax.swing.tree.MutableTreeNode
remove
public void remove(int childIndex)
- Specified by:
remove
in interface javax.swing.tree.MutableTreeNode
remove
public void remove(javax.swing.tree.MutableTreeNode aChild)
- Specified by:
remove
in interface javax.swing.tree.MutableTreeNode
setUserObject
public void setUserObject(java.lang.Object object)
- Specified by:
setUserObject
in interface javax.swing.tree.MutableTreeNode
removeFromParent
public void removeFromParent()
- Specified by:
removeFromParent
in interface javax.swing.tree.MutableTreeNode
setParent
public void setParent(javax.swing.tree.MutableTreeNode newParent)
- Specified by:
setParent
in interface javax.swing.tree.MutableTreeNode
getChildAt
public FontFamilyNode getChildAt(int childIndex)
- Specified by:
getChildAt
in interface javax.swing.tree.TreeNode
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interface javax.swing.tree.TreeNode
getParent
public javax.swing.tree.MutableTreeNode getParent()
- Specified by:
getParent
in interface javax.swing.tree.TreeNode
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndex
in interface javax.swing.tree.TreeNode
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interface javax.swing.tree.TreeNode
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interface javax.swing.tree.TreeNode
children
public java.util.Enumeration children()
- Specified by:
children
in interface javax.swing.tree.TreeNode
families
public java.util.List<FontFamilyNode> families()
isNodeChild
public boolean isNodeChild(javax.swing.tree.TreeNode aNode)
- Returns true if
aNode
is a child of this node. If
aNode
is null, this method returns false.
- Returns:
- true if
aNode
is a child of this node; false if
aNode
is null
isEditable
public boolean isEditable()
setEditable
public void setEditable(boolean newValue)