Enhancing Batik's DOMViewer
This page should help the realization of the "Enhancing the DOMViewer" project by Ivan Andjelkovic. The project is a part of the Google Summer of Code 2007 Program.
This page should be used for developing the specification for the project and reviewing the progress of implementation. I hope to collaborate with people from Batik who will help me improve the specification.
The main goal of the project is to allow better document inspection and editing of the document using Batik's DOMViewer.
The user should be able to inspect the document and track the changes through the Viewer when the document changes.
The user should be able to add, remove or edit nodes (attributes) in the document through the Viewer.
The user should be able to browse the history of the document and perform undo or redo actions.
Tracking the changes to the document
Tracking the changes on the document by using DOM Mutation Events Listeners. The Viewer should be updated whenever the document changes. The Viewer should keep it’s previous view.
Editing the document
The user should be able to add, edit or remove the nodes from the document, by using the pop - up menus registered on the DOM document tree, the panel for element editing, or the characted data panel for node editing.
Tracking the history
Keeping the changes of the document in the history should allow the user to undo and redo the changes made on the document, a single change or a custom number of actions (by using the dropdown component for that purpose). Due to memory issues, history size should be set initially to some value.
- Allowed ‘Live track’ option:
- DOM document tree (JTree) gets updated on insert/remove node events,
- Panel/attribute table gets updated on attribute modified event,
- Character panel gets updated on character data changed event,
- Is always turned on.
- Added panel for adding, editing, and previewing the element (it's xml representation):
- The element can be viewed and modified, as well as it’s sub tree (by directly editing xml),
- Support for well formed check of the xml in the panel,
- The element can be created and added to the document at a specified location,
- When the node from the tree gets selected, it’s associated element from the document is shown in the panel,
- Nodes of other types then elements can be edited using character data panel.
- Enhanced DOM document tree for browsing the document:
- Allowed multiple dnd support (nodes changing their place in the document),
- Auto scroll support,
- Visual tips for dnd (to be able to choose the exact location of nodes to be repositioned, e.g. between two tree node items),
- Added pop - up menu and items for creating new elements, removing the selected ones and inserting element templates,
Scroll & select the appropriate node in the DOM document tree when it gets inserted into document.
Created node templates (for quick add): created predefined nodes with the required attributes and their default values: e.g. <rect width=”0” height=”0”/>
- Allowed the tree selection to reflect on the canvas as well: When the node(s) from the DOM document tree get selected, the ‘overlay’ on the canvas appears to show the element being selected
- Added support for browsing the document history:
- Support for undo/redo actions (including naming of actions),
- Added the dropdown component to support undo/redo mechanism for custom number of actions,
- Added support for compound commands (such as removal of a custom number of nodes, etc).