JHotDraw 7.4.1

org.jhotdraw.gui.fontchooser
Class FontFaceNode

java.lang.Object
  extended by org.jhotdraw.gui.fontchooser.FontFaceNode
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<FontFaceNode>, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class FontFaceNode
extends java.lang.Object
implements javax.swing.tree.MutableTreeNode, java.lang.Comparable<FontFaceNode>, java.lang.Cloneable

A FontFaceNode is a MutableTreeNode which does not allow children.

Author:
Werner Randelshofer  @version $Id: FontFaceNode.java 527 2009-06-07 14:28:19Z rawcoder $

Constructor Summary
FontFaceNode(java.awt.Font typeface)
           
 
Method Summary
protected  java.lang.String beautifyName(java.lang.String name)
           
 java.util.Enumeration children()
           
 FontFaceNode clone()
           
 int compareTo(FontFaceNode that)
           
 boolean getAllowsChildren()
           
 javax.swing.tree.TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 java.awt.Font getFont()
           
 int getIndex(javax.swing.tree.TreeNode node)
           
 java.lang.String getName()
           
 javax.swing.tree.TreeNode getParent()
           
 void insert(javax.swing.tree.MutableTreeNode child, int index)
           
 boolean isEditable()
           
 boolean isLeaf()
           
 void remove(int index)
           
 void remove(javax.swing.tree.MutableTreeNode node)
           
 void removeFromParent()
           
 void setName(java.lang.String newValue)
           
 void setParent(javax.swing.tree.MutableTreeNode newParent)
           
 void setUserObject(java.lang.Object object)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FontFaceNode

public FontFaceNode(java.awt.Font typeface)
Method Detail

beautifyName

protected java.lang.String beautifyName(java.lang.String name)

setName

public void setName(java.lang.String newValue)

getName

public java.lang.String getName()

getFont

public java.awt.Font getFont()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

insert

public void insert(javax.swing.tree.MutableTreeNode child,
                   int index)
Specified by:
insert in interface javax.swing.tree.MutableTreeNode

remove

public void remove(int index)
Specified by:
remove in interface javax.swing.tree.MutableTreeNode

remove

public void remove(javax.swing.tree.MutableTreeNode node)
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 javax.swing.tree.TreeNode 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.TreeNode 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

compareTo

public int compareTo(FontFaceNode that)
Specified by:
compareTo in interface java.lang.Comparable<FontFaceNode>

clone

public FontFaceNode clone()
Overrides:
clone in class java.lang.Object

isEditable

public boolean isEditable()

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.