Design and Implementation of the JGraph Swing Component


Table of Contents

1. Introduction
1.1. Overview
1.1.1. Graph Theory
1.1.2. Swing
1.2. Decomposing JGraph
1.3. Sources and Literature
2. The JGraph Component
2.1. Foundation
2.1.1. Overlapping Cells
2.1.2. Multiple Cell Types
2.1.3. Separate Geometry
2.2. Features
2.2.1. Inheritance
2.2.2. Modification
2.2.3. Extension
2.2.4. Enhancement
2.2.5. Implementation
2.3. JGraph MVC
2.4. Startup
2.5. Attributes
2.5.1. GraphConstants
2.5.2. The Value Attribute
2.5.3. ValueChangeHandler Interface
2.5.4. Attributes and Instance Fields
2.6. Cloning
2.7. Zoom and Grid
3. Model
3.1. Grouping
3.2. Graph Cells
3.2.1. GraphCell Interface Hierarchy
3.2.2. GraphCell Default Implementations
3.3. Graph Model
3.3.1. GraphModel Interface
3.3.2. GraphModel Default Implementation
3.4. Changing the Model
3.4.1. Nested Maps
3.4.2. ConnectionSet
3.4.3. ParentMap
3.4.4. Inserting Cells
3.4.5. Removing cells
3.4.6. Changing Cells
3.5. Selection Model
3.5.1. Stepping-Into Groups
4. View
4.1. Graph Layout Cache
4.2. Cell Mapper
4.3. CellView Factory
4.4. Cell Views
4.4.1. CellView Interface
4.4.2. CellView Default Implementations
4.5. Changing the View
4.6. Graph Context
4.6.1. Construction
4.6.2. Temporary Views
5. Control
5.1. UI-Delegate
5.1.1. GraphUI Interface
5.1.2. GraphUI Default Implementation
5.2. Renderers
5.2.1. CellViewRenderer Interface
5.2.2. CellViewRenderer Default Implementations
5.3. Editors
5.4. Cell Handles
5.4.1. Live-Preview
5.4.2. CellHandle Interface
5.4.3. CellHandle Default Implementations
5.5. GraphTransferable
5.6. Marquee Selection
5.7. Event Model
5.7.1. Change Notification
5.7.2. Undo-support
5.7.3. Undo-support Relay
5.7.4. GraphUndoManager
6. Conclusions
6.1. Cells and Components
6.2. CompositeChanges
6.3. Scalability
7. Appendix
7.1. Model-View-Control (MVC)
7.2. Swing
7.2.1. Swing MVC
7.2.2. MVC and Text Components
7.2.3. JGraph MVC
7.2.4. Serialization
7.2.5. Datatransfer
7.3. Packages
7.4. Class Index
7.5. UML Reference
References

Abstract

Today's user interface (UI) libraries offer components for lists, tables, and trees, but graph components are rarely implemented. JGraph provides a fully standards-compliant graph component for the Java Swing UI library that supports extended display and editing options.

This paper provides a description of the JGraph component. The document is structured into modules, and illustrated using UML and other diagrams. The study will outline JGraph's design and implementation with focus on Swing compatibility, and explain where it was necessary to extend Swing design.

The target readers are practitioners who need a definition of JGraph's architecture. The document provides an in-depth discussion of the component's design and implementation, and thoroughly explains the ideas and concepts behind the architecture.