org.apache.batik.apps.svgbrowser
public class DOMViewer extends JFrame implements ActionMap
Nested Class Summary | |
---|---|
protected class | DOMViewer.CapturingClickButtonAction
The action associated with the 'Capturing-click' toggle button of the
viewer panel. |
protected class | DOMViewer.CloseButtonAction
The action associated with the 'Close' button of the viewer panel |
protected static class | DOMViewer.ContentNodeInfo
To store the node information for an xbl:content node's
selected content. |
protected class | DOMViewer.DOMViewerDOMDocumentTreeController
DOMDocumentTreeController implementation. |
protected class | DOMViewer.DOMViewerElementOverlayController
ElementOverlayController implementation. |
protected class | DOMViewer.DOMViewerNodePickerController
NodePickerController implementation. |
protected static class | DOMViewer.NodeInfo
To store the nodes informations |
protected class | DOMViewer.OverlayButtonAction
The action associated with the 'overlay' toggle button of the viewer
panel. |
class | DOMViewer.Panel
The panel that contains the viewer. |
protected class | DOMViewer.RedoButtonAction
The action associated with the 'Redo' dropdown button of the viewer panel |
protected static class | DOMViewer.ShadowNodeInfo
To store the node information for a shadow tree. |
protected class | DOMViewer.UndoButtonAction
The action associated with the 'Undo' dropdown button of the viewer panel |
Field Summary | |
---|---|
protected static ResourceBundle | bundle
The resource bundle |
protected ButtonFactory | buttonFactory
The button factory. |
protected boolean | canEdit
Whether the DOMViewer can be used for editing the document. |
protected DOMViewerController | domViewerController
The DOMViewer controller. |
protected ElementOverlayManager | elementOverlayManager
Manages the element selection on the canvas. |
protected HistoryBrowserInterface | historyBrowserInterface
The history browsing manager. |
protected boolean | isCapturingClickEnabled
Whether "capturing click" tool is enabled. |
protected boolean | isElementOverlayEnabled
Whether painting the overlay on the canvas is enabled. |
protected Map | listeners
The map that contains the listeners |
protected JToggleButton | overlayButton
The button for enabling and disabling the overlay. |
protected DOMViewer.Panel | panel
The panel. |
protected static ResourceManager | resources
The resource manager |
protected static String | RESOURCE
The resource file name |
protected boolean | showWhitespace
Whether to show text nodes that contain only whitespace in the tree. |
Constructor Summary | |
---|---|
DOMViewer(DOMViewerController controller)
Creates a new DOMViewer panel. |
Method Summary | |
---|---|
boolean | canEdit()
Whether the document can be edited using the DOMViewer.
|
Action | getAction(String key)
Returns the action associated with the given string or null on error
|
void | resetHistory()
Resets the history. |
void | selectNode(Node node)
Selects and scrolls to the given node in the document tree.
|
void | setDocument(Document doc)
Sets the document to display. |
void | setDocument(Document doc, ViewCSS view)
Sets the document to display and its ViewCSS. |
void | setEditable(boolean canEdit)
Enables / disables the DOMViewer to be used to edit the documents.
|
void | setShowWhitespace(boolean state)
Sets whether to show text nodes that contain only whitespace in the tree. |
protected void | toggleOverlay()
Toggles the element highlighting overlay. |
Returns: True if the document can be edited throught the DOMViewer
Parameters: key the key mapped with the action to get
Throws: MissingListenerException if the action is not found
Parameters: node The node to be selected
Parameters: canEdit True - The DOMViewer can be used to edit the documents