NXvalidate  1
 All Classes Namespaces Files Functions Variables
Public Member Functions | Protected Member Functions
org.nexusformat.nxvalidate.XMLTreeRenderer Class Reference

We need to modify the tree representing the reduced document when nodes are found to be bad (validation fails on them). More...

Inheritance diagram for org.nexusformat.nxvalidate.XMLTreeRenderer:
Inheritance graph
Collaboration diagram for org.nexusformat.nxvalidate.XMLTreeRenderer:
Collaboration graph

List of all members.

Public Member Functions

 XMLTreeRenderer (String rootPath, String badPath, String goodPath, String warnPath, String newPath, String infoPath, String infoGoodPath, String infoBadPath, String infoWarnPath)
 Setup a tree renderer with custom icons.
Component getTreeCellRendererComponent (JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
void setExpandedIcon (Icon expanded)
 sets the icon for the handle of an expanded node.
void setCollapsedIcon (Icon collapsed)
 sets the icon for the handel of a collapsed node.

Protected Member Functions

ImageIcon createImageIcon (String path, String description)
 Returns an ImageIcon, or null if the path was invalid.

Detailed Description

We need to modify the tree representing the reduced document when nodes are found to be bad (validation fails on them).

the bad nodes are marked with a red cross icon and a tool tip is added to the node.

Author:
Stephen Rankin

Definition at line 43 of file XMLTreeRenderer.java.


Constructor & Destructor Documentation

org.nexusformat.nxvalidate.XMLTreeRenderer.XMLTreeRenderer ( String  rootPath,
String  badPath,
String  goodPath,
String  warnPath,
String  newPath,
String  infoPath,
String  infoGoodPath,
String  infoBadPath,
String  infoWarnPath 
)

Setup a tree renderer with custom icons.

Parameters:
paththe relative path to the image icon.

Definition at line 61 of file XMLTreeRenderer.java.


Member Function Documentation

ImageIcon org.nexusformat.nxvalidate.XMLTreeRenderer.createImageIcon ( String  path,
String  description 
)
protected

Returns an ImageIcon, or null if the path was invalid.

Definition at line 177 of file XMLTreeRenderer.java.

Referenced by org.nexusformat.nxvalidate.XMLTreeRenderer.getTreeCellRendererComponent().

Component org.nexusformat.nxvalidate.XMLTreeRenderer.getTreeCellRendererComponent ( JTree  tree,
Object  value,
boolean  sel,
boolean  expanded,
boolean  leaf,
int  row,
boolean  hasFocus 
)
void org.nexusformat.nxvalidate.XMLTreeRenderer.setCollapsedIcon ( Icon  collapsed)

sets the icon for the handel of a collapsed node.

Note: this will only succeed if the current ui delegate is a BasicTreeUI otherwise it will do nothing.

Parameters:
collapsed

Definition at line 170 of file XMLTreeRenderer.java.

void org.nexusformat.nxvalidate.XMLTreeRenderer.setExpandedIcon ( Icon  expanded)

sets the icon for the handle of an expanded node.

Note: this will only succeed if the current ui delegate is a BasicTreeUI otherwise it will do nothing.

Parameters:
expanded

Definition at line 156 of file XMLTreeRenderer.java.


The documentation for this class was generated from the following file: