Class DOMTreeCellRenderer

java.lang.Object
  |
  +--DOMTreeCellRenderer
All Implemented Interfaces:
javax.swing.tree.TreeCellRenderer

public class DOMTreeCellRenderer
extends java.lang.Object
implements javax.swing.tree.TreeCellRenderer

This class has as its responsibility returning a component that draws nodes of the JTree.

Version:
$2005-11-13 23:10:15 mdh$
Author:
Malcolm D. Hyman

Constructor Summary
DOMTreeCellRenderer(ContentOwner owner)
           
 
Method Summary
 void flushCache()
          Flushes the TreeCellRenderCache.
 boolean getRenderedView()
          Sets the renderedView parameter: if false, the default XML view is used; if true, docspecs rules are applied.
 java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
          Returns a component that can render the given node of the JTree.
static boolean isRightToLeft(java.lang.String text)
          Returns true if text contains any characters defined as strong right-left characters in Unicode Bidi.
 void setDocSpec(DocSpec spec)
          Sets the DocSpec.
 void setRenderedView(boolean value)
          Sets the renderedView parameter: if false, the default XML view is used; if true, docspecs rules are applied.
 void updateFont()
          Updates the font used for the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMTreeCellRenderer

public DOMTreeCellRenderer(ContentOwner owner)
Method Detail

updateFont

public void updateFont()
Updates the font used for the tree.

setDocSpec

public void setDocSpec(DocSpec spec)
Sets the DocSpec.
Parameters:
spec - DDL object

setRenderedView

public void setRenderedView(boolean value)
Sets the renderedView parameter: if false, the default XML view is used; if true, docspecs rules are applied.
Parameters:
value - value for renderedView

getRenderedView

public boolean getRenderedView()
Sets the renderedView parameter: if false, the default XML view is used; if true, docspecs rules are applied.
Returns:
value for renderedView

getTreeCellRendererComponent

public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree,
                                                       java.lang.Object value,
                                                       boolean selected,
                                                       boolean expanded,
                                                       boolean leaf,
                                                       int row,
                                                       boolean hasFocus)
Returns a component that can render the given node of the JTree.
Specified by:
getTreeCellRendererComponent in interface javax.swing.tree.TreeCellRenderer

isRightToLeft

public static boolean isRightToLeft(java.lang.String text)
Returns true if text contains any characters defined as strong right-left characters in Unicode Bidi.
Parameters:
text - text to test for directionality

flushCache

public void flushCache()
Flushes the TreeCellRenderCache.