yFiles for Java Developer's Guide

Search the Developer's Guide

Legal Notice

Table of Contents

Changes From Previous Edition
Developer's Guide Enhancements
New Features of yFiles 2.13
1. Preface
Diagrams
Benefits and Problems
From Diagrams to Graphs
Graph-related Problems
About yFiles
What it is
What it's not
Application Domains
2. Introducing the yFiles Library
yFiles Library Components
yFiles Basic
yFiles Viewer
yFiles Layout
How to Read this Developer's Guide
First-Time Users
Experienced Users
Where to Find Things in yFiles
Putting it all Together: yEd Lite
3. General Concepts in yFiles
Basic Graph Structure
Clear Responsibilities
Accessing Graph Elements
Storing Elements
Binding Data to Graph Elements
A Word on Subclassing Graph Elements
4. Working with the Graph Structure
Creating Graphs and Graph Elements
Graph Structure Functionality
More About Class Graph
Graph Elements
Class Node
Class Edge
Complexity
Advanced Topics
Hiding Graph Elements
Copying a Graph
Events and Listeners
Structural Changes
Iteration Mechanisms
Iteration and Element Removal
Alternative Iteration Techniques
Containers
High-Level Features
Low-Level Features
Binding Data to Graph Elements
Maps and Data Providers
Default Map Implementations
Creating Customized Data Accessors
Notes
Analyzing Graphs
Quickly Checking for Graph Characteristics
Advanced Graph Characteristics
Breadth-First Search
Depth-First Search
Graph Connectivity
Shortest Paths
Centrality Measures
Spanning Trees
Transitivity
Trees
5. Automatic Graph Layout
Layout Algorithms
Advanced Layout Concepts
Layout Architecture
Graph Structure Enhancements
Positional and Dimensional Information
Advanced Topics
Copying a LayoutGraph
Layout Infrastructure
Concepts
The Layout Stages Concept
Default Compound Layout Process
Using Buffered Layout
Class BufferedLayouter
Providing Supplemental Layout Data
Abort Mechanism for Layout Calculations
Multi-threading Support
Advanced Layout Concepts
Grouped Graphs
Setup for Layout
Tutorial Demo Code
Port Constraints
Setup for Layout
Tutorial Demo Code
Port Candidates
Matching Port Candidates
Setup for Layout
Tutorial Demo Code
Modeling Enhanced Port Constraints Using Port Candidates
Setup for Routing
Edge/Port Grouping (Bus-Style Edge Routing)
Setup for Layout
Partition Grid
Setup for Layout
Node Halos
Edge Bundling
Incremental Layout
Use Cases
Related Concepts
Layout Stages
Tutorial Demo Code
Class ComponentLayouter
Supplemental Layout Data
Layout Options
Advanced Layout Techniques
Class GraphLayoutLineWrapper
Layout Options
Major Layout Algorithms
Circular Layout
Hierarchical Layout
Organic Layout
Orthogonal Layout
Tree Layout
Radial Layout
Series-parallel Layout
Domain-Specific Layout Algorithms
Family Tree Layout
Supplemental Layout Data
Layout Options
Tutorial Demo Code
Circular Layout
Supplemental Layout Data
Layout Options
Layout Style
Returning Circle Indices
Partition Arrangement Options
Tree Arrangement Options
Label Handling
Node Label Awareness
Node Halos
Edge Bundling
Related Classes
Tutorial Demo Code
Configuration Hints
Compact Layout
Hierarchical Layout Style
About the Style
Terminology
Application Areas
Relevant Classes
Class IncrementalHierarchicLayouter
Layout Options
Drawing Style Options
Non-incremental Layout Mode
Layer Assignment Options
Node Order Options
Incremental Layout Mode
Use Cases
Specifying Hints
Constrained Layer Assignment
Constrained Node Sequencing
Grid Placement
Emphasizing Critical Paths
Advanced Layout Concepts
Integrated Labeling
Node Label Awareness
Port Constraints
Port Candidates
Edge/Port Grouping (Bus-style Edge Routing)
Node Halos
Layout of Grouped Graphs
Related Classes
Class SimplexNodePlacer
Applicable Layout Stages
Swimlane Layout
Tutorial Demo Code
Supplemental Layout Data
Related Layout Algorithms
Organic Layout Style
About the Style
Application Areas
Relevant Classes
Class SmartOrganicLayouter
Drawing Style Options
Algorithm Execution Options
Incremental Layout
Layout of Grouped Graphs
Group Node Handling
Partitioned Layout
Label Handling
Node Label Awareness
Node Halos
Configuration Hints
Quality Versus Time
Compactness
Overlap Removal
Tutorial Demo Code
Supplemental Layout Data
Related Layout Algorithms
Interactive Organic Layout
General Usage
Setup
State
Polling for Results
Interaction
Supplemental Layout Data
Layout Options
Output Restrictions
Tutorial Demo Code
Orthogonal Layout
Supplemental Layout Data
Layout Options
Orthogonal Layout of Grouped Graphs
Label Handling
Integrated Labeling
Node Label Awareness
Related Classes
Applicable Layout Stages
Tutorial Demo Code
Configuration Hints
Quality Versus Time
Orthogonal Layout of Grouped Graphs
Supplemental Layout Data
Layout Options
Label Handling
Integrated Labeling
Node Label Awareness
Related Classes
Applicable Layout Stages
Tutorial Demo Code
Directed Orthogonal Layout
Supplemental Layout Data
Layout Options
Advanced Layout Concepts
Directed Edges
Edge/Port Grouping (Bus-style Edge Routing)
Integrated Labeling
Node Label Awareness
Node Halos
Related Classes
Applicable Layout Stages
Tutorial Demo Code
Compact Orthogonal Layout
Layout Options
Applicable Layout Stages
Tutorial Demo Code
Tree Layout
Advanced Layout Concepts Common to all Tree Layouts
Sorting Child Nodes
Enhancing the Layout Process of a Tree Layout
Edge Bundling
Related Classes
Directed Tree Layout
Supplemental Layout Data
Layout Options
Advanced Layout Concepts
Node Halos
Integrated Labeling
Incremental Layout
Balloon Tree Layout
Supplemental Layout Data
Layout Options
Advanced Layout Concepts
Node Halos
Integrated Labeling
Incremental Layout
Horizontal/Vertical Tree Layout
Supplemental Layout Data
Layout Options
Compact Tree Layout
Supplemental Layout Data
Layout Options
Generic Tree Layout
Supplemental Layout Data
Layout Options
Node Placer Implementations
Advanced Layout Concepts
Integrated Labeling
Port Constraints
Node Halos
Incremental Layout
Grouping Support
Support for Multi-parent Structures
Tutorial Demo Code
Radial Layout Style
About the Style
Terminology
Class RadialLayouter
Layout Options
Drawing Style Options
Advanced Layout Concepts
Node Halos
Edge Bundling
Related Classes
Tutorial Demo Code
Supplemental Layout Data
Series-parallel Layout Style
About the Style
Terminology
Relevant Classes
Class SeriesParallelLayouter
Layout Options
Drawing Style Options
Incremental Layout
Series-parallel Graphs vs. General Graphs
Label Handling
Integrated Labeling
Node Label Awareness
Support for Grouped Graphs
Supplemental Layout Data
Partial Layout
About the Concept
Class PartialLayouter
Subgraph Components
Edge Routing
Drawing Style Options
Algorithm Execution Options
Support for Grouped Graphs
Configuration Hints
Consider Node Alignment
Subgraph Component Placement
Tutorial Demo Code
Supplemental Layout Data
Multi-page Layout
About the Concept
Terminology
Relevant Classes
Class MultiPageLayouter
Setup for Layout
Layout Options
Algorithm Execution Options
Related Classes and Interfaces
Class MultiPageLayout
Interface ElementFactory
Tutorial Demo Code
Supplemental Layout Data
Edge Routing Algorithms
Organic Routing
Orthogonal Routing
Organic Edge Routing
Routing Options
Enhancing the Routing Process
Supplemental Layout Data
Tutorial Demo Code
Polyline Edge Routing
About this Algorithm
Relevant Classes
Class EdgeRouter
Routing Options
Advanced Routing Concepts
Label Awareness
Port Constraints
Port Candidates
Edge/Port Grouping (Bus-style Edge Routing)
Node Halos
Routing in Grouped Graphs
Routing in Partition Grids
Incremental Routing
Related Classes
Monotonic Edge Paths
Tutorial Demo Code
Supplemental Layout Data
Orthogonal Edge Routing
Supplemental Layout Data
Routing Options
Monotonic Edge Paths
Advanced Routing Features
Port Constraints
Port Candidates
Incremental Routing
Label Handling
Node Label Awareness
Enhancing the Routing Process
Tutorial Demo Code
Channel Edge Routing
Supplemental Layout Data
Routing Options
Affected Edges
Advanced Routing Features
Port Constraints
Port Candidates
Incremental Routing
Related Classes
Applicable Layout Stages
Tutorial Demo Code
Orthogonal Bus-style Edge Routing
About this Algorithm
Terminology
Relevant Classes
Class BusRouter
Setup for Routing
Routing Options
Incremental Routing
Related Classes
Class BusDescriptor
Class BusRepresentations
Applicable Layout Stages
Advanced Routing Features
Port Constraints
Port Candidates
Configuration Hints
Esthetic Buses
Tutorial Demo Code
Supplemental Layout Data
Automatic Label Placement
Labeling Scenarios
Concepts
Label Models
Preferred Placement of Edge Labels
Generic Labeling
Using an Alternate Label Model
Supplemental Layout Data
Integrated Labeling
Tutorial Demo Code
6. Displaying and Editing Graphs
Model-View-Controller Paradigm
Graph Structure Enhancements
Class Graph2D
Advanced Topics
Copying a Graph2D
Bringing Graph Elements to Life: The Realizer Concept
Binding Realizers
General Features
Node Realizers
Class ShapeNodeRealizer
Class ImageNodeRealizer
Class GenericNodeRealizer
Edge Realizers
Class PolyLineEdgeRealizer
Class ArcEdgeRealizer
Class BezierEdgeRealizer
Class SplineEdgeRealizer
Class QuadCurveEdgeRealizer
Class GenericEdgeRealizer
Realizer-Related Features
Label Support
Configurations
Customizing Label Behavior
Label Models
Node Label Models
Edge Label Models
Auto-rotated Edge Labels
Automatic Edge Label Placement
Node Ports
Customizing Node Port Behavior
Port Location Model
Port Location Model Parameter
Labeling Node Ports
Support for Automatic Layout
EdgeRealizer-related Classes
Class Arrow
Class Bend
Class LineType
Selection State
Writing Customized Realizers
Subclassing and Overriding
Realizer Replication
Bounds Calculation
YGF Serialization and Deserialization
Providing Interface Implementations
Class GenericNodeRealizer
Class GenericEdgeRealizer
Swing User Interface Components as Node Realizers
Rendering
Editor Functionality
Tutorial Demo Code
View Implementations
Class Graph2DView
Support for Automatic Layout
World and View Coordinates
Viewport and Clipping
Scroll Bars
Grid
Selection Box
Rendering Order
Rendering Hints
Drag and Drop Support
Tutorial Demo Code
Class Overview
Related Classes and Interfaces
Class DefaultGraph2DRenderer
Class GraphicsContext
Interface Drawable
Classes Graph2DViewMouseWheelZoomListener, Graph2DViewMouseWheelScrollListener
Class NavigationComponent
User Interaction
Mouse-Driven Actions
Keyboard-Driven Actions
Label Editor
Node-Related Editing Capabilities
ViewMode Workings
Class EditMode
Support for Orthogonal Edge Paths
Support for Interactive Snapping of Graph Elements
Class MoveLabelMode
Class HotSpotMode
Class NavigationMode
Class CellEditorMode
Class MagnifierViewMode
Class AutoDragViewMode
Class TooltipMode
Related Classes and Interfaces
Class HitInfo
Interface MouseInputEditor
Customizing an EditMode
Tutorial Demo Code
Events and Listeners
Graphical Property Changes
Selection State Changes
Multiple Views on a Common Model Graph
Concept
Class ModelViewManager
Synchronization
Filtering
Local Views
Concept
Class LocalViewCreator
Creator Implementations
Managing Local Views
Mapping Graph Elements between Local View and Model
Tutorial Demo Code
Printing a Graph's Visual Representation
Scaling and Clipping
Title Bar and Footer Support
Printing Preview
Creating a Dedicated Printing View
Tutorial Demo Code
Animations for Graph Elements
Animation Framework
Tutorial Demo Code
Advanced Application Logic
Undo/Redo
Clipboard
Layout Morphing
Automatic Layout
Class Graph2DLayoutExecutor
Asynchronous Layout
Graph2DView Support for Automatic Layout
Tutorial Demo Code
7. Graph Hierarchies
Concepts
Grouping and Nesting
Special Proxy Elements
Group Node and Folder Node
Inter-Edge
Working with Graph Hierarchies
Comparing the Concepts
Nesting Characteristics
Managing Graph Hierarchies
Class HierarchyManager
Graph Hierarchy
Creating Grouped Nodes
Creating Nested Graphs
Handling Inter-edges
Node Visiting Order
Traversal Policies
Class DefaultHierarchyGraphFactory
Tutorial Demo Code
Node Realizers
Classes GroupNodeRealizer and GenericGroupNodeRealizer
Resizing Policy
Interface AutoBoundsFeature
View Implementations
Class HierarchyJTree
Related Classes
Class DefaultNodeChangePropagator
Class HierarchyTreeTransferHandler
User Interaction
Tutorial Demo Code
Events and Listeners
Hierarchy Changes
Automatic Layout
Class GroupLayoutConfigurator
8. Tabular Data Presentation
Concepts
Table Structure Model
Working with the Table Structure Model
User Interaction
Rows and Columns
Related Classes
Automatic Layout
Tutorial Demo Code
9. Input and Output
Graph Exchange and Graph Export Formats
Input/Output Handlers
Reading and Writing Graph Structure Data
GraphML
What GraphML Looks Like
Reading and Writing GraphML
Reading and Writing Additional Data
GraphML Default Extension Mechanism
Direct Support for Simple Data Types
Support for Structured Data
Dynamic Registration of Attributes
Support for Custom Realizer Implementations
Support for Custom Realizer
Support for GenericNodeRealizer and GenericEdgeRealizer
Advanced Topics
yFiles XSLT Support for GraphML
Reading and Writing Graphs of Arbitrary Type
Tutorial Demo Code
YGF
Common Usage
Extending YGF With Custom Data
Some Rules
Tutorial Demo Code
GML
What it Looks Like
Common Usage
Extending GML With Custom Data
GML File Format
Basic GML
GML Hierarchy Extension
XGML
What it Looks Like
Common Usage
TGF
What it Looks Like
Common Usage
Exporting a Graph's Visual Representation
Preparing the Graph
Using GIF and JPG
Using the Java Image I/O API
Image Tiling
Image Maps
yFiles Extension Packages
ySVG
yExport
10. Settings Dialogs and Components
Overview
Model-Delegate Pattern
Basic Functionality
Creating Model and View
Synchronizing Editors and Option Items
Defining Dependencies Between Option Items
Undefined Values in Option Items
Internationalization and Localization
Serialization of Settings
Tutorial Demo Code
Advanced Topics
Synchronizing Multiple Editors
Tutorial Demo Code
11. ySVG Extension Package
Scalable Vector Graphics
Using the ySVG Extension Package
Using SVG Content
Customizing SVG Content
Tutorial Demo Code
GraphML Support
12. yExport Extension Package
Vector Graphics File Formats
Using the yExport Extension Package
Using the System Clipboard
A. Obfuscation
Why Obfuscation Matters
Name Obfuscation and its Benefits
Name Obfuscation Using yGuard
Adjusting Names
Checking Obfuscation Success
Tutorial Demo Code
Glossary
Index