org.apache.batik.util.gui

Class DOMViewer

public class DOMViewer extends JFrame implements ActionMap

The components of this class are used to view a DOM tree.
Nested Class Summary
protected classDOMViewer.CloseButtonAction
The action associated with the 'Close' button of the viewer panel
protected static classDOMViewer.ContentNodeInfo
To store the node information for an xbl:content node's selected content.
protected static classDOMViewer.NodeInfo
To store the nodes informations
classDOMViewer.Panel
The panel that contains the viewer.
protected static classDOMViewer.ShadowNodeInfo
To store the node information for a shadow tree.
Field Summary
protected static ResourceBundlebundle
The resource bundle
protected Maplisteners
The map that contains the listeners
protected DOMViewer.Panelpanel
The panel.
protected static ResourceManagerresources
The resource manager
protected static StringRESOURCE
The resource file name
protected booleanshowWhitespace
Whether to show text nodes that contain only whitespace in the tree.
Constructor Summary
DOMViewer()
Creates a new DOMViewer panel.
Method Summary
ActiongetAction(String key)
Returns the action associated with the given string or null on error
voidsetDocument(Document doc)
Sets the document to display.
voidsetDocument(Document doc, ViewCSS view)
Sets the document to display and its ViewCSS.
voidsetShowWhitespace(boolean state)
Sets whether to show text nodes that contain only whitespace in the tree.

Field Detail

bundle

protected static ResourceBundle bundle
The resource bundle

listeners

protected Map listeners
The map that contains the listeners

panel

protected DOMViewer.Panel panel
The panel.

resources

protected static ResourceManager resources
The resource manager

RESOURCE

protected static final String RESOURCE
The resource file name

showWhitespace

protected boolean showWhitespace
Whether to show text nodes that contain only whitespace in the tree.

Constructor Detail

DOMViewer

public DOMViewer()
Creates a new DOMViewer panel.

Method Detail

getAction

public Action getAction(String key)
Returns the action associated with the given string or null on error

Parameters: key the key mapped with the action to get

Throws: MissingListenerException if the action is not found

setDocument

public void setDocument(Document doc)
Sets the document to display.

setDocument

public void setDocument(Document doc, ViewCSS view)
Sets the document to display and its ViewCSS.

setShowWhitespace

public void setShowWhitespace(boolean state)
Sets whether to show text nodes that contain only whitespace in the tree.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.