# MindFusionDoc Documentation Map
This is a unified documentation resource optimized for LLMs. The high-level guides, architectural overviews, and tutorials are inlined directly below in Section 1. All class references are merged into single files per class/struct and linked in Section 2.
# Section 1: High-Level Guides and Overviews
## Untitled Topic -1
## Introduction
MindFusion.Diagramming for Java Swing (JDiagram for short) is a Java class library that that lets you create and display various types of diagrams and charts. The library includes model classes that describe the structure and appearance of a flow diagram, and view classes that can be integrated into any application that targets the Java Swing framework. By providing your software with ready to use capabilities for visualizing and editing relational data, JDiagram saves you from hundreds of hours of coding and debugging efforts.
JDiagram can give graphical representation to:
- Workflow processes
- Class relationships
- Graphs and networks
- Entity-relationship / database diagrams
- IVR systems
- Industrial automation processes
- Genealogy trees
- Algorithms and flowcharts
- Mind maps
- Organizational charts
- XML documents
- Classification hierarchies
- Data mappings
JDiagram provides intuitive user-interaction model for creating or editing diagrams. In addition, its programmatic interface places at your disposal many useful functions, ranging from printing, XML serialization, exporting to PDF and SVG to path-finding and automatic layout algorithms.
The control has been tested with the most popular Java development environments, and is used by companies from all around the world to create applications in Java.
## General Information
### The JDiagram Library
- Redistribution is royalty free
- Can be purchased with source code
- Is written in Java
- Implements the Document/View architecture
- Includes applet class for use in Web pages
### User Interaction
- Several user interaction modes
- Free-form drawing
- Scrolling and zooming
- Copy and paste to/from the system clipboard
- Panning
- Automatic scrolling while dragging items with the mouse
- Alignment to grid
- Node alignment guides
- Multiple selection
- Tool-tips
- Docking points can be defined for nodes
- Magnifier tool
- Undo / redo support
- Rotate and flip shapes
### Programming
- Programmatic access to the diagram elements
- Builder classes for fluent API
- Numerous properties for customizing appearance and behavior
- Numerous utility methods
- Path finding and cycle detection
- Rich event set
- The applet fires events that can be handled using JavaScript
### Store and Retrieve Diagrams into/from
- Files on disk
- Java streams
- ASCII strings
- XML documents
- JSON strings
### Output
- To display through Java Swing
- Printing and print preview
- To a browser using HTML image maps
### Export and Import
- Export Portable Document Format (PDF) files
- Export Scalable Vector Graphics (SVG) files
- Export images in jpeg, gif, tiff, and png formats
- Export Visio 2013 drawing (.vsdx) documents
- Export Excel Open XML Format (XLSX) files
- Import OpenOffice Draw documents
- Import Visio 2013 drawing (.vsdx) documents
### Diagram Elements
- More than 100 predefined node shapes
- Each diagram item can display multiple labels and icons
- Display SVG drawings in nodes
- Ability to define custom shapes and shape libraries
- Rotation of shapes at arbitrary angles
- Use any Java Swing component as a diagram node
- Container nodes
- Display hierarchical data in TreeView nodes
- Support for custom node and link types
- Assign diagram items to layers
- Tables with unlimited number of rows and columns
- Table cells can span several columns and rows
- Sections of table rows can be expanded or collapsed
- Links can comprise multiple segments
- Link segments can be straight lines or curves
### Automatic Layout
- Spring-Embedder graph layout
- Directional tree layout
- Radial tree layout
- Fractal tree layout
- Layered graph layout
- Grid layout
- Simulated Annealing graph layout
- One-way graph layout
- Orthogonal graph layout
- Circular graph layout
- Orthogonal link router
- Source code flowchart layout
- Decision flowchart layout
- Triangular graph layout
- Hierarchical graph layout
- Cascading graph layout
- Tree map layout
- Process diagrams layout
- Automatic link routing
### Appearance
- Styles and themes
- Nodes can display images and text
- Multiple text labels per item
- Various text alignment styles
- Text can be laid out in polygonal areas
- Glass visual effects
- Styled HTML-like text formatting
- Customizable fonts and colors
- Custom painting of nodes
- Shadows
- User-assigned mouse cursors
- Z-order
- Rich choice of pen and brush styles
- Transparent nodes
- Invisible nodes
- A background swimlane grid
### Behavior
- Lock diagram elements
- Read-only mode supported
- Tables can be scrolled
- Collapse and expand hierarchy branches
- In-place text editing
- Dynamic positioning of links relative to connected nodes
### Link Diagram Items
- Nodes to nodes
- Table rows to table rows
- Nodes to table rows
- Unconnected links
### Hierarchical Grouping
- Attaching nodes to other nodes
- Attaching nodes to link control points
- Attaching nodes to link segments
### Auxiliary Controls
- Overview control
- Ruler control
- Shapes listbox
- Node list control
- Layer list control
- Zoom control
- Item list control
- Palette control
## Getting Started
The following topics describe how to integrate the Diagramming for Java Swing API into your project, and create an instance of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) control.
## Add Diagramming Library
You can add diagram library's JAR file to your project either from the (#add-from-maven-central) repository, or from (#add-local-jar) installed distribution.
## Add From Maven Central
You can install the MindFusion.Diagramming library from Maven Central. After integrating it by following any of the following steps, you should be able to import (#commindfusiondiagramming) classes and add controls from the library to your UI ((Markdown/T_com_mindfusion_diagramming_DiagramView.md), (Markdown/T_com_mindfusion_diagramming_NodeListView.md), (Markdown/T_com_mindfusion_diagramming_Overview.md), etc).### IntelliJ IDE
In order to integrate Diagramming for Java Swing into your IntelliJ project, select the Project Structure command from File menu, open Modules -> Dependencies page, click the + button and select Library -> From Maven command:
On the Download Library from Maven screen, search for "mindfusion:diagramming", select latest version of the package and click OK:
On Configure Library screen, select the library level and click OK:
### Eclipse IDE
From Maven-based project's context menu, select Maven -> Add Dependency command:
On Add Dependency screen, search for "diagramming", select the latest version and click OK:
### Maven Projects
In any Maven-based project, you can list eu.mindfusion.diagramming package as dependency in pom.xml and let the build system take care of downloading and integrating the jar file:
```
eu.mindfusiondiagramming4.5.1
```
### Gradle Projects
In any Gradle-based project, you can list eu.mindfusion.diagramming package as dependency in build.gradle and let the build system take care of downloading and integrating the jar file:
```
dependencies {
implementation 'eu.mindfusion:diagramming:4.5.1'
}
```
## Add Local JAR
You can use the diagram library archive (JDiagram.jar) from locally installed distribution. After adding it to your project's dependencies, you should be able to import (#commindfusiondiagramming) classes and add controls from the library to your UI ((Markdown/T_com_mindfusion_diagramming_DiagramView.md), (Markdown/T_com_mindfusion_diagramming_NodeListView.md), (Markdown/T_com_mindfusion_diagramming_Overview.md), etc).
### IntelliJ IDE
In order to integrate Diagramming for Java Swing into your IntelliJ project, select the Project Structure command from File menu, open Modules -> Dependencies page, click the + button and select the JARs or Directories command:
On the Attach Files screen, browse to the location where you have unarchived JDiagram.zip and select JDiagram.jar.
Press OK to confirm all dialogs.
### Eclipse IDE
In order to integrate Diagramming for Java Swing into your Eclipse project, select the Build Path -> Add External Archives command from project's context menu:
On JAR Selection screen, browse to the location where you have unarchived JDiagram.zip and select JDiagram.jar.
## Create DiagramView Instance
Once you have added a JDiagram reference to your project, you can access the public classes defined in JDiagram packages. The most important classes are (Markdown/T_com_mindfusion_diagramming_Diagram.md), which represents the diagram data, and (Markdown/T_com_mindfusion_diagramming_DiagramView.md), which is a Swing component that displays the diagram. You usually create and initialize a new instances of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md) classes in the same place where you create and initialize the rest of the user interface of your application. Associate the diagram to be displayed by this view by calling the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdiagram) method. To let users scroll the diagram, add the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) object to a JScrollPane container. Thus, a minimal application containing a scrollable diagram that can be used to draw flowcharts looks like this:
```java
package flowcharter;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import com.mindfusion.diagramming.*;
public class MainWindow
extends JFrame
{
public MainWindow()
{
diagram = new Diagram();
diagramView = new DiagramView();
diagramView.setDiagram(diagram);
JScrollPane scrollPane = new JScrollPane(diagramView);
getContentPane().add(scrollPane);
Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
setSize(size);
}
public static void main(String[] args)
{
MainWindow window = new MainWindow();
window.setVisible(true);
}
private DiagramView diagramView;
private Diagram diagram;
}
```
The initialization of the JDiagram control can be very different depending on what you will use it for, but there are certain properties you will most likely need to adjust in all cases. Here they are:
- Choose a (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) for the control, which defines how JDiagram must interpret actions done with the mouse by users of your application. The default value, (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) specifies that users can draw diagram nodes and connect them with diagram links. Another value, (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) allows drawing tables and relationships between them. The (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) behavior allows panning the view by dragging the mouse. Modify bans users from drawing new items, but allows them to modify existing ones. Call the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) method of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) class to adjust the control's behavior.
- There are other methods of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) class for customizing the behavior of the diagram and its items - take a look at (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getcustombehavior) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustombehavior), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getcustomlinktype) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustomlinktype), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getcustomnodetype) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustomnodetype).
- There are various methods that let you customize the general appearance of your diagram, such as (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbackbrush), (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbackgroundimage), (Markdown/T_com_mindfusion_diagramming_Diagram.md#setboundspen), (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridcolor) and so on.
- There is a set of methods that let you specify default attributes for diagram items. The names of these methods usually correspond to the name of the attribute they provide a default value for, prefixed by the name of the appropriate item class. For example, the method that lets you specify the text of the link's label is called (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settext), while the default value for new links can be set through (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinktext).
Once you have initialized JDiagram, you usually use the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#diagramlistener-members) to handle various events, such as (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkcreated) and (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkmodified). These events let you take specific actions when diagram items are created or modified, such as updating the internal state of your application.
Browse the other sections of this help file to learn more about the functionality provided by the MindFusion.Diagramming classes, methods and properties. Follow the (#tutorials) to learn how to populate the diagram model programmatically or create custom item types.
## User Interaction
Most likely an application would use JDiagram to enable users to interactively create diagrams, flowcharts and other kinds of presentation documents. A user composes or edits a diagram by drawing its elements on the JDiagram canvas area. With the help of a mouse or another pointing device users draw shapes, tables and links, possibly connecting them in complex hierarchies, graphs, trees or other structures they might need.
### Creating New Items
New items can be created by drawing them with the mouse. While a user drags the mouse, the view of the control is updated to show what the new item would look like at the pointer location. If the operation cannot be completed at the current mouse position, the cursor changes to a crossed out circle. When the user releases the button, the item is created. The control does not let users create very tiny nodes which would be hard to select and modify. By default, links can be drawn only between nodes, unless the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setallowunconnectedlinks) attribute is enabled. Users can cancel item creation by pressing the right mouse button while drawing.
### Modifying Items
A user modifies an item by dragging its adjustment handles. The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmodificationstart) method specifies when these handles appear. The first option, (Markdown/T_com_mindfusion_diagramming_ModificationStart_0.md), makes the handles appear when the mouse hovers over an item; modification of the item can start immediately by pointing it and dragging a handle. The second option is (Markdown/T_com_mindfusion_diagramming_ModificationStart_0.md): in order to be modified, an item should first be selected. Adjustment handles appear around the item to indicate that now it can be moved or resized. The number and functionality of the handles depend on the item type and the value specified through the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#sethandlesstyle) method.
### Modifying a Node
Usually nodes have nine adjustment handles. The one at the center can be used to move the node. When dragged, each corner handle resizes the node by moving the two edges adjacent to the corresponding corner. The edge handles placed at the center of each side can be used to resize a node either horizontally or vertically. Shape nodes can be rotated using an additional round handle drawn above them. Each handle can be enabled or disabled by setting or clearing the respective bit through the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setenabledhandles) method.
### Modifying a Link
Variety and behavior of link adjustment handles depend on the link's Style and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setsegmentcount). Control-points stay at both ends of each segment that constitutes a link. JDiagram offers three link styles. The following sections discuss how to modify links of each style.
- The first style called Polyline defines links, which consist of a series of straight segments, drawn between control-points. There are no restrictions as to the number of segments. Dragging a control-point modifies each segment adjacent to the point. If the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setallowsplitlinks) method is called, users are allowed to insert new control points or to remove existing ones. Inserting a control point is done by pressing the left mouse button over a segment and dragging. The new point appears at the mouse location and splits the pointed segment in two.
- If link's style is set to Bezier, each segment has 4 manipulation handles that define a curve. Each curve goes through the end-points, which are shaped as circles. Bend of the curve is defined by the middle two points shaped as rectangles. If a user drags an end-point modification handle, the adjacent control points will be moved with same translation vector as that of the end-point. If a bend control point is dragged, the symmetric control point of the neighboring curve is also moved to ensure the two stay on the same line with the end-point and on the same distance from it.
- Cascading links consist of straight horizontal and vertical segments, each one orthogonal to its neighbors. If a control-point is dragged, the segments adjacent to it are moved and resized preserving their orthogonal orientation to each other. If the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setallowsplitlinks) method is called, users are allowed to insert new control points to Cascading links or remove existing ones. The orientation of the link segments can be changed if LinkCascadeOrientation is set to Auto.
### Modifying a Table
By default, table modification handles are drawn as dotted lines over its borders. To move a table, drag its caption bar. To resize a table, drag any of its borders or corners.
### Selecting Items
Multiple items are selected by dragging while CTRL key is down. Selection can also be toggled with CTRL + clicking an item. A rectangle appears around selected items, allowing a user to move all of them at once.
### Scrolling and Panning
The (Markdown/T_com_mindfusion_diagramming_DiagramView.md) can be scrolled if its placed inside a JScrollPane. Users scroll the view by dragging the scrollpane's scrollbars, which appear when the diagram area is larger than the view. The user could also pan the diagram view by pressing the left mouse button and dragging while the ALT key is down.
### Interpreting Users Actions
Mouse operations can be interpreted in different ways depending on the value of the Behavior property. It defines whether for example dragging the mouse creates a node or selects existing items. Check the property description for more information on the built-in input modes.
You can also create a custom mouse input controller by deriving from the (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md) class and calling the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustombehavior) method of (Markdown/T_com_mindfusion_diagramming_DiagramView.md). A custom controller could implement only the higher-level (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md#startdraw) method to specify what kind of operation should start when the user begins to drag the mouse, or the (Markdown/T_com_mindfusion_diagramming_LinkNodesBehavior.md#createnode) method to create an instance of a custom node class. Alternatively, override the lower-level (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md#pointerdown), (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md#pointermove) and (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md#pointerup) methods to completely overhaul user interaction. A custom (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md)-derived class is demonstrated in the Fishbone sample project.
## Programming Interface Overview
The next few chapters give you an overview of all JDiagram features, grouped by functionality. Hyperlinks refer to the detailed description of methods and classes.
## Document-View Architecture
JDiagram implements the Model-View-Controller (MVC) architectural pattern. The MVC design pattern as applied to JDiagram separates the diagram data (model) from its representation to the user (view) and controlling it by the user (controller).
### Single Diagram Canvas
The (Markdown/T_com_mindfusion_diagramming_Diagram.md) class represents the diagram data model and provides operations to process the data. It exposes properties and methods for adding new diagram elements, finding and accessing existing elements, or removing them.
The (Markdown/T_com_mindfusion_diagramming_DiagramView.md) class presents the relevant data from the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class by drawing on the screen using the Java Graphics2D API. When the diagram is changed, the view automatically redraws the affected part of the image to reflect the changes. Multiple views can display the same diagram. Perform the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdiagram) method of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) class to specify the diagram displayed by the view. Each view can have a different zoom level and scroll position.
Controllers responding to user interactions are represented by (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md) objects. The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) property of (Markdown/T_com_mindfusion_diagramming_DiagramView.md) and respective (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) let you switch between different controllers, specifying how GUI actions should be interpreted to manipulate the diagram elements, or scroll / zoom the view itself.
### Multiple Diagram Pages
The (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) class represents a collection of diagram pages or sheets, represented by (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) objects. Document's pages are stored in its (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md#getpages) collection. The saveTo* methods of (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) save all pages in a single file, and respectively the loadFrom* methods load all pages from the file.
(Markdown/T_com_mindfusion_diagramming_DiagramPage.md) is derived from (Markdown/T_com_mindfusion_diagramming_Diagram.md) and only adds a few properties, so any code that processes (Markdown/T_com_mindfusion_diagramming_Diagram.md) objects will work with (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) objects too. A diagram document forwards each event raised by its pages, giving you a chance to use the same listener for events raised by different pages. If a page should implement distinct user interaction or validation logic, it is also possible to attach handlers to the (Markdown/T_com_mindfusion_diagramming_Diagram.md) events inherited by (Markdown/T_com_mindfusion_diagramming_DiagramPage.md).
A single (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) could be assigned to the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdiagram) property of (Markdown/T_com_mindfusion_diagramming_DiagramView.md), and that lets you create your own user interface for presenting a list of pages to the user and selecting a current page.
The library includes the (Markdown/T_com_mindfusion_diagramming_TabbedScrollPane.md) and (Markdown/T_com_mindfusion_diagramming_DocumentView.md) classes, which work together to present all pages of a document in a tabbed user interface, with each tab corresponding to a page. The page displayed in the active tab is exposed through the (Markdown/T_com_mindfusion_diagramming_DocumentView.md#getcurrentpage) property of (Markdown/T_com_mindfusion_diagramming_DocumentView.md). Users can switch between pages by activating the corresponding tab. New pages can be added to and existing pages removed from the document using buttons in the tab strip, and pages can be rearranged by dragging their corresponding tabs with the mouse.
## User Interface Components
### DiagramView
(Markdown/T_com_mindfusion_diagramming_DiagramView.md) renders the contents of a (Markdown/T_com_mindfusion_diagramming_Diagram.md) and allows users to create new items or modify existing ones using a mouse or other pointing devices. The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) property defines how the control interprets user actions. Additional properties control scrolling and zooming of the view.
### Palette
The (Markdown/T_com_mindfusion_diagramming_Palette.md) control represents a tool palette that displays (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) objects grouped into categories. It implements (Markdown/T_com_mindfusion_common_Accordion.md) user interface that displays (Markdown/T_com_mindfusion_diagramming_ItemListView.md) components as its child panels, and category icon, title and collapse/expand button in pane headers. Each child (Markdown/T_com_mindfusion_diagramming_ItemListView.md) displays the items added to its corresponding category. Call the (Markdown/T_com_mindfusion_diagramming_Palette.md#addcategory) method to define a category and create its respective accordion pane. Call (Markdown/T_com_mindfusion_diagramming_Palette.md#additem) to add an item to specified category. The control can also be configured by setting its (Markdown/T_com_mindfusion_diagramming_Palette.md#setmodel) to an object implementing (Markdown/T_com_mindfusion_diagramming_PaletteModel.md) interface. (Markdown/T_com_mindfusion_diagramming_Palette.md) provides same behavior and appearance properties as the (Markdown/T_com_mindfusion_diagramming_ItemListView.md) class.
### ItemListView
(Markdown/T_com_mindfusion_diagramming_ItemListView.md) represents a tool palette that contains uncategorized list of diagram items. Items can be added by calling (Markdown/T_com_mindfusion_diagramming_ItemListView.md#additem) method, and removed by calling (Markdown/T_com_mindfusion_diagramming_ItemListView.md#removeitemat). Drag-and-drop operations from (Markdown/T_com_mindfusion_diagramming_ItemListView.md) to (Markdown/T_com_mindfusion_diagramming_DiagramView.md) create a copy of the dragged item, and set its size to (Markdown/T_com_mindfusion_diagramming_ItemListView.md#setnewinstancesize).
### Overview
(Markdown/T_com_mindfusion_diagramming_Overview.md) provides a scaled-down view of a target (Markdown/T_com_mindfusion_diagramming_DiagramView.md), helping users work with larger diagrams. A tracker rectangle shows current viewport of the main (Markdown/T_com_mindfusion_diagramming_DiagramView.md), and by dragging it users can change the scroll position. It can also be resized to zoom the target view.
### ZoomControl
(Markdown/T_com_mindfusion_diagramming_ZoomControl.md) lets users change the zoom level of a target (Markdown/T_com_mindfusion_diagramming_DiagramView.md) by dragging a slider. It also includes arrow buttons for scrolling the view.
### Ruler
The (Markdown/T_com_mindfusion_diagramming_Ruler.md) control displays horizontal and vertical scales that let users measure and align diagram nodes.
## Diagram Structure
## Standard Item Types
(Markdown/T_com_mindfusion_diagramming_Diagram.md) elements in JDiagram are represented by (Markdown/T_com_mindfusion_diagramming_ShapeNode.md), (Markdown/T_com_mindfusion_diagramming_TableNode.md), (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) instances. Combined and linked together, they can form complex data structures such as process or entity-relationship diagrams, class hierarchies, networks and graphs. Each of their rich features can be customized through numerous methods and properties. JDiagram also offers intuitive user interface for drawing and editing diagram items interactively.
### Shape Nodes
Shape nodes can represent geometric shapes, flowchart elements, icons in network diagrams, and so on. They can hold both graphics and text in different fonts, sizes and colors. There are more than 100 predefined shapes and apart from them, JDiagram offers an easy way to define custom shapes. Shape nodes can be rotated, either interactively using the round selection handle drawn above them, or programmatically using the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setrotationangle) method. The (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) appearance can be customized further using several types of custom painting. The first type gives you full control over the painting. With the second one your painting code is performed additionally to the basic painting. The third one performs standard drawing of shape nodes and custom drawing of their shadows. Shape nodes can display background images and graphics. The file formats supported are GIF, JPEG and PNG.### SVG Nodes
The (Markdown/T_com_mindfusion_diagramming_SvgNode.md) class represents nodes that can display SVG drawings in addition to the rendering provided by its base (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) class. SVG elements are rendered after the associated bitmap (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#getimage) and just before the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawnode) event is raised for (Markdown/T_com_mindfusion_diagramming_CustomDraw_0.md) custom drawing. SVG elements are parsed and associated with the node through a (Markdown/T_com_mindfusion_svg_SvgContent.md) object, which should be initialized and then assigned to the (Markdown/T_com_mindfusion_diagramming_SvgNode.md#setcontent) property.
### Table Nodes
Table nodes can be used to represent table schemas in database diagrams or classes in class-hierarchies. A table contains cells arranged in a grid, and every cell can display text and/or image. Cells can span several rows and columns as set through the (Markdown/T_com_mindfusion_diagramming_Cell.md#setrowspan) and (Markdown/T_com_mindfusion_diagramming_Cell.md#setcolumnspan) methods. Cells, columns and rows can be customized in various ways - there are appropriate methods available for setting their extents ((Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionheight), (Markdown/T_com_mindfusion_diagramming_TableNode.md#setrowheight), (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcolumnwidth)), frame style ((Markdown/T_com_mindfusion_diagramming_TableNode.md#setcellframestyle)), image ((Markdown/T_com_mindfusion_diagramming_TableNode.md#setimagealign), (Markdown/T_com_mindfusion_diagramming_Cell.md#setimagealign)) and text format and alignment((Markdown/T_com_mindfusion_diagramming_Cell.md#settextformat), (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionformat), (Markdown/T_com_mindfusion_diagramming_Diagram.md#setenablestyledtext)). Tables' dimensions can be programmatically changed. Inserting ((Markdown/T_com_mindfusion_diagramming_TableNode.md#insertrow), (Markdown/T_com_mindfusion_diagramming_TableNode.md#insertcolumn)), appending ((Markdown/T_com_mindfusion_diagramming_TableNode.md#addrow), (Markdown/T_com_mindfusion_diagramming_TableNode.md#addcolumn)) or deleting rows and columns ((Markdown/T_com_mindfusion_diagramming_TableNode.md#deletecolumn), (Markdown/T_com_mindfusion_diagramming_TableNode.md#deleterow)) can be done in a very comprehensive, intuitive way whenever you might need it. Tables can also display background images and graphics. The file formats supported are GIF, JPEG and PNG.### Free-form Nodes
A (Markdown/T_com_mindfusion_diagramming_FreeFormNode.md) collects all points from users' mouse or touch input and displays them as node's outline. To let users draw free-form nodes interactively, set (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) to (Markdown/T_com_mindfusion_diagramming_Behavior_0.md). Use the (Markdown/T_com_mindfusion_diagramming_FreeFormNode.md#getpoints) property of (Markdown/T_com_mindfusion_diagramming_FreeFormNode.md) to get or set outline points programmatically. If the (Markdown/T_com_mindfusion_diagramming_FreeFormNode.md#setclosed) property is set, the node is drawn as a closed shape and its interior filled, or otherwise the node is drawn as a poly-line. If the distance between first and last points drawn by user is shorter than (Markdown/T_com_mindfusion_diagramming_Diagram.md#getautoclosedistance), the node gets closed automatically.### Control Hosts
A (Markdown/T_com_mindfusion_diagramming_ControlNode.md) can host any Java Swing control - instance of a java.awt.Component -derived class. The hosted control might be any of the standard component types such as JTable or JButton; custom controls are also supported. A (Markdown/T_com_mindfusion_diagramming_ControlNode.md) can be connected with links to any other nodes - control hosts, shapes or tables.### Container Nodes
A (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) can contain other diagram nodes. When a container is moved, its child nodes move too. Containers can be folded to hide the contained nodes, and unfolded back to show them again. Nodes inside a container can be linked to nodes both inside and outside of it. When a container is folded, the links connected to contained nodes point to the container outlines. Containers can be nested within each other to unlimited depth.
### TreeView Nodes
The (Markdown/T_com_mindfusion_diagramming_TreeViewNode.md) class represents nodes that can display hierarchical data. The root items displayed in the node can be accessed through the (Markdown/T_com_mindfusion_diagramming_TreeViewNode.md#getrootitems) method. New items can be added to and removed from the returned collection. The root items can have child items on their own and so on. For more information, refer to the (Markdown/T_com_mindfusion_diagramming_TreeViewItem.md) class.
### Links
(Markdown/T_com_mindfusion_diagramming_DiagramLink.md) represent various types of connections and relations in diagrams. JDiagram offers three basic link types:
- polyline links composed of straight-line segments (choose Polyline link style)
- curved links composed of Bezier-spline segments
- links composed of horizontal and vertical segments, alternating their orientation so that every segment is orthogonal to its neighbor
A link can be connected to a node at each of the link's ends. It is also possible to have unconnected links - having one or both of their ends not connected to nodes. Some customizable link's attributes are: arrowheads ((Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadshape), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadshapesize), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadpen)), shape ((Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setshape), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setcascadeorientation)), color ((Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settextbrush)), text ((Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settext), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settextstyle)), pen width and style, modification behavior ((Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setallowmovestart), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setautoroute), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setallowmoveend), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setdynamic)) and number of segments ((Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setsegmentcount)).
### See Also
(#text-formatting)
(#custom-item-types)
## Custom Item Types
You can create your own item types by deriving the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) classes or their successors such as (Markdown/T_com_mindfusion_diagramming_TableNode.md), (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) and so on. Thus, you can add custom data fields to the diagram items, and implement custom visualization and interaction functionality.
### Serialization
If you add custom fields to your item class, you will probably want their values saved when saving diagram files, and restored when loading files. To enable this, override the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#writeexternal) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#readexternal) methods of the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) class, which let you use ObjectOutputStream and ObjectInputStream objects to implement binary serialization. To implement XML serialization, you must override the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#savetoxml) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#loadfromxml) methods, and use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#registeritemclass) method to associate an element name with your class.
### Clipboard operations
You must implement the (Markdown/T_com_mindfusion_diagramming_DiagramItemList.md#clone) method in order to enable (Markdown/T_com_mindfusion_diagramming_DiagramView.md#copytoclipboard) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#pastefromclipboard) to work with your custom item type. If (Markdown/T_com_mindfusion_diagramming_DiagramItemList.md#clone) is not implemented, you will get an instance of the base class created for the pasted item, and this could lead to an exception when the base class deserialization code tries to load the item state from a data stream created by the derived class. If your class has any custom fields, it must also implement the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#writeexternal) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#readexternal) methods for proper serialization.
### Rendering
If you need to provide custom rendering for your items, override the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#drawlocal) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#drawshadowlocal) methods. They receive as an argument a Graphics2D object, which provides methods for drawing vector graphics, text and images. The specified Graphics2D in (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#drawlocal) has a rotation transform applied to it to match the node's (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setrotationangle), and a translation transform to match the node's position, so that the coordinate system origin (0,0) is at the node's top-left corner. Alternatively, override the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#draw) method to receive a Graphics2D without any local transformations applied to it.
Apart from drawing on screen via Java's Graphics2D objects, JDiagram provides (Markdown/T_com_mindfusion_pdf_PdfGraphics2D_0.md) and (Markdown/T_com_mindfusion_svg_SvgGraphics2D_0.md) implementations of that interface, which are used when exporting to PDF and to SVG. That lets you use the same code regardless of where the item should draw itself.
### User interaction
To allow the user to draw items from a custom class, set the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) of the diagram view to (Markdown/T_com_mindfusion_diagramming_Behavior_0.md), and call the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustomnodetype) and/or (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustomlinktype) method with the Class object that corresponds to your type. If you need to change how items handle user interaction while they are being initially created, implement the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#startcreate), (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#updatecreate) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#completecreate) methods. In order to change how items respond to user interaction while they are being modified, implement the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#startmodify), (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#updatemodify) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#completemodify) methods.
## Creating and Deleting Items
### Creating Items Programmatically
In order to add a new node or link to a diagram, create an instance of the item class by calling the new operator and add it to the diagram's (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes) or (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlinks) collection. This works the same way for adding both items from your custom class or ones from the predefined JDiagram types.
There are several shortcut methods provided for creating instances of the predefined node and link types. The methods are members of the diagram's (Markdown/T_com_mindfusion_diagramming_Diagram.md#getfactory) object:
- The (Markdown/T_com_mindfusion_diagramming_Factory.md#createshapenode) method creates a (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) at the specified position with the specified dimensions and shape.
- The (Markdown/T_com_mindfusion_diagramming_Factory.md#createtablenode) method creates a (Markdown/T_com_mindfusion_diagramming_TableNode.md) at a specified position. Tables have a method that connects them with other tables called (Markdown/T_com_mindfusion_diagramming_TableNode.md#addrelation).
- The (Markdown/T_com_mindfusion_diagramming_Factory.md#createcontainernode) method creates a (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) at the specified position.
- There are several overloads of the (Markdown/T_com_mindfusion_diagramming_Factory.md#creatediagramlink) method that allow connecting two nodes of the same type or of different types.
### Drawing New Items
Users can draw diagram elements with the mouse. Call (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) to specify what type of elements should be created when a user starts drawing. While items are being drawn, the control raises the validation events (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodecreating) and (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkcreating) to let you validate the operation and prevent creating items at a specific location. When the user releases the mouse button, the item is added to the collection that contains items from the same type (for example, the collections returned by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes)). Users can create diagram elements by drawing them on the touch screen. Use the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) method to specify what type of elements should be created when a user starts drawing. While items are being drawn, the control raises the validation events (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodecreating) and (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkcreating) to let you validate the operation and prevent creating items at a specific location. When the user lifts their finger from the touch screen, the item is added to the collection that contains items from the same type (for example, the collections returned by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes)).
### Deleting Items
Call the remove method of the collection returned by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getitems) method to delete an object from the diagram. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#clearall) method clears diagram contents by deleting all objects.
By default, deleting a node also removes its links. Set the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setautodeletelinks) property to false to prevent that, and disconnect the links instead.
## Accessing Items
One of the most common tasks when using the component is iterating over all items in the document or navigating through the connections between items - from a node to the incoming or outgoing links, or from a link to its origin and destination nodes. To enumerate items of a diagram, use the collections returned by the following methods: (Markdown/T_com_mindfusion_diagramming_Diagram.md#getitems), (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlinks), and (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes). The nodes connected through a link are returned by the link's (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getdestination) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getorigin) methods. To access the links connected to a node, use its (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getincominglinks) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getoutgoinglinks) methods. The first collection contains references to all links pointing to the node, the second - to the links that start from it. Links can connect to rows of a table; to find such links, use the table’s (Markdown/T_com_mindfusion_diagramming_TableNode.md#getrows) method and the (Markdown/T_com_mindfusion_diagramming_Row.md#getincominglinks) and (Markdown/T_com_mindfusion_diagramming_Row.md#getoutgoinglinks) methods.
### Selected Items
If only one chart object is selected, it is considered the active object and can be accessed with the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getactiveitem) method. Multiple objects can be selected when clicking or dragging with the Ctrl key pressed at the same time. Multiple- selection can be accessed through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getselection) method of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class. The (Markdown/T_com_mindfusion_diagramming_Selection.md) object provides methods to access the selected items: (Markdown/T_com_mindfusion_diagramming_Diagram.md#getitems), (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlinks), (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes).
### Finding Items
You can search for chart objects by their tag using the (Markdown/T_com_mindfusion_diagramming_Diagram.md#findlink), (Markdown/T_com_mindfusion_diagramming_Diagram.md#findnode), (Markdown/T_com_mindfusion_diagramming_Diagram.md#findgroup) methods. Tag objects are compared by calling the equals method of the java.lang.Object class. If there are more objects with the same tag, the first one will be returned. If no object with the specified tag exists, null object reference will be returned. Groups can also be searched by tag using (Markdown/T_com_mindfusion_diagramming_Diagram.md#findgroup).
### Relationship Queries
The (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#query) method traverses the graph by following node/link connections and group's parent/child relationships to find items in specific relation to the current one. The method receives a string argument consisting of selectors and optional predicates. The query is executed in several steps. In each step the result set is constructed from the previous result set by following the relationship specified by the current selector. If a predicate is specified after the selector identifier, the result set is filtered to include only items for which the predicate evaluates to true.
## Attaching and Grouping Items
JDiagram allows attaching a node to another diagram element, establishing a subordinate - master relationship between the two items. The easiest way to attach nodes is to call the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#attachto) method. When a master element is moved or resized, any subordinated node follows it, so that the initial distance between the two items stays constant. This happens both when a user moves the master item around, and when the item position is changed using a method.
Recent versions of the API include (Markdown/T_com_mindfusion_diagramming_NodeLabel.md) and (Markdown/T_com_mindfusion_diagramming_LinkLabel.md) classes, which address several of the scenarios described below. We recommend using these classes when appropriate, as they offer a more lightweight and easily configurable alternative to attached nodes.
### Possible Uses
- Attach a transparent shape node to another item and set its text by calling the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settext) method, so that the shape node acts as an additional label assigned to the main item (to make a shape node transparent, call its (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settransparent) method).
- Attach a shape node to another item and set the node's image by calling its (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setimage) method, so that it acts as an additional icon displayed inside or near the main item.
- Attach a shape node or a table to another item and handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodeclicked) or (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#cellclicked) event to perform some action on the main item. This makes the subordinated node act as a button or another type of UI element attached to the main item.
- In all previous cases, the attached nodes can be locked by a call to their (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setlocked) method in order to use them only as a decorations embellishing the main item. That prevents users from selecting, modifying or drawing links to the subordinates.
- Attach child elements in a tree branch to the branch root, so that when a user moves a tree node, the node's children moves simultaneously with it. Modifying an item in such hierarchical group makes the modification propagate through all dependant subordinated items.
### Hierarchical Grouping
An unit of attached items is represented by an instance of the (Markdown/T_com_mindfusion_diagramming_Group.md) class. To create a group, call the (Markdown/T_com_mindfusion_diagramming_Factory.md#creategroup) method passing the master object as argument, and use the (Markdown/T_com_mindfusion_diagramming_Group.md#group-methods) methods to attach items. The (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#attachto) method of nodes is a shortcut to creating a group and attaching an item to it. Every member of a group can be the master object of another group, that is, an item can be subordinate in one group and meanwhile be another group's master. JDiagram doesn't impose any limits to the depth and width of group hierarchies built that way. However, it is not possible to put an item as a subordinate in more than one groups because the hierarchy relations would become ambiguous.
### Unions
It is possible to create such groups, where modifying any item in the hierarchy causes updating of all other items. This can be done by putting the items in circular chain of dependencies - that is, item1 is attached to item2, item2 to item3 … itemN to item1. If any of these items is modified, the change will propagate through the chain until it reaches its originator.
### Attaching Items to a Group
Links cannot be attached to groups but can be master items of groups. If a group's master item is a link, nodes can be attached to the control points or segments of the link. See the (Markdown/T_com_mindfusion_diagramming_Group.md#attachtolinkpoint) and (Markdown/T_com_mindfusion_diagramming_Group.md#attachtolinksegment) methods for details. If the master item is a node, other nodes can be attached to any of its corners, or to an area specified as percent of master-node's bounding rectangle. Check (Markdown/T_com_mindfusion_diagramming_Group.md#attachtocorner) and (Markdown/T_com_mindfusion_diagramming_Group.md#attachproportional) for details. A shortcut to creating (Markdown/T_com_mindfusion_diagramming_Group.md) instance and calling the appropriate (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#attachto) method of the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) class.
### Accessing Group Items
The master item of a group can be accessed through its (Markdown/T_com_mindfusion_diagramming_Group.md#getmainitem) method and the subordinate items are returned by the (Markdown/T_com_mindfusion_diagramming_Group.md#getattachednodes) method. To get the groups in which an item participates, use its (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getmastergroup) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getsubordinategroup) methods.
### Destroying Groups
If a user deletes the master item of a group, the group is destroyed automatically. If (Markdown/T_com_mindfusion_diagramming_Group.md#getautodeleteitems) returns true, subordinated items in the group are deleted too. If (Markdown/T_com_mindfusion_diagramming_Group.md#getautodeleteitems) returns false, subordinated items are just detached from their master and remain intact. Groups can be destroyed programmatically using the (Markdown/T_com_mindfusion_diagramming_Diagram.md#destroygroup) method.
## Layers
### Layers
Items can be assigned to layers, and layers can be hidden, locked or moved up/down in the Z order as a group. (Markdown/T_com_mindfusion_diagramming_Layer.md) objects provide (Markdown/T_com_mindfusion_diagramming_Layer.md#setvisible), (Markdown/T_com_mindfusion_diagramming_Layer.md#setlocked) and (Markdown/T_com_mindfusion_diagramming_Layer.md#setzindex) properties, which will affect all items in the respective layer. Layers also expose a (Markdown/T_com_mindfusion_diagramming_Layer.md#settitle) property shown in the (Markdown/T_com_mindfusion_diagramming_LayerListView.md) control. Newly drawn items are added to the layer specified via (Markdown/T_com_mindfusion_diagramming_Diagram.md#setactivelayer).
Call the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setlayerindex) method of items to associate them with layers in the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlayers) collection. If (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayerindex) has the default value of -1, the item is not associated with any layer and its visibility depends only on the item's own (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setvisible) property.
### Layer list control
The (Markdown/T_com_mindfusion_diagramming_LayerListView.md) control provides user interface for working with (Markdown/T_com_mindfusion_diagramming_Layer.md) objects. The control presents a list of the specified (Markdown/T_com_mindfusion_diagramming_LayerListView.md#setdiagram)'s layers, showing their title and an overview image of the objects in each layer, and also allows editing of layer's (Markdown/T_com_mindfusion_diagramming_Layer.md#setvisible) and (Markdown/T_com_mindfusion_diagramming_Layer.md#setlocked) properties and choosing the Diagram's currently active layer. New layers can be added to the Diagram by clicking the + button and removed by clicking the - button.
The image below illustrates a (Markdown/T_com_mindfusion_diagramming_LayerListView.md) with several layers.
## Collapsing and Expanding Tree Branches
If your chart represents a tree structure, you might want to collapse a sub-tree starting from a node or expand a sub-tree that was previously collapsed. Use the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setexpanded) method of a node to do this programmatically. You can also invoke the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setexpandable) method to show a +/- button beside the node; using this button the user will be able to collapse and expand the sub-tree, which has the specified node as root. To check if a sub-tree is expanded or collapsed call the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getexpanded) method.
### Displaying Expand/Collapse Button
If the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setexpandable) attribute of a node is set to true, there is a [±] button displayed beside the node to allow users to collapse or expand the tree branch starting there. The button location can be customized through the diagram's (Markdown/T_com_mindfusion_diagramming_Diagram.md#setexpandbuttonposition) method. The appearance of the collapse / expand icon can be customized by setting (Markdown/T_com_mindfusion_diagramming_Renderers.md#setexpandiconrenderer). By default, pressing that button automatically collapses or expands the tree branch and raises the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#treeexpanded) or (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#treecollapsed) events.
### Defining Tree Direction
A node can be connected to other nodes through outgoing and incoming links. You can call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setexpandonincoming) method to specify which items connected to a node will be regarded as its descendants. If you pass false (default value) then each node will be regarded as a parent of its outgoing links and the items attached to them. If you pass true, the node' incoming links will define its children. Thus this property specifies the parent-children relationship between chart items and respectively the overall direction in which collapsing / expanding is done.
### Expanding a Branch Recursively
Use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setrecursiveexpand) method to specify whether the whole sub-tree starting from a node will be shown when expanding, or only the first level of descendants.
### Custom Expand/Collapse Functionality
The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setexpandbuttonaction) method lets you override the standard functionality of the [±] button. Set this property to (Markdown/T_com_mindfusion_diagramming_ExpandButtonAction_0.md) and handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#expandbuttonclicked) event if you need to implement your own expand/collapse logic.
## Multiple Diagram Pages
The (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) class represents a collection of diagram pages or sheets, represented by (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) objects. New pages can be added to the document and existing pages can be removed and reordered via the (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md#getpages) collection. The (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md#savetoxml) and (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md#saveto) methods of (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) save all pages in a single file, and respectively the (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md#loadfromxml) and (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md#loadfrom) methods load all pages from the file. (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) can also load files created by the serialization methods of (Markdown/T_com_mindfusion_diagramming_Diagram.md), and will show them in a single page. Note that the opposite is not true: (Markdown/T_com_mindfusion_diagramming_Diagram.md) cannot load directly a (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) file.
(Markdown/T_com_mindfusion_diagramming_DiagramPage.md) is derived from (Markdown/T_com_mindfusion_diagramming_Diagram.md) and only adds a (Markdown/T_com_mindfusion_diagramming_DiagramPage.md#settitle) property, so any code that processes (Markdown/T_com_mindfusion_diagramming_Diagram.md) objects will work with (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) objects too. A diagram document forwards each event raised by its pages, giving you a chance to use the same handler for events raised by different pages. If a page should implement distinct user interaction or validation logic, it is also possible to attach handlers to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md) inherited by (Markdown/T_com_mindfusion_diagramming_DiagramPage.md).
A (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) can be exported to PDF using the new overloads available in the (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md). Other export classes do not support multi-page export at this time, but still can be used to export individual pages via their Export(Diagram) method.
A single (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) could be assigned to the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdiagram) property of (Markdown/T_com_mindfusion_diagramming_DiagramView.md), and that lets you create your own user interface for presenting a list of pages to the user and selecting a current page. The package also includes a (Markdown/T_com_mindfusion_diagramming_DocumentView.md) and (Markdown/T_com_mindfusion_diagramming_TabbedScrollPane.md) classes that presents all pages of a document in a tabbed user interface where each tab corresponds to a page. The page displayed in the active tab is exposed by the (Markdown/T_com_mindfusion_diagramming_DocumentView.md#getcurrentpage) property of (Markdown/T_com_mindfusion_diagramming_DocumentView.md). The active page can be changed interactively by activating its associated tab. New pages can be added and removed to/from the document through buttons in the tab tray and the pages can be rearranged by dragging their associated tabs.
## Components
The following topics are discussed in more details:
(#using-components)
General information on components and how to use them in diagram nodes.
(#standard-component-types)
A complete list and information about the standard JDiagram components, such as (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md), (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md) and (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md).
(#components-and-xml)
How to define components hierarchies in XML and how to load those hierarchies.
(#creating-custom-components)
Information on how to implement and use custom components.
## Using Components
The components in JDiagram are used through an instance of the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) class or a class deriving from (Markdown/T_com_mindfusion_diagramming_CompositeNode.md). Simply create concrete component instances and add them to the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#getcomponents) collection of the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md).
### Arranging Components
By default the composite node arranges its child components on top of each other, in the order they were added to the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#getcomponents) collection. To apply custom arrangement, the children should be organized in a component hierarchy using the appropriate panel components. For example, to arrange children horizontally, in a row, you can use the (Markdown/T_com_mindfusion_diagramming_components_StackPanel.md) with (Markdown/T_com_mindfusion_diagramming_components_StackPanel.md#setorientation) set to (Markdown/T_com_mindfusion_common_Orientation.md). Here is an example on how to do this in code:
```java
StackPanel panel = new StackPanel();
panel.setOrientation(
com.mindfusion.common.Orientation.Horizontal);
panel.setSpacing(1);
TextComponent text = new TextComponent();
text.setText("Hello world!");
panel.getComponents().add(text);
ButtonComponent button = new ButtonComponent();
TextComponent buttonContent = new TextComponent();
buttonContent.setText("Click me!");
button.setContent(buttonContent);
panel.getComponents().add(button);
node.getComponents().add(panel);
```
It is possible to create custom panel classes by deriving from (Markdown/T_com_mindfusion_diagramming_components_ContentComponent.md) and overriding the (Markdown/T_com_mindfusion_diagramming_components_ContentComponent.md#arrangecomponents) method. For an example on how to implement custom panel classes, check the (#creating-custom-components) topic.
Another way to arrange child components is by deriving from (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) and overriding the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#arrangecomponents) method. Then, you can manually assign the position of individual nodes through their (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setbounds) property.
### Finding Components
The (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#findcomponent) method of the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) class can be used to search for components by their (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#getname). This method performs a recursive search of all components in the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#getcomponents) collection and returns a reference to the first component with the specified name. This is particularly useful when the component hierarchy is defined through XML and you need to obtain a reference to a specific component in the hierarchy for additional processing. For more information on how to define components in XML check (#components-and-xml).
### Hit-testing Components
To retrieve the topmost component at a specific location, use the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#getcomponentat) method of the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) class. This method ignores components with any of the following properties set to false: (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#getisenabled), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#getishittestvisible).
## Standard Component Types
The following image illustrates the standard components using the default appearance settings. Additional information about the individual components can be found below.
### Border Components
The border components can adorn a single component with a border and a background. To nest a more complicated structure within a border, use one of the panel components as a parent. The border component exposes few properties. The (Markdown/T_com_mindfusion_diagramming_components_BorderComponent.md#setbackground) and (Markdown/T_com_mindfusion_diagramming_components_BorderComponent.md#setpen) can be used to define the border appearance. The derived (Markdown/T_com_mindfusion_diagramming_components_ContentComponent.md#setpadding) property can be used to specify the distance between the border sides and the child component. The border child can be assigned through the (Markdown/T_com_mindfusion_diagramming_components_ContentComponent.md#setcontent) property.
### Button Components
The button components represent a clickable button. The button components, similar to the border components, can host a single child component - usually a (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md). The default button appearance is controlled through a set of brush and pen properties - (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setbrush), (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setbrushhovered), (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setbrushpressed), (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setpen), (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setpenhovered) and (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setpenpressed). These properties define the appearance of the button in its different states. An alternative way to define the button appearance is through images by using the (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md#setimagelist) property. In addition the buttons can be custom drawn by handling the (Markdown/T_com_mindfusion_diagramming_components_ButtonComponentListener.md#customdraw) event. When a button component is clicked, the (Markdown/T_com_mindfusion_diagramming_components_ComponentMouseEventListener.md#mouseclicked) event is raised.
### CheckBox Components
The check box components represent specialized buttons with an additional state - checked. The appearance of the check box in its checked state can be customized through the (Markdown/T_com_mindfusion_diagramming_components_CheckBoxComponent.md#setcheckedimagelist). The state can be programmatically get or set through the (Markdown/T_com_mindfusion_diagramming_components_CheckBoxComponent.md#ischecked) property.
### Text Components
Text components can display static text. Text components expose an array of properties for customizing the appearance of the displayed text, including (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md#setfont), (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md#settextcolor), (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md#settextformat) and (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md#setbackground). The text of the text components can be specified through the (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md#settext) property.
### Edit Components
The edit components display editable text content and are analogous to the WinForms text boxes. The following properties define the appearance of the text within the component - (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#setfont), (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#settextcolor), (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#settextwrapping). In order to edit the text in an edit component, the component has to have keyboard input. This is achieved by setting (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setisfocused) to true. The user can focus an edit component by clicking on it with the left mouse button. To enable single line edit mode set (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#setacceptsreturn) to false.
The edit components expose several events, most notably - (Markdown/T_com_mindfusion_diagramming_components_EditComponentListener.md#textchanging) and (Markdown/T_com_mindfusion_diagramming_components_EditComponentListener.md#textchanged).
### Selection
The current selection of the edit component is defined through the (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#setselectionstart) and (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#setselectionlength) properties. The appearance of the selection is defined through the (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#setselectioncolor), (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#setinactiveselectioncolor) and (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md#sethideselection) properties.
### Undo/Redo
The edit components implement undo and redo internally. To undo the most recent changes press CTRL+Z while the edit component has the input focus. To redo the changes, press CTRL+Y.
### Clipboard
All standard Clipboard operations are supported and can be accessed through the usual keyboard shortcuts: Copy - CTRL+C, Cut - CTRL+X, Paste - CTRL+V.
### NumericEdit Components
The numeric edit components are similar to the generic edit components. The main difference is that the numeric edits (as the name suggests) allow only numeric input. In addition to the standard edit events, the numeric edits also expose the more specialized (Markdown/T_com_mindfusion_diagramming_components_NumericEditComponentListener.md#validatevalue) and (Markdown/T_com_mindfusion_diagramming_components_NumericEditComponentListener.md#valuechanged) events. The numeric components support undo, redo and clipboard as well.
### Image Components
The image components display an image in different alignment modes. The image and alignment can be specified through the (Markdown/T_com_mindfusion_diagramming_components_ImageComponent.md#setimage) and (Markdown/T_com_mindfusion_diagramming_components_ImageComponent.md#setimagealign) properties respectively.
### Shape Components
The shape components can display arbitrary geometrical shapes. Any shape defined through a (Markdown/T_com_mindfusion_diagramming_Shape.md) object can be used, including all (#table-of-predefined-shapes). The shape components can also be initialized using the specialized geometry syntax when defined in XML. For more information regarding this, check (#components). The appearance of the displayed shape is specified through the (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md#setbrush) and (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md#setpen) properties and the shape itself is assigned through the (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md#setshape) property.
### Slider Components
The slider components provide a way to interactively select a single numeric value or a range of numeric values from within a fixed interval, by dragging one or more thumbs along a horizontal rail. In addition the slider component provides two buttons which can be used to adjust the value more precisely. The type of the slider component can be specified through the (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md#settype) property. The interval of available values can be set through the (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md#setminimum) and (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md#setmaximum) properties. The selected values can be get or set through the (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md#setvalue), (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md#setstartvalue) and (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md#setendvalue) properties respectively depending on the type of the slider. The components expose a set of events, which are raised when the slider values are changed interactively. These events are (Markdown/T_com_mindfusion_diagramming_components_SliderListener.md#batchvaluechanged), (Markdown/T_com_mindfusion_diagramming_components_SliderListener.md#endvaluechanged), (Markdown/T_com_mindfusion_diagramming_components_SliderListener.md#startvaluechanged), and (Markdown/T_com_mindfusion_diagramming_components_SliderRailListener.md#valuechanged).
### Spinner Components
The spinner components represent a composition of a numeric edit box and two buttons. In addition to the core functionality provided by the numeric edit, the value can also be adjusted through the buttons or by pressing the Up, Down, PageUp and PageDown keys while the edit has the input focus. The interval in which the value can vary is specified through the (Markdown/T_com_mindfusion_diagramming_components_SpinnerComponent.md#setminimum) and (Markdown/T_com_mindfusion_diagramming_components_SpinnerComponent.md#setmaximum) properties. The current value can be accessed through the (Markdown/T_com_mindfusion_diagramming_components_SpinnerComponent.md#setvalue) property. The events that are raised when the value is changed are (Markdown/T_com_mindfusion_diagramming_components_SpinnerComponentListener.md#valuechanged) and (Markdown/T_com_mindfusion_diagramming_components_SpinnerComponentListener.md#batchvaluechanged).
### Simple Panels
The most basic of all three built-in panels. Simple panels arrange their child components on top of each other, in the order they were added in the (Markdown/T_com_mindfusion_diagramming_components_ContainerComponent.md#getcomponents) collection. The children are positioned within the available space according to their (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#sethorizontalalignment), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setverticalalignment), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setwidth) and (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setheight).
### Stack Panels
Stack panels arrange their children in a vertical or horizontal row, according to the value of the (Markdown/T_com_mindfusion_diagramming_components_StackPanel.md#setorientation) property.
### Grid Panels
Grid panels arrange their children in a table. The rows and columns of this table are defined through GridRow and GridColumn objects which are added to the (Markdown/T_com_mindfusion_diagramming_components_GridPanel.md#getrows) and (Markdown/T_com_mindfusion_diagramming_components_GridPanel.md#getcolumns) collection of the (Markdown/T_com_mindfusion_diagramming_components_GridPanel.md) respectively. Each grid panel needs to define at least one column and row in order to be effective. The destination row and column of individual child components depends on the value of their (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setgridrow) and (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setgridcolumn) properties.
## Components and XML
As described in the (#using-components) topic, to use components in JDiagram you need to instantiate them and add them to the (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#getcomponents) collection of a (Markdown/T_com_mindfusion_diagramming_CompositeNode.md). JDiagram provides a more convenient method for defining component hierarchies - through XML.
### Definition
Each node in the source XML represents a component or an object. The child nodes in the XML represent child components. The XML attributes represent either property assignments or event handler attachments. A simple component hierarchy defined in XML is illustrated below:
```
```
Because the XML documents have a single root, the component hierarchies defined through XML can have a single root too. In the case when a hierarchy needs to have more than one root each root can be defined in its own XML or all the root components can be grouped under a single component container.
As is observed in the sample above the components can be specified through shortcut names. The following table lists all available shortcuts:
| **Component
** | **Shortcut Name
**
| (Markdown/T_com_mindfusion_diagramming_components_BorderComponent.md)
| Border
| (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md)
| Button
| (Markdown/T_com_mindfusion_diagramming_components_CheckBoxComponent.md)
| CheckBox
| (Markdown/T_com_mindfusion_diagramming_components_EditComponent.md)
| Edit
| (Markdown/T_com_mindfusion_diagramming_components_ImageComponent.md)
| Image
| (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md)
| Shape
| (Markdown/T_com_mindfusion_diagramming_components_TextComponent.md)
| Text
| (Markdown/T_com_mindfusion_diagramming_components_NumericEditComponent.md)
| NumericEdit
| (Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md)
| Slider
| (Markdown/T_com_mindfusion_diagramming_components_SpinnerComponent.md)
| Spinner
The components can also be defined using their full names.
### Composite Properties
Some properties have too complex values and cannot be represented with attributes. Consider for example the collection properties, such as the (Markdown/T_com_mindfusion_diagramming_components_GridPanel.md#getcolumns) and (Markdown/T_com_mindfusion_diagramming_components_GridPanel.md#getrows) properties of the (Markdown/T_com_mindfusion_diagramming_components_GridPanel.md). These properties can be defined as child nodes using the specialized syntax illustrated below:
```
```
For example, to define (Markdown/T_com_mindfusion_diagramming_components_ContentComponent.md#setcontent) of a (Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md), you can use the following syntax:
```
```
### Images
Images can be defined in XML using Bitmap objects and string paths. Here is an example:
```
Images/MyImage.png
```
In the example above "Images/MyImage.png" will be interpreted as an image path and the loader will attempt to create a new java.awt.Image instance by passing the file path to the Toolkit.getImage method.
### Shapes
The (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md#setshape) of shape components can be defined in XML by either specifying the name of a (#table-of-predefined-shapes) or by using the specialized syntax for graphical paths. The example below defines two (Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md) instances in a (Markdown/T_com_mindfusion_diagramming_components_StackPanel.md). The first shape component uses the predefined Ellipse shape and the second uses a custom arrow shape:
```
```
The specialized graphical path syntax supports the following subset of operations:
| **Command
** | **Description
**
| MX,Y
| Moves to point (X, Y).
| LX,Y
| Draws a line from the current point to point (X, Y).
| CX1,Y1 X2,Y2 X3,Y3
| Draws a curve from the current point to (X3, Y3) using points (X1, Y1) and (X2, Y2) as control points.
| AW,H R A D X,Y
| Draws an arc with size (W, H) using rotation R and an end point (X, Y). A specifies whether to draw the large arc (1 - large arc, 0 - small arc) and D specifies direction - (1 - positive angle, 0 - negative).
| z
| Closes the figure.
### Loading XML
Component hierarchies defined in XML can be loaded using the (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md) class. The class provides several static (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md#load) method overloads for loading XML from different sources - a content string, Stream or XML Document. Each of the Load methods returns a (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md) representing the root of the loaded hierarchy. This component can then be added to a (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) or as a child of another component. The following example illustrates how to use the (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md):
```csharp
CompositeNode node = new CompositeNode();
node.getComponents().add(XmlLoader.load(""));
```
### Handling Events
Unlike MindFusion.Diagramming libraries for other platforms, Java version cannot attach handlers to events by names specified in XML. Instead, you will have to add an event listener explicitly after loading a template:
```
```
```java
ButtonComponent button = (ButtonComponent)node.findComponent("Button");
button.addComponentMouseEventListener(
new ComponentMouseEventAdapter()
{
@Override
public void mouseClicked(Object sender, ComponentMouseEvent e)
{
EditComponent edit = (EditComponent)node.findComponent("Edit");
edit.setText("click");
}
});
```
### Resolving Types
The (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md) is capable of resolving external (non-component) types found in the source XML by calling Class.forName. However, this can be slow in certain scenarios. In addition certain types might not resolve properly because the loader always uses the first type that matches the specified name regardless of namespace. For these reasons, the (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md) provides means to manually resolve external types. In order to take advantage of this, you have to implement the (Markdown/T_com_mindfusion_diagramming_components_TypeResolver.md) interface and pass an instance of your class to the corresponding (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md#load) overload. For any external type found, the loader will invoke the (Markdown/T_com_mindfusion_diagramming_components_TypeResolver.md#resolvetype) method. If the method returns null the loader will attempt to resolve the type using its default logic.
### Error Handling
It is not unusual for the (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md) to throw an exception when loading components from XML. There are many reasons for this to happen, including ill-formatted XML. Therefore it is recommended to always try and catch exceptions when loading components from XML.
## Creating Custom Components
### Custom Component
In order to create a custom component, simply derive from any of the built-in component classes, ultimately from the (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md) class. Usually you will want to override the (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#draw) method to render the component and eventually the (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#getdesiredsize) method. A simple custom component is illustrated below:
```java
import java.awt.Color;
import java.awt.Graphics2D;
import com.mindfusion.diagramming.RenderOptions;
import com.mindfusion.diagramming.components.ComponentBase;
public class RectangleComponent extends ComponentBase
{
@Override
public void draw(Graphics2D g2d, RenderOptions options)
{
g2d.setPaint(Color.RED);
g2d.draw(getBounds());
}
}
```
The above component only renders a red rectangle.
To provide custom component behavior based on the user input, override the (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#onmousedown), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#onmouseup), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#onmousemove), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#onkeydown), (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#onkeyup) and (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#onkeypress) methods.
## Custom Panel
To create a custom container component, you need to derive from the (Markdown/T_com_mindfusion_diagramming_components_ContainerComponent.md) class and override the (Markdown/T_com_mindfusion_diagramming_components_ContainerComponent.md#arrangecomponents) method and possibly the (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#getdesiredsize) method. From within the (Markdown/T_com_mindfusion_diagramming_components_ContainerComponent.md#arrangecomponents) method you position the individual child components by assigning values to their (Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md#setbounds) property according to their desired size and the arrangement logic of the panel. Below you can find the implementation of a very simple custom panel class, which arranges its children with a constant offset relative to each other.
```java
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Rectangle2D.Float;
import com.mindfusion.diagramming.XDimension2D.Double;
import com.mindfusion.diagramming.components.ComponentBase;
import com.mindfusion.diagramming.components.ContainerComponent;
public class OffsetPanel extends ContainerComponent
{
@Override
public void arrangeComponents(Float availableSpace, Graphics2D g2d)
{
float y = 0;
for (ComponentBase component : getComponents())
{
// calculate the desired size of the component
Double availableSize = new Double(availableSpace.getWidth(), availableSpace.getHeight());
Double desiredSize = component.getDesiredSize(availableSize, g2d);
component.setBounds(
new Rectangle2D.Float(
y, y, (float)desiredSize.getWidth(), (float)desiredSize.getHeight()));
component.arrangeComponents(component.getBounds(), g2d);
y += 2;
}
}
@Override
public Double getDesiredSize(Double availableSize, Graphics2D g2d)
{
double width = 0;
double height = 0;
double y = 0;
for (int i = 0; i < getComponents().size(); i++)
{
ComponentBase component = getComponents().get(i);
Double desiredSize = component.getDesiredSize(availableSize, g2d);
width = Math.max(width, desiredSize.getWidth() + y);
height = Math.max(height, desiredSize.getHeight() + y);
y += 2;
}
return new Double(width, height);
}
}
```
### Using Custom Components in XML
If you want to use custom components in XML you may need to supply a custom (Markdown/T_com_mindfusion_diagramming_components_TypeResolver.md) object to the loader. This is especially true if you want to use shortcut names for your components. Consider the above RectangleComponent in the following example:
```
```
Loading this XML will fail unless you supply an (Markdown/T_com_mindfusion_diagramming_components_TypeResolver.md), which can resolve "Rectangle" to RectangleComponent.
## User Interaction
## Controlling User Interaction
There are several ways to control user actions on the document as a whole or on the separate items.
### Specify How User Actions are Interpreted
The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) property provides several predefined sets of rules specifying how user input with the mouse/keyboard is interpreted interaction with the touch screen is interpreted. If set to (Markdown/T_com_mindfusion_diagramming_Behavior_0.md), drawing over an empty document area is processed as a (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) creation request and drawing over a node creates a link. Note that such behavior leads to some extra work when creating overlaying nodes - users need to draw the second node on an empty area and move it over the first one afterwards. If you want to avoid that you should use the (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) behavior. If (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) is set, drawing over an empty area creates a table, and dragging over a table creates an link. (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getbehavior) options also include (Markdown/T_com_mindfusion_diagramming_Behavior_0.md), (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) and (Markdown/T_com_mindfusion_diagramming_Behavior_0.md).
### Setting Diagram Bounds
Document size can be get or set with the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getbounds) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbounds) methods respectively. By default, users are able to move items outside document bounds. To prevent this use (Markdown/T_com_mindfusion_diagramming_Diagram.md#setrestrictitemstobounds) method. It provides three RestrictToBounds options to restrict item positions. They might not be restricted at all. The most restrictive option is to keep items entirely inside the document area. Another option allows items to be partially outside the document area but having at least a small visible part inside.
### Item Constraints
Constraints upon how users are allowed to modify a node are set through the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setconstraints) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setenabledhandles) methods. The former can be used to constrain the move direction, node size and aspect ratio. The latter enables or disables specific manipulation handles of a node. That allows making the node non-moveable, non-resizable, or resizable only horizontally/vertically.
Items can be locked by the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setlocked) method. Locked items are excluded from selection and users cannot select, move or modify them.
### Control How Links Connect to Nodes
You can specify whether a (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) accepts incoming and outgoing links by using the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setallowincominglinks) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setallowoutgoinglinks) methods respectively.
Anchor points define where link's ends should be placed when a user attaches a link to a node. A pattern of anchor points can be assigned to a node by calling the node's (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setanchorpattern) method. To specify whether link ends are aligned to anchor points when creating or modifying links use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setsnaptoanchor) method.
You can forbid users to move links' end points by calling (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinkendsmovable) passing false. This can also be controlled on a per-link basis through (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setallowmoveend) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setallowmovestart) methods.
The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setallowselfloops) method enables or disables drawing of reflexive links. They are allowed by default, but can be disabled if you consider them meaningless for your application. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setallowlinksrepeat) method can be used to control if two nodes can be linked more than once in the same direction.
### In-place Text Editing
The text of nodes and tables can be edited in-place by double-clicking the respective items. To enable the feature invoke the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setallowinplaceedit) method passing true as its argument. For tables, both captions and cells can be edited in this way. Call the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#celltextediting) method to enable/disable in-place editing per cell. Depending on the type of item being edited, one of these events can be fired when editing completes: (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodetextedited), (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#celltextedited).
In-place editing mode is exited when users click outside the text entry control or by pressing the ENTER or ESC keys if respectively (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditacceptonenter) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditcancelonesc) are called.
### Validation Events
When users try to create, delete or select an item one of the following events is fired. To ban the action, set corresponding event boolean argument to false:
| **Event
** | **Description
**
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodecreating)
| Raised while a user draws a new node.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkcreating)
| Raised while a user draws a new link.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodeselecting)
| Raised when the user is trying to select a node.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkselecting)
| Raised when the user is trying to select a link.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodedeleting)
| Raised when the user is trying to delete a node.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkdeleting)
| Raised when the user is trying to delete a link.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodemodifying)
| Raised while a user modifies an existing node.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkmodifying)
| Raised while a user modifies an existing link.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodetextediting)
| Raised while a user makes changes to the text of a node.
| (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linktextediting)
| Raised while a user makes changes to the text of a link.
For more events that can be fired by user actions, please, visit the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md) section of the documentation.
### Miscellaneous
- To enable items to be automatically selected when they are created, call (Markdown/T_com_mindfusion_diagramming_Diagram.md#setselectaftercreate) passing true.
- The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getmodifierkeyactions) property allows assigning different functions to the CTRL, ALT and SHIFT keys.
- The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setrightbuttonactions) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmiddlebuttonactions) properties let you change the function of respective mouse buttons.
## Single and Multiple Selection
### Selecting and Modifying Items
In order to move or modify a diagram element, users manipulate its modification handles. Modification handles appear around an item when it is selected. Each handle can be dragged to perform specific transformation on the item. The appearance and behavior of modification handles can be altered by calling the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#sethandlesstyle) method. You can also invoke the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmodificationstart) method to make those handles appear automatically for non-selected items when the mouse pointer hovers over them.
### Active Item
If only one diagram item is selected, it is considered the 'active' item. One of the items in a multiple-selection is also regarded as active; it is usually the one selected last. The active item has white modification handles drawn around it, while other items in multiple-selection have gray handles. The active item is probably the one, users are most interested in while editing a diagram, and your program can update its state and user-interface according to that. Access to the active item is provided through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getactiveitem) method of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class.
### Multiple Selection
Selection of diagram objects in JDiagram is represented by an instance of the (Markdown/T_com_mindfusion_diagramming_Selection.md) class. This class provides methods to programmatically select or deselect items, as well as methods that modify how the selection looks and behaves. The selected items within the current document can be obtained through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getselection) method of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class. Multiple items can be selected, thus moved at the same time. To programmatically add or remove items to the multiple-selection invoke one of the (Markdown/T_com_mindfusion_diagramming_Selection.md#additem), (Markdown/T_com_mindfusion_diagramming_Selection.md#toggle) and (Markdown/T_com_mindfusion_diagramming_Selection.md#removeitem) methods. The (Markdown/T_com_mindfusion_diagramming_Selection.md#clear) method deselects all items and the (Markdown/T_com_mindfusion_diagramming_Selection.md#change) method selects a single item deselecting all other. To disable multiple selection, pass false to (Markdown/T_com_mindfusion_diagramming_Selection.md#setallowmultipleselection).
### Appearance
The visual style of multiple-selection can be modified by the setStyle method of the (Markdown/T_com_mindfusion_diagramming_Selection.md) class. For example selection might be painted as a dashed rectangle or a semi-transparent filled rectangle. Another method related to selection visualization is the (Markdown/T_com_mindfusion_diagramming_Diagram.md)'s (Markdown/T_com_mindfusion_diagramming_Diagram.md#setselectionontop), which can be used to specify whether selected items should be painted according to their Z-order position or they should be painted on top of the non-selected items.
### Enumerating Items
The (Markdown/T_com_mindfusion_diagramming_Selection.md) class exposes the selected items as lists of items. The selected items from a particular class can be accessed through the corresponding method. To get the list of all selected nodes and links, use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlinks) methods. You can obtain a list with all selected items, disregarding class, by invoking the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getitems) method. Alternatively you might enumerate all items in the diagram and call their (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getselected) method.
### Automatic Selection
To enable automatic selection of newly created objects, call (Markdown/T_com_mindfusion_diagramming_Diagram.md#setselectaftercreate) passing true.
## Automatic Alignment
The following features help the user align items interactively.
### Alignment Grid
Items are aligned to a grid when (Markdown/T_com_mindfusion_diagramming_Diagram.md#setaligntogrid) is enabled. More information is available in the (#alignment-grid) topic.
### Align nodes to nodes
If (Markdown/T_com_mindfusion_diagramming_Diagram.md#setautoalignnodes) is enabled, the node currently being drawn or resized is aligned to another node so that a pair of their vertical or horizontal sides become collinear. To specify the maximal distance at which nodes are aligned, set the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setautoaligndistance) property. The pair of aligned nodes is indicated visually by drawing an alignment guide using the pen assigned to (Markdown/T_com_mindfusion_diagramming_Diagram.md#setalignmentguidepen).
### Snap links to nearby nodes
The currently drawn or modified link can automatically snap to the nearest border point of the nearest node when (Markdown/T_com_mindfusion_diagramming_Diagram.md#setautosnaplinks) is set. The maximal distance at which links will connect to a nearby node is set via (Markdown/T_com_mindfusion_diagramming_Diagram.md#setautosnapdistance).
## Clipboard Operations
A single diagram item or a selection of items can be copied or cut to the system clipboard. This is done programmatically using the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#copytoclipboard) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#cuttoclipboard) methods. To paste the clipboard contents into the current diagram call (Markdown/T_com_mindfusion_diagramming_DiagramView.md#pastefromclipboard).
If you create a custom item type, its instances can be copied to the clipboard only if they are registered for serialization using (Markdown/T_com_mindfusion_diagramming_Diagram.md#registeritemclass) and provide a copy constructor. If the class defines additional fields, they must be serialized by the respective save / load method overrides to allow copying their values to the clipboard.
JDiagram does not provide keyboard interface to clipboard operations. You might assign the standard CTRL+C, CTRL+X and CTRL+V shortcuts to menu items and handle them by calling the respective methods.
## Scrolling and Zooming
### Enable Scrolling
To enable scrolling, add the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) instance to a JScrollPane container or to a (Markdown/T_com_mindfusion_diagramming_Ruler.md).
### Diagram Size
The diagram size is specified through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbounds) property. Its value is a Rectangle2D instance that specifies the origin of the diagram coordinate system and the diagram size. The scrollbar ranges also depend on the current (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getzoomfactor).
### Automatic Scrolling
The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setautoscroll) method enables or disables automatic scrolling. When a user drags a modification handle outside JDiagram visual area while manipulating an item, if automatic scrolling is enabled, the control will scroll its view towards the pointer position. The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setscrollzonesize) property defines the size of the area near the view borders that triggers automatic scrolling.
### Programmatic Scrolling
To scroll the document contents programmatically, you can use one of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#scrollto), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setscrollx) or (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setscrolly) methods. To get the current scroll position, call (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getscrollx) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getscrolly). The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#bringintoview) method scrolls the viewport to ensure that a specific diagram item can be seen in the view.
### Scrolling Nodes
The contents of nodes such as (Markdown/T_com_mindfusion_diagramming_ContainerNode.md), (Markdown/T_com_mindfusion_diagramming_TableNode.md) and (Markdown/T_com_mindfusion_diagramming_TreeViewNode.md) can be scrolled too. Set a container's (Markdown/T_com_mindfusion_diagramming_ContainerNode.md#setscrollable) property to allow scrolling, with (Markdown/T_com_mindfusion_diagramming_ContainerNode.md#setautogrow) disabled to let the container's contents overflow. If a table's (Markdown/T_com_mindfusion_diagramming_TableNode.md#setscrollable) property is set to true, there are up/down scroll buttons displayed in the table's caption bar. By clicking these buttons users can scroll the rows of the table. Scrolling can also be done programmatically using the (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcurrentrow) property.
### Zooming
Zooming is controlled by the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setzoomfactor) method. The zoom factor is expressed as a percentage, 100% meaning no zoom. Higher than 100% makes the diagram items look closer and bigger on the screen - zooming in. Less than 100% makes items look further and smaller on screen - zooming out. To zoom and scroll the view to fit the diagram contents to the control's client area, call (Markdown/T_com_mindfusion_diagramming_DiagramView.md#zoomtofit). To zoom and scroll the view so it fits a specified rectangular document area to the control's client area, call (Markdown/T_com_mindfusion_diagramming_DiagramView.md#zoomtofit)Rectangle2D[)](Markdown/T_com_mindfusion_diagramming_DiagramView.md#zoomtofit).
### Lasso Zoom Tool
The control supports several ways to zoom using lasso tool:
- Set the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) property to (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) to always draw zoom lasso.
- Set the (Markdown/T_com_mindfusion_diagramming_ModifierKeyAction.md) flag for one of the keys in (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getmodifierkeyactions) to let users draw zoom-lasso with respective modifier key pressed and the left mouse button.
- Assign (Markdown/T_com_mindfusion_diagramming_MouseButtonAction.md) value to (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setrightbuttonactions) or (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmiddlebuttonactions) property to zoom using respective mouse button.
### Magnifying
The (Markdown/T_com_mindfusion_diagramming_DiagramView.md) provides an option for zooming in (or out) portions of the diagram through the Magnifier tool. The magnifier tool can be permanently activated by calling (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmagnifierenabled). Alternatively, on-demand magnification through a (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) value to the view's (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) property.
The magnification factor can be specified by calling the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmagnifierfactor) method. The size of the tool and its border thickness can be set through the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmagnifierwidth), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmagnifierheight) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmagnifierframethickness) properties.
### Panning
The diagram view can be panned by holding ALT while dragging the mouse with the left button down. To let users pan the view with the left mouse button without using a modifier key, set the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) property of (Markdown/T_com_mindfusion_diagramming_DiagramView.md) to (Markdown/T_com_mindfusion_diagramming_Behavior_0.md). JDiagram displays the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setpancursor) while panning.
## Tool-Tips
Tool-tips are short text messages displayed when the mouse pointer hovers over a diagram item for a while.
Tool-tips can be defined for each diagram element and for the whole document. If the mouse pointer stands still and it points to an item, then the tool-tip of the item is displayed. The tool-tip of the diagram appears if there is no item under the cursor or if there is an item but there isn't any tool-tip text defined for it. To associate a tool-tip with the diagram, use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#settooltip) method. To associate tool-tips with individual items, use (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settooltip).
The tooltips can display HTML content, including links, images and formatted text. To enable this, enclose the tooltips' text between and tags, and then use HTML formatting tags as you would do in a web page.
Tool-tip's text is also used as a value of the ALT attribute of image map areas corresponding to items; see (Markdown/T_com_mindfusion_diagramming_HtmlBuilder.md) for more information.
## In-place Editing the Contents of Items
### Standard in-place editing
To activate the standard in-place editing of the text of JDiagram objects, call the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setallowinplaceedit) method passing true. The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setallowinplaceedit) method allows in-place editing the content of a diagram element by double-clicking it. In-place editing mode can be accepted and exited by clicking anywhere outside the text-field.
If you want to change the way of accepting / rejecting changes, the following DiagramView methods allow using the ENTER and ESC keys to perform that: (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditacceptonenter) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditcancelonesc). When (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditacceptonenter) indicates a true value, pressing the ENTER key causes accepting changes and exiting in-place editing mode. If (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditacceptonenter) indicates false, pressing ENTER inserts a new line in the text while in in-place editing mode. If (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditcancelonesc) passes true, pressing the ESC key performs rejecting changes and exiting in-place editing mode.
In-place editing can be applied to the attributes enabled by the following methods: (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settext), (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settext), (Markdown/T_com_mindfusion_diagramming_Cell.md#settext), (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaption) and (Markdown/T_com_mindfusion_diagramming_ContainerNode.md#setcaption). For tables, both captions and cells can be edited in this way.
If you want to enable/disable in-place editing of a specific table's cell, handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#celltextediting) event. To enable/disable in-place editing of nodes, handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodetextediting) event. For a (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) object, the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linktextediting) event is raised while in-place editing. These validation events let you prevent users from editing the text in the particular object if it is necessary.
When in-place editing of a node is completed, the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodetextedited) event is raised. For a table's cell, handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#celltextedited) event. The (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linktextedited) event is raised when in-place editing of a (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) object completes.
By default, JDiagram creates JTextArea control instance to let users edit item's text. The (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#enterinplaceeditmode) event allows customizing the properties of that control, or attaching event handlers to it. (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#enterinplaceeditmode) specifies the font of the in-place edited text box. The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setinplaceeditfont) method sets the font used to display text in the in-place editing text control.
When leaving in-place editing mode, the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#leaveinplaceeditmode) event is raised. This event is raised in all cases of closing the in-place editing control, for example, when the user accepts or cancels the changes made to an item's text, or when the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#endedit) method is called.
To enter in-place editing mode programmatically and let users edit an item's text inline, call the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#beginedit) method of (Markdown/T_com_mindfusion_diagramming_DiagramView.md). The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#endedit) method exits in-place editing mode.
### In-place editing of custom items
The (Markdown/T_com_mindfusion_diagramming_InplaceEditable.md) interface allows implementing the standard in-place editing for custom defined items. By means of the methods of this interface, you can specify the position of the in-place editing JTextArea control and copy the entered text to a property of the edited item.
The (Markdown/T_com_mindfusion_diagramming_InplaceEditable.md#geteditrect) method returns the destination rectangle of the in-place editing box. (Markdown/T_com_mindfusion_diagramming_InplaceEditable.md#gettexttoedit) represents the initial contents of the in-place editing box. (Markdown/T_com_mindfusion_diagramming_InplaceEditable.md#seteditedtext) sets the edited text to the object after completing the in-place editing.
### Using custom editor controls
Handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#createeditcontrol) event to create a custom in-place editor control. This event is raised if (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getallowinplaceedit) is enabled and the user double-clicks an item, or when the application invokes the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#beginedit) method of (Markdown/T_com_mindfusion_diagramming_DiagramView.md). When the event is raised, set its (Markdown/T_com_mindfusion_diagramming_InPlaceEditEvent.md#seteditcontrol) argument to an instance of your custom editor class. You can use any Java Swing component as editor instead of the default JTextArea. It is your responsibility to set the editor control size and position. For an example, take a look at the InteractiveTable sample project.When the user exits in-place editing mode by clicking outside the editor, MindFusion.Diagramming raises the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#destroyeditcontrol) event. Handle it to transfer the values entered into the editor to the respective properties of the edited item, and finally destroy or hide the editor control.
## Placement and Layout
## Items Placement
### Measure Unit
The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setmeasureunit) method lets you specify the unit of measure for all location and size -related values assigned to JDiagram object attributes by passing as arguments to their methods.
### Location and Size of Nodes
Use the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setbounds) or (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getbounds) methods to change or get the location and size of a node. To move a node without changing its size, call the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#move) method. To change only the size of a node, invoke the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#resize) method. The (Markdown/T_com_mindfusion_diagramming_ShapeNode.md)'s (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#resizetofitimage) and (Markdown/T_com_mindfusion_diagramming_TableNode.md)'s (Markdown/T_com_mindfusion_diagramming_TableNode.md#resizetofitimage) methods set nodes' sizes to fit that of their pictures.
### Links Control Points
Links have two or more control points, depending on their style and segment count. You can get access to the control points by using the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getcontrolpoints) method. You must call (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#updatefrompoints) after moving control points of a link in order to repaint the link and update its internal state variables. The smallest rectangle that bounds all link points can be obtained by calling the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getbounds) method.
### Link Dynamics
Use the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setdynamic) property of a link to enable it to automatically recalculate its end point positions if the nodes connected to the link are moved or resized; the end points are moved in such a way that the link points to the centers of the linked nodes. A related property is (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setautosnaptonode), which can be enabled to make the link end points align to the border of their origin or destination nodes while a user move the link ends.
The (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setretainform) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getretainform) methods are useful for links that have more than two control points. If the nodes connected by a link are moved around, usually only the segments at the ends of that link are updated, so that they stay linked to their respective nodes. In that case all intermediate control points stay where they are. However, if (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setretainform) is enabled, all control points will move simultaneously in a way they preserve their relative position to each other, and thus preserving the overall form of the link.
To enable or disable automatic routing of a link, use the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setautoroute) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getautoroute) methods. Routed links avoid nodes by finding the shortest path between their origin and destination that does not cross any other nodes. The link routing algorithm can be tuned through the attributes accessed by (Markdown/T_com_mindfusion_diagramming_Diagram.md#getroutingoptions). The (Markdown/T_com_mindfusion_diagramming_Diagram.md#getroutelinks) method gets whether newly created links will automatically find their way between nodes. To set links to find their route automatically, call (Markdown/T_com_mindfusion_diagramming_Diagram.md#setroutelinks).
### Interactive Moving or Resizing
End-users of your application can move around or resize diagram objects. They do this by selecting an item and dragging any of its adjustment handles, a point inside its interior, any of it sides or a selection frame. The way diagram nodes can be interacted with can be controlled by using the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#sethandlesstyle) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#gethandlesstyle) methods. The handle style also defines the visual representation of selected items on screen. (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setenabledhandles) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getenabledhandles) allow disabling specific manipulations to perform on a node, for example resizing the item horizontally or moving it. If a node is modified interactively, the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodemodified) event is fired. When the user moves any control point of a link, the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linkmodified) event is raised.
### Controlling the Z-order
The Z-order defines how items are ordered on the Z-axis so that one looks above or below another. Members of the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) class give you full control over the Z-order. To move an item one level up or down, invoke the zLevelUp or zLevelDown methods. To move an item to the bottom of the Z-order, call its zBottom method. To move the item in front of all others, call its zTop method. You can use the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setzindex) or (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getzindex) method to get or set the index of an item in the Z-order array.
## Alignment Grid
JDiagram provides an alignment grid to help users place diagram items more precisely. To activate the grid, use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setaligntogrid) method. If the grid is active while an item is being created or modified, the item's control-points are aligned to the nearest grid points. The distance between adjacent grid points is set by calling the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridsizex) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridsizey) methods. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridoffsetx) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridoffsety) properties allow specifying the horizontal and vertical offset of the first point in the alignment grid.
Items created or modified by a user are automatically aligned to the grid. However, if items are placed in the diagram programmatically, their coordinates are set to the specified positions without aligning. In such cases use (Markdown/T_com_mindfusion_diagramming_Diagram.md#alignpointtogrid) if items must be placed exactly at grid points.
The method (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshowgrid) can be used to turn the grid visible or invisible. The color and style of a visible grid can be adjusted through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridcolor) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridstyle) methods respectively.
## Lanes Grid
The classes from the (#commindfusiondiagramminglanes) namespace let you develop process maps and swimlane diagrams, useful in business process planning and reporting. Processes consist of consecutive operations accomplished by people involved, technical installations, means of contact, and flow of information. The swimlane grid features allow indicating and arranging related diagram items in complicated processes and systems, that is, Swim lane diagrams (known as Rummler-Brache diagram), Gantt Charts (planning and scheduling of projects). A lane in the grid can visually contain nodes, links, shapes or images, that represent tasks fulfilled in specified periods of time by people, companies or departments.
The (#commindfusiondiagramminglanes) namespace provides the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md), (Markdown/T_com_mindfusion_diagramming_lanes_Header.md), (Markdown/T_com_mindfusion_diagramming_lanes_HeaderList.md) and (Markdown/T_com_mindfusion_diagramming_lanes_Style.md) classes, the (Markdown/T_com_mindfusion_diagramming_lanes_ICell.md) interface and the (Markdown/T_com_mindfusion_diagramming_lanes_ResizeType.md) enumeration. These types expose additional properties and methods that let you define your own grids as required by your application logic. Grids can include varying number of lanes, divided into child rows and columns whose intersections form cells. The cells color and style can be customized too.
Use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setenablelanes) property of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class to display lanes in your application. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlanegrid) lets you setup the rows and columns in the grid by defining horizontal and vertical lanes, where each lane can be titled by its own header and/or subheadings. The grid can be resized by setting the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#setcolumncount) and (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#setrowcount) properties or by adding headers to the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcolumnheaders) and (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getrowheaders) collections. A column or row can be divided into child elements by adding to the (Markdown/T_com_mindfusion_diagramming_lanes_Header.md#getsubheaders) collection of a (Markdown/T_com_mindfusion_diagramming_lanes_Header.md), which lets you form a complex hierarchy of unlimited depth. The intersection of rows and columns can be either a simple cell for bottommost elements in the hierarchy, or a group of cells for parent rows and columns. Cells or cell groups can be accessed via the grid class (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#get) method, that lets you index cells either by their integer positions, or by their (Markdown/T_com_mindfusion_diagramming_lanes_Header.md) objects.
If the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#setallowresizeheaders) property of the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md) class is enabled, users can resize the grid columns and rows as desired. (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setlanecolumnresizecursor) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setlanerowresizecursor) properties get or set the mouse cursor shown when resizing the lane column header or the lane row header. (Markdown/T_com_mindfusion_diagramming_lanes_GridListener.md#cellboundschanged) event is raised when a cell is resized. An application can handle this event in order to rearrange or resize nodes so that they stay within a specific column or row of the grid.
The position of the grid and grid headers within the diagram is defined via (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#settopmargin) and (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#setleftmargin), which specify the grid offset relative to (Markdown/T_com_mindfusion_diagramming_Diagram.md#getbounds). (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#sethookheaders) enables lane headers to be anchored to the left or right side of the control's visible area. The sizes of headers at different levels in the lane hierarchy can be set in a single operation by the RowHeadersWidths and (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcolumnheadersheights) properties.
The appearance of the lanes grid can be customized further via the AlignCells property, which specifies whether cells are aligned to each other, the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#setheadersontop) poperty, which specifies whether headers should appear on top of the Z-order, and the (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#settopleftareastyle) specifying the appearance of the grid's top-left corner.
The (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md) class provides many miscellaneous methods that can be used to find grid elements, for determining their bounds and for hit-testing: (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#findcolumn), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#findrow), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcellbounds), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcellcolumn), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcellfrompoint), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcellrow), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcolumn), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getrow), (Markdown/T_com_mindfusion_diagramming_ExpandHeaderRowCmd.md#getrowindex), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcolumnheaderbounds), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getcolumnindex), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getheaderbounds), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getrowheaderbounds), (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md#getheaderfrompoint).
## Laying out Diagrams Automatically
Applications that process hierarchical or more complex entity-relationship data might need to present that data to end-users in an aesthetical and visually appealing manner. Such applications would store their data as graph of connected nodes possibly having additional information attached to them. However, position and size coordinates of nodes might be unnecessary and/or unavailable. JDiagram provides a way to automatically arrange the nodes of a diagram, applying attractive layouts on the overall structure of the diagram. To utilize that functionality, an application can create a diagram by assigning generic coordinates to its nodes, instantiating a layout object and invoking the layout's (Markdown/T_com_mindfusion_diagramming_AbstractLayout.md#arrange) method. The (Markdown/T_com_mindfusion_diagramming_AbstractLayout.md#arrange) methods can be prevented from changing positions of individual items by setting the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setignorelayout) property of those items to true.
The classes that implement automatic layout algorithms are located in the (#commindfusiondiagramming) namespace. The following sections list the available algorithms categorized by their general implementation strategy: (#force-directed-layout-algorithms), (#topology-based-layout-algorithms) and (#semantics-based-layout-algorithms).
## Force-directed layout algorithms
Force-directed algorithms simulate forces acting between objects in the graph and iteratively run a physical simulation that pulls the objects closer or pushes them apart. At each iteration the energy associated with the simulated system decreases, and the node positions calculated by this process usually lead to evenly distributed nodes and uniform link lengths.
### Spring-Embedder Graph Layout
Spring-Embedder is force-directed layout algorithm. It simulates a physical system in which nodes repulse each other, and the links between them act as confining springs. Graphs processed by Spring-Embedder have their nodes distributed uniformly across the diagram area. The algorithm can be applied on a graph by creating a (Markdown/T_com_mindfusion_diagramming_jlayout_SpringLayout.md) object and calling its (Markdown/T_com_mindfusion_diagramming_SpringLayout.md#arrange) method. (Markdown/T_com_mindfusion_diagramming_jlayout_SpringLayout.md#springlayout-members) allow you to set the desired distance between graph nodes and the number of iteration steps to use while calculating node positions. You can also specify that JDiagram should try to minimize link crossings. If you select that option, the algorithm would produce better result with more iteration steps. However, it needs more time to complete if more steps are specified. Spring-Embedder layout might be applied like this:
```java
import com.mindfusion.diagramming.*;
...
void someMethod()
{
SpringLayout layout = new SpringLayout();
layout.setIterations(500);
layout.setNodeDistance(30);
layout.arrange(diagram);
}
```
### Grid Graph Layout
The (Markdown/T_com_mindfusion_diagramming_GridLayout.md) algorithm arranges diagram nodes in a grid, keeping connected nodes close together. The algorithm strives to achieve a small number of link crossings. It is based on an iterative process whose initial steps shuffle the grid nodes randomly. That can lead to very different results each time the algorithm is run. To apply the layout to a diagram, create a (Markdown/T_com_mindfusion_diagramming_GridLayout.md) instance, set its members and invoke the (Markdown/T_com_mindfusion_diagramming_jlayout_GridLayout.md#arrange) method. The grid layout might be applied like this:
```java
import com.mindfusion.diagramming.*;
...
void someMethod()
{
com.mindfusion.diagramming.GridLayout layout =
new com.mindfusion.diagramming.GridLayout();
layout.setGridSize(75);
layout.arrange(diagram);
}
```
### Simulated Annealing Graph Layout
The (Markdown/T_com_mindfusion_diagramming_AnnealLayout.md) class implements the Simulated Annealing graph layout algorithm. Simulated Annealing is a general-purpose optimization method used to solve large-scale combinatorial problems by simulating the process of heating and cooling of metal to achieve freedom from defects. Finding a nice arrangement of a graph is a combinatorial problem that can be reduced to assigning costs to graph configurations and finding the minimum cost configuration. (Markdown/T_com_mindfusion_diagramming_AnnealLayout.md) assigns costs to graph configurations by evaluating different aesthetic criteria such as distance between nodes, length of links and the number of link crossings. Thus the best configuration found will have good aesthetic properties.
### Circular Graph Layout
(Markdown/T_com_mindfusion_diagramming_CircularLayout.md) distributes nodes evenly on the circumference of a circle at positions that result in as few link crossing as possible. Set its (Markdown/T_com_mindfusion_diagramming_CircularLayout.md#setradius) attribute to specify the size of the layout circle. Set (Markdown/T_com_mindfusion_diagramming_CircularLayout.md#setsiftingrounds) to set the umber of fine-tuning crossing-reduction iterations.
## Topology based layout algorithms
The following algorithms are based on the topological features of the graph being arranged, such as the size and adjacency of faces (a face is a region bounded by links) and the overall direction of links. The algorithms differ in the shape they apply to graph faces and the manner in which faces are embedded in the plane.
### One-way Graph Layout
The (Markdown/T_com_mindfusion_diagramming_OneWayLayout.md) class ensures that links enter into nodes from the same general direction and exit them from the opposite side. If the graph contains cycles, some links bend around the nodes to keep the enter/exit direction consistent. The algorithm aims to minimize the number of such links.
### Orthogonal Graph Layout
The (Markdown/T_com_mindfusion_diagramming_OrthogonalLayout.md) class implements an orthogonal graph layout algorithm. Each link is drawn as a chain of alternating horizontal and vertical segments. Nodes are placed in a way that facilitates few links bends and crossings. This algorithm was designed for planar graphs where the nodes have at most four incident links, and produces best results with such graphs as input. It can arrange any arbitrary graph as well, by adding some dummy nodes and links to planarize the graph and reduce its vertex degree, and removing them after the layout. However this might lead to using larger area than necessary, due to the space occupied by dummy elements.
### Orthogonal Router
(Markdown/T_com_mindfusion_diagramming_OrthogonalRouter.md) is a secondary layout algorithm that can be used to arrange links after an initial node arrangement has already been applied. The orthogonal layout is useful when there are much more links than nodes in a graph. The algorithm strives to achieve the following criteria, while preserving as much of the initial node configuration as possible.
- links must not overlap;
- only vertical and horizontal routing lines are used;
- graph routing is performed with respect to the specified main layout direction;
- links crossings are minimized;
- bends are minimized;
### Topological Layout
If the underlying graph if acyclic, (Markdown/T_com_mindfusion_diagramming_TopologicalLayout.md) arranges the nodes linearly in such a way that each node comes before all destination nodes of its outgoing links. The links are drawn as arcs above the chain of nodes, with their height proportional to the distance between the nodes. If the graph is not acyclic, the layout algorithm finds an ordering with a minimal number of back links, and draws the back links below the chain of nodes.
### Cascading Graph Layout
(Markdown/T_com_mindfusion_diagramming_CascadeLayout.md) places nodes on a virtual grid and arranges links orthogonally, such that if the source graph is planar all links are guaranteed to have no more than two bends and will not intersect. By default the layout method arranges nodes in rows and link segments in columns; this can be changed by setting the Orientation property.### Triangular Graph Layout
(Markdown/T_com_mindfusion_diagramming_TriangularLayout.md) places nodes on a virtual grid, such that if the source graph is planar, all links are guaranteed to have a single segment and not intersect. If the graph is not planar, its intersecting links can be optionally segmented and bended in order to improve readability. The layout method places the nodes from the external face on a triangle and recursively adds the rest of the nodes as vertices of internal triangles. As a result, it is very effective for near maximal-planar (a.k.a. triangular) graphs.
## Semantics based layout algorithms
The following algorithms arrange the diagram in a way that shows the semantics of individual items or the overall graph structure, such as hierarchical relations between objects, loops and decisions in flowcharts, assignments of nodes to layers or swimlanes.
### Tree Layout
If application's data is structured hierarchically, it is appropriate to apply tree layout on it. To do this, create a (Markdown/T_com_mindfusion_diagramming_TreeLayout.md) object and call its (Markdown/T_com_mindfusion_diagramming_TreeLayout.md#arrange) method. Members of (Markdown/T_com_mindfusion_diagramming_TreeLayout.md#treelayout-members) control many aspects of the layout process. The type of layout can be directional or radial. You can choose how much space to leave between tree levels and between nodes on the same level. For directional layouts the style of links in the arranged tree can be set to straight, orthogonal or curved. Global tree direction and alignment can be customized too. The tree layout might be applied as shown below:
```java
import com.mindfusion.diagramming.*;
import com.mindfusion.diagramming.jlayout.*;
...
void someMethod()
{
TreeLayout layout = new TreeLayout();
layout.setType(TreeLayoutType.Cascading);
layout.setDirection(TreeLayoutDirection.LeftToRight);
layout.setLinkStyle(TreeLayoutLinkType.Cascading2);
layout.setLevelDistance(10);
layout.arrange(diagram);
}
```
### Fractal Tree Layout
(Markdown/T_com_mindfusion_diagramming_FractalLayout.md) is a tree layout algorithm that places child nodes symmetrically around their parent node. Nodes at the lowest level are arranged directly in a circle around their parent. At the upper level, the already arranged nodes form branches that are arranged in a circle around the new parent node. The algorithm is recursively repeated till the highest level is reached. If nodes in the tree have uniform number of children, the end result has fractal-like appearance (subsets of the graph look like scaled-down copies of the whole graph).
You can choose which node should be displayed at the center of the topmost circle by setting the (Markdown/T_com_mindfusion_diagramming_FractalLayout.md#setroot) property. If it is not specified, the algorithm automatically selects a root that leads to more balanced distribution of nodes.
### Layered Graph Layout
The (Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayout.md) algorithm arranges diagram nodes in layers according to several criteria, most important of which are: connected nodes must be placed close together; links must flow in one direction if possible; links must cross as few layers as possible; links must not cross other links. To apply the layout to a diagram, create a (Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayout.md#layeredlayout) instance, set its members and invoke the (Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayout.md#arrange) method. The layered layout can be applied like this:
```java
import com.mindfusion.diagramming.*;
...
void someMethod()
{
LayeredLayout layout = new LayeredLayout();
layout.setOrientation(com.mindfusion.diagramming.jlayout.Orientation.Horizontal);
layout.setSplitLayers(true);
layout.setLayerDistance(35);
layout.arrange(diagram);
}
```
### Tree map layout
Tree maps represent hierarchies by nesting child nodes within their parents, where the areas of leaf nodes are proportional to their (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setweight) values. Unlike other layout algorithms, (Markdown/T_com_mindfusion_diagramming_TreeMapLayout.md) expects hierarchies to be defined via grouping or containment (see (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#attachto) method and (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) class), and will ignore any links in the diagram. The diagram area covered by the topmost nodes in a hierarchy is specified via the (Markdown/T_com_mindfusion_diagramming_TreeMapLayout.md#setlayoutarea) property. By default, the layout tries to keep the ratio of node sides as close as possible to one. However this could make it hard to distinguish separate levels of the hierarchy. To alleviate that, set (Markdown/T_com_mindfusion_diagramming_TreeMapLayout.md#setsquarify) to false, and child nodes will be arranged either as a row or a column inside their parent node, alternating directions for each level. The drawback is that when (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setweight) ratios differ greatly or nodes contain many children, some nodes could end up with very narrow rectangles.### Decision flowchart layout
(Markdown/T_com_mindfusion_diagramming_DecisionLayout.md) arranges simple flowcharts consisting of decision boxes with up to three outgoing links per node and activity boxes with a single outgoing link per node. The nodes are arranged in columns and rows, whose distance depends on the (Markdown/T_com_mindfusion_diagramming_DecisionLayout.md#sethorizontalpadding) and (Markdown/T_com_mindfusion_diagramming_DecisionLayout.md#setverticalpadding) property values. When links share the same row or column, they are placed at a distance specified via (Markdown/T_com_mindfusion_diagramming_DecisionLayout.md#setlinkpadding). The layout arranges nodes recursively starting from (Markdown/T_com_mindfusion_diagramming_DecisionLayout.md#setstartnode). If (Markdown/T_com_mindfusion_diagramming_DecisionLayout.md#setstartnode) is not specified, the algorithm selects the root of the deepest branch of the graph's spanning tree as start node.### Flowchart Graph Layout
(Markdown/T_com_mindfusion_diagramming_FlowchartLayout.md) recognizes program code -like patterns in the graph, such as loops, sequences and if/switch branchings, and arranges them recursively. (Markdown/T_com_mindfusion_diagramming_FlowchartLayout.md) could be used to arrange other types of graphs as well, though with some restrictions. For example it treats all back links as loops in the code, and expects that they are nested - loop links starting closer to the stop node should end closer to the start node. Another similar restriction is that there shouldn't be any cross-links that connect different branches of a decision sub-graph.
### Swimlane Layout
(Markdown/T_com_mindfusion_diagramming_SwimlaneLayout.md) can be used to arrange process diagrams in which nodes representing activities are placed in swimlanes representing resources. The index of the resource allocated to an activity should be assigned to the corresponding node's (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) via the (Markdown/T_com_mindfusion_diagramming_jlayout_SwimlaneLayoutTraits_0.md) key.By default, the algorithm works with the diagram's (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlanegrid), but its (Markdown/T_com_mindfusion_diagramming_SwimlaneLayout.md#setswimlanegrid) property can be set to any class that implements (Markdown/T_com_mindfusion_diagramming_SwimlaneGrid.md). This allows applying the layout to a custom-drawn grid rendered through the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawbackground) event, or one composed of locked background nodes.
### Hierarchical Graph Layout
(Markdown/T_com_mindfusion_diagramming_HierarchicalLayout.md) places nodes on user-defined levels, such that if the source graph is level-planar, all links are guaranteed to have a single segment and not intersect. The layout method requires that for each node (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) contains a (Markdown/T_com_mindfusion_diagramming_jlayout_HierarchicalLayoutTraits_0.md) entry specifying the level, and no two connected nodes must be on the same level.
## Link Routing
Routed links avoid nodes marked as obstacles (call the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getobstacle) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setobstacle) methods) by finding the shortest path between their origin and destination that does not cross any other nodes.
### Setting Up a Link Router
The control finds paths for links affected by modifications of nearby nodes by calling methods of an object that implements the (Markdown/T_com_mindfusion_diagramming_LinkRouter.md) interface. This object can be get or set through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinkrouter) property of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class. JDiagram provides a few classes that implement (Markdown/T_com_mindfusion_diagramming_LinkRouter.md) - (Markdown/T_com_mindfusion_diagramming_PatternRouter.md), (Markdown/T_com_mindfusion_diagramming_GridRouter.md), (Markdown/T_com_mindfusion_diagramming_QuickRouter.md) and (Markdown/T_com_mindfusion_diagramming_CompositeRouter.md). By default (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlinkrouter) is set to a (Markdown/T_com_mindfusion_diagramming_CompositeRouter.md) instance.
### Automatic or Explicit Routing
The (Markdown/T_com_mindfusion_diagramming_Diagram.md#routealllinks) method can be invoked to explicitly rearrange links in a way they do not cross nodes. In addition, links have an (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setautoroute) property that enables or disables automatic routing of a link; that property is initialized from the diagram's (Markdown/T_com_mindfusion_diagramming_Diagram.md#getroutelinks) value. The (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#settriggerrerouting) property of (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md) class specifies when links should be rerouted automatically.
### Tuning the Routing Algorithm
When a (Markdown/T_com_mindfusion_diagramming_GridRouter.md) is used, the (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md) class allows customizing various aspects of the routing algorithm. That algorithm evaluates possible paths aiming to find one that has a minimal cost. The values set through the (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#setlengthcost), (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#setturncost), (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#setcrossingcost) and (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#setnodevicinitycost) methods are added to the total cost of a route and have a great influence over the shape of the chosen path. The orientation of the first and the last segment of the routed links can be specified by calling the (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#setstartorientation) and (Markdown/T_com_mindfusion_diagramming_RoutingOptions.md#setendorientation) methods respectively.
## Anchor Points and Patterns
### Anchor Points
For each node you can define one or more points to which links should dock when connecting to that node. Such points are represented by instances of the (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md) class. The position of an anchor point relative to node's bounding rectangle is specified by calling the (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setx) and (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#sety) methods. Their values are expressed as percent of the node's width and height to accommodate for moving and resizing. The final location of an anchor point is determined by this simple calculation:
```java
return new Point2D.Float(
nodeRect.x + nodeRect.width * x / 100,
nodeRect.y + nodeRect.height * y / 100);
```
A point's position can also be defined as a fixed offset from the node's top-left corner, letting you define anchor positions that do not depend on the node's width or height. This is controlled independently for X and Y coordinates, by means of the (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setxunit) and (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setyunit) properties.
To control whether an anchor point accepts incoming or outgoing links or both, call the (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setallowincoming) and (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setallowoutgoing) methods. When a link is drawn, its ends are aligned to the nearest anchors allowing docking of the respective end type. Another way to control whether links can be connected to an anchor point is to handle the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#validateanchorpoint) event.
### Anchor Patterns
An (Markdown/T_com_mindfusion_diagramming_AnchorPattern.md) instance defines a set of anchor points to be used together. When creating an anchor pattern, pass to its constructor an array of (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md) objects. The (Markdown/T_com_mindfusion_diagramming_AnchorPattern.md) class exposes several predefined patterns that can be accessed through the static (Markdown/T_com_mindfusion_diagramming_AnchorPattern.md#fromid) method. An existing pattern can be accessed and assigned as a single entity trough the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#getanchorpattern) and (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setanchorpattern) methods of nodes. The following example creates a pattern of four anchor points:
```java
pattern = new AnchorPattern(new AnchorPoint[] {
new AnchorPoint((short)50, (short)0, true, true),
new AnchorPoint((short)100, (short)50, true, true),
new AnchorPoint((short)50, (short)100, true, true),
new AnchorPoint((short)0, (short)50, true, true) }, "Decision");
```
The points are located at the middles of bounding rectangle sides of nodes to which the pattern is assigned. All four points accept both incoming and outgoing links.
### Displaying Anchor Points
Anchor points can be hidden, always visible on the screen, or displayed automatically. This can be specified through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getshowanchors) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshowanchors) method. The appearance of anchor point marks can be customized by calling their (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setmarkstyle) and (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md#setcolor) methods.
### Anchor Patterns and Tables
A distinct anchor pattern can be assigned to every row of a table. When a link is connected to a row, the respective end of the link is aligned to the nearest (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md) assigned to that row. If a row does not have associated anchor points of the appropriate type (incoming/outgoing), the link will be connected to the nearest row that has such anchors defined. If none of the rows of a table has an associated anchor pattern, links are connected to the middle of the left or right side of the pointed row.
## Undo and Redo
## Overview
Interactive actions, carried out by users, and programmatic commands that change the structure of a diagram are recorded in a history queue. While action records are still in that queue, the actions can be undone or redone. The queue has a fixed length - if it gets full, recording a new action makes the oldest one drop from the queue.
Undo is disabled by default. To enable it, call the (Markdown/T_com_mindfusion_diagramming_UndoManager.md#setundoenabled) method. To undo or redo an action, call the (Markdown/T_com_mindfusion_diagramming_UndoManager.md#undo) or (Markdown/T_com_mindfusion_diagramming_UndoManager.md#redo) methods of (Markdown/T_com_mindfusion_diagramming_UndoManager.md). JDiagram does not provide keyboard shortcuts for undo/redo. Your application must have its own menu items and/or keyboard accelerators to provide the necessary user interface, and invoke the respective methods in response to UI events.
JDiagram automatically saves the following types of actions for later undo/redo:
- adding an item to the diagram
- removing an item from the diagram
- moving or resizing items
- creating a group
- destroying a group
- expanding or collapsing trees
- scrolling table rows
- adding or removing tables' rows
Changes of item values are not saved automatically in the history. If your application must be able to undo/redo changes, use the (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md) command. (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md) allows recording several changes as an atomic undoable action.
In some cases, you might need to create your own types of actions or commands. For example, suppose you need undo/redo for changes made to items' tag objects. However, JDiagram is not able to detect such changes, so it cannot undo them. To enable undo/redo, create a subclass of (Markdown/T_com_mindfusion_diagramming_Command.md) and implement the execute, (Markdown/T_com_mindfusion_diagramming_Command.md#undo) and (Markdown/T_com_mindfusion_diagramming_Command.md#redo) methods.
## Actions and Commands
Undoable interactive actions and programmatic commands that can be carried out by JDiagram are represented by (Markdown/T_com_mindfusion_diagramming_Command.md) (#subclassing-the-command-class). The (Markdown/T_com_mindfusion_diagramming_Command.md) class provides the necessary interface to execute, (Markdown/T_com_mindfusion_diagramming_Command.md#undo) or (Markdown/T_com_mindfusion_diagramming_Command.md#redo) actions. In some cases, you will have to implement these methods in derived classes, but you should not call them directly. Use the (Markdown/T_com_mindfusion_diagramming_UndoManager.md#undo) or (Markdown/T_com_mindfusion_diagramming_UndoManager.md#redo) methods of the (Markdown/T_com_mindfusion_diagramming_UndoManager.md) to undo or redo a command. The (Markdown/T_com_mindfusion_diagramming_UndoManager.md#undomanager-methods) call the respective (Markdown/T_com_mindfusion_diagramming_Command.md#command-methods) and in addition update the state of the command history and the (Markdown/T_com_mindfusion_diagramming_Diagram.md).
The following JDiagram classes are derived from (Markdown/T_com_mindfusion_diagramming_Command.md):
| **Command
** | **Description
**
| (Markdown/T_com_mindfusion_diagramming_AddGroupCmd.md)
(Markdown/T_com_mindfusion_diagramming_RemoveGroupCmd.md)
| Creates a new hierarchical group.
Destroys a group.
| (Markdown/T_com_mindfusion_diagramming_AddItemCmd.md)
(Markdown/T_com_mindfusion_diagramming_RemoveItemCmd.md)
(Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md)[](Markdown/T_com_mindfusion_diagramming_RemoveFromContainerCmd.md)
| Adds a new item to the diagram.
Removes an item from the diagram.
Handles undo/redo of item changes.
| (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md)[](Markdown/T_com_mindfusion_diagramming_AddItemCmd.md)
| Allows several actions to be undo and redone at the same time.
| (Markdown/T_com_mindfusion_diagramming_AddToContainerCmd.md)
| Adds an item to a container.
| (Markdown/T_com_mindfusion_diagramming_FoldContainerCmd.md)
| Folds a container node.
| (Markdown/T_com_mindfusion_diagramming_GroupAttachCmd.md)
| Attaches an item to a group.
| (Markdown/T_com_mindfusion_diagramming_GroupDetachCmd.md)
| Detaches an item from a group.
| (Markdown/T_com_mindfusion_diagramming_ModifyItemCmd.md)
| Moves or resizes an item.
| (Markdown/T_com_mindfusion_diagramming_RedimTableCmd.md)
| Change number of table's columns or rows.
| (Markdown/T_com_mindfusion_diagramming_ExpandItemCmd.md)
| Expands or collapses a tree of items.
| (Markdown/T_com_mindfusion_diagramming_ScrollTableCmd.md)
| Scrolls table's rows.
| (Markdown/T_com_mindfusion_diagramming_ExpandHeaderRowCmd.md)
| Expands or collapses tables sections.
| (Markdown/T_com_mindfusion_diagramming_RemoveFromContainerCmd.md)
| Removes an item from the container node.
Instances of most of these classes are created implicitly by JDiagram in response to users' actions or method calls. You might need to explicitly instantiate only (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md) - to undo or redo property changes - and (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md) - to present several actions as single undoable operation.
The data of your application might be tightly integrated in JDiagram diagrams, for example through tag objects. In these cases, JDiagram cannot detect undo or redo changes to your data. To enable undo of such changes, you must inherit the (Markdown/T_com_mindfusion_diagramming_Command.md) class and implement your versions of the execute, (Markdown/T_com_mindfusion_diagramming_Command.md#undo) and (Markdown/T_com_mindfusion_diagramming_Command.md#redo) methods. To record your own action in the undo/redo history, call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#executecommand) method of (Markdown/T_com_mindfusion_diagramming_Diagram.md).
## Undo Manager
The undo manager acts as a mediator between commands, the diagram and the command history. It is represented by the (Markdown/T_com_mindfusion_diagramming_UndoManager.md) class, whose only instance can be accessed by calling the (Markdown/T_com_mindfusion_diagramming_Diagram.md)'s (Markdown/T_com_mindfusion_diagramming_Diagram.md#getundomanager) method.
By default, undo functionality is disabled - commands are executed, but are not recorded in history for later undo or redo. To enable undo, invoke (Markdown/T_com_mindfusion_diagramming_UndoManager.md#setundoenabled) and pass true as argument. You might need to disable undo before executing actions not intended to be undone by the end-users, for example creating special start/end nodes. Another situation in which you might want to disable undoing is when creating programmatically a lot of new diagram items - say hundreds or thousands. JDiagram creates an undo record for each item creation; if the capacity of the command history ((Markdown/T_com_mindfusion_diagramming_CommandHistory.md#getcapacity), (Markdown/T_com_mindfusion_diagramming_CommandHistory.md#setcapacity)) is smaller than the number of items created, most of the records will drop from the history queue while adding new ones. That would waste processing power and memory for creating undo records that won't be used.
As an alternative, you can create a composite record by calling (Markdown/T_com_mindfusion_diagramming_UndoManager.md#startcomposite). All subsequent create-item actions are saved in the composite. The composite is saved in the undo history as a single record that allows undo or redo of all constituent actions as a single operation. (Markdown/T_com_mindfusion_diagramming_UndoManager.md#startcomposite) creates and returns a (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md) instance, which is marked as active composite in the undo manager. While there is an active composite, all actions that are carried out are added to it. Call the (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md#execute) method of the active composite to stop recording sub-commands in it and save it in the history as atomic undoable operation.
Use the (Markdown/T_com_mindfusion_diagramming_UndoManager.md#undo) and (Markdown/T_com_mindfusion_diagramming_UndoManager.md#redo) methods of the undo manager to undo or redo actions. Do not call the respective methods of the (Markdown/T_com_mindfusion_diagramming_Command.md) class - they are called internally by the undo manager, and in addition the current command history position is updated and the diagram view is repainted.
## Command History
The undo/redo history is represented by a (Markdown/T_com_mindfusion_diagramming_CommandHistory.md) instance. That instance is created by the (Markdown/T_com_mindfusion_diagramming_UndoManager.md) and can be accessed from its (Markdown/T_com_mindfusion_diagramming_UndoManager.md#gethistory) method.
The undo manager adds commands to the history after executing them. If the history queue is full, the oldest command records are removed when new ones are added. Use the (Markdown/T_com_mindfusion_diagramming_CommandHistory.md#setcapacity) method of (Markdown/T_com_mindfusion_diagramming_CommandHistory.md) to specify how many action records to keep in the queue.
The history has a current-command pointer indicating which are the next commands to undo or redo. If a command is undone, the current pointer in the history queue is moved back and allows undoing even older actions. If the current pointer is not at the last record, any newer commands can be redone again.
To query which are the next commands to be undone or redone, use the (Markdown/T_com_mindfusion_diagramming_CommandHistory.md#getnextundo) and (Markdown/T_com_mindfusion_diagramming_CommandHistory.md#getnextredo) methods. They return the (Markdown/T_com_mindfusion_diagramming_Command.md) instances contained in the queue, which are referred by the current position pointer. If no further undo or redo is possible, these methods return null. You might use them to indicate to end-users, which are the next commands to undo/redo, for example
```java
if (diagram.getUndoManager().getHistory().getNextUndo() == null)
{
// everything has been undone
miUndo.setEnabled(false);
miUndo.setLabel("Undo");
}
else
{
if (diagram.getUndoManager().getHistory().getNextUndo() instanceof AddItemCmd)
{
// the next action to undo is item-creation
miUndo.setEnabled(true);
miUndo.setLabel("Undo Create");
}
}
```
To ban end-users from undoing last commands, clear the command history by invoking the (Markdown/T_com_mindfusion_diagramming_CommandHistory.md#clear) method.
## Undo or Redo Item State Changes
Changes to the state of diagram items caused by invoking item methods that change the item's state are not recorded automatically for later undo. To enable undo of these changes, you must explicitly create a (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md) instance and add it to the history queue.
The (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md#changeitemcmd) constructor requires a reference to an item as argument and saves the item's initial state to be restored by later (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md#undo). Call the (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md#execute) method after one or more item's method calls. (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md#execute) records the final state of the item to be restored by later (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md#redo). This allows changes to several properties of an item to be saved within a single record, which can be undone or redone as a single operation:
```java
ShapeNode node = (ShapeNode)diagram.getNodes().get(0);
// save item state
ChangeItemCmd propChange = new ChangeItemCmd(diagram.getNodes().get(0), "Change");
// change properties
node.setText("new text");
node.setBrush(new SolidBrush(Color.blue));
node.setShape(Shape.fromId("Ellipse"));
// add to history
propChange.execute();
```
You might need to treat changes to several items as an atomic operation. To do so, create a (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md) instance and add the (Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md) commands to the composite by calling the (Markdown/T_com_mindfusion_diagramming_Command.md#addsubcmd) method:
```java
if (diagram.getSelection().getNodes().size() == 0) return;
// make all changes seem like a single operation by
// putting them in composite Command
CompositeCmd composite = new CompositeCmd(
diagram, "Change selection");
for (DiagramNode node : diagram.getSelection().getNodes())
{
ShapeNode shapeNode = (ShapeNode)node;
// save item state
ChangeItemCmd propChange = new ChangeItemCmd(shapeNode, "Change");
// change properties
shapeNode.setText("new text");
shapeNode.setBrush(new SolidBrush(Color.blue));
// add to the composite
composite.addSubCmd(propChange);
}
// store final state of all contained commands
composite.execute();
```
## Composite Commands
Sometimes you might prefer having a set of actions undo and redo as a single atomic operation. JDiagram provides the (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md) class to help you with that. (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md) objects act as containers of other (Markdown/T_com_mindfusion_diagramming_Command.md)-derived objects. When (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md#undo) or (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md#redo) are invoked on a composite command, all its subcommands are respectively undone or redone.
To add a command to the composite, call the (Markdown/T_com_mindfusion_diagramming_Command.md#addsubcmd) method. Call (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md#execute) to execute all subcommands contained in the composite. Subcommands are executed or redone in the same order in which they were added to the container, and are undone in the opposite order.
Often JDiagram implicitly generates (Markdown/T_com_mindfusion_diagramming_Command.md) objects in response to users actions or method calls, and automatically records them in the history queue. You do not have direct access to those commands and cannot add them to a composite by using (Markdown/T_com_mindfusion_diagramming_Command.md#addsubcmd). To enable creating composites in such cases, the undo manager provides the notion of active composite. Active composite is created by calling the (Markdown/T_com_mindfusion_diagramming_UndoManager.md#startcomposite) method of (Markdown/T_com_mindfusion_diagramming_UndoManager.md). Each action executed after that is made part of the composite, instead of adding it directly to the command history. Invoking the (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md#execute) method of the current composite completes it and saves it in the history queue.
## Subclassing the Command Class
JDiagram's diagrams can be just a part of the data model of your application, which might already have undo/redo functions implemented for its native data. To integrate JDiagram undo functionality into the application's undo mechanism you have to subclass (Markdown/T_com_mindfusion_diagramming_Command.md) and create classes responsible for changes in your application's data. When a change occurs outside the diagram, it can still be recorded by calling the (Markdown/T_com_mindfusion_diagramming_Diagram.md#diagram)'s (Markdown/T_com_mindfusion_diagramming_Diagram.md#executecommand) method and integrated into JDiagram's command history.
A simpler scenario when you might have to subclass (Markdown/T_com_mindfusion_diagramming_Command.md) is using complex objects as tags. Actions that change these objects cannot be detected and handled automatically by JDiagram. To integrate such an action into the diagram's undo history, you must create a (Markdown/T_com_mindfusion_diagramming_Command.md) instance that knows how to carry out, undo or redo the action.
(Markdown/T_com_mindfusion_diagramming_Command.md) subclasses must implement (Markdown/T_com_mindfusion_diagramming_CompositeCmd.md#execute), (Markdown/T_com_mindfusion_diagramming_Command.md#undo) and (Markdown/T_com_mindfusion_diagramming_Command.md#redo) methods. Actions represented by your subclass must be carried out by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#executecommand) method of (Markdown/T_com_mindfusion_diagramming_Diagram.md) that invokes executing of the command passed as argument, and then is added to the history queue whose (Markdown/T_com_mindfusion_diagramming_Command.md#undo) and (Markdown/T_com_mindfusion_diagramming_Command.md#redo) methods can be called multiple times later by the (Markdown/T_com_mindfusion_diagramming_UndoManager.md). Usually you can implement (Markdown/T_com_mindfusion_diagramming_Command.md#redo) as a call to (Markdown/T_com_mindfusion_diagramming_Diagram.md#executecommand), but if the latter is time consuming, its result state can be saved in an instance member and restored by redo.
Do not call the (Markdown/T_com_mindfusion_diagramming_Command.md#undo) and (Markdown/T_com_mindfusion_diagramming_Command.md#redo) methods of your class directly, just implement them and they will be invoked by (Markdown/T_com_mindfusion_diagramming_UndoManager.md)'s (Markdown/T_com_mindfusion_diagramming_UndoManager.md#undo) or (Markdown/T_com_mindfusion_diagramming_UndoManager.md#redo) methods when necessary.
The example below shows a simple implementation of (Markdown/T_com_mindfusion_diagramming_Command.md#command-methods):
```java
class PersonTag
{
public String Name;
public String Address;
// and so on
}
class AddressChangeCmd extends Command
{
public AddressChangeCmd(PersonTag p, String address)
{
super("Address change");
this.p = p;
this.oldAddress = p.Address;
this.newAddress = address;
}
@Override
public void execute(boolean undoEnabled)
{
p.Address = newAddress;
}
@Override
public void undo()
{
p.Address = oldAddress;
}
@Override
public void redo()
{
// undo manager is enabled if Redo is called
// so pass true for the undoEnabled argument
execute(true);
}
private PersonTag p;
private String oldAddress;
private String newAddress;
}
// somewhere in later code
PersonTag tag = (PersonTag)diagram.getActiveItem().getTag();
AddressChangeCmd command = new AddressChangeCmd(tag, "far far away");
diagram.executeCommand(command);
```
## Diagram Serialization and Output
## Serializing Diagrams
### XML Serialization
A diagram can be saved as an XML document. To do that, call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#savetoxml) method of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class. To deserialize a digram back from its XML representation, call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#loadfromxml) method.
Custom item classes can implement XML serialization for their additional properties by overriding the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#savetoxml) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#loadfromxml) methods. In addition, such classes must specify a string to use as their identifier in the XML document by calling (Markdown/T_com_mindfusion_diagramming_Diagram.md#registeritemclass).
The control raises (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#serializetag) and (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#deserializetag) to enable serialization of complex (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setid) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settag) objects without overriding the item classes. The (Markdown/T_com_mindfusion_diagramming_SerializeTagEvent.md#getpropertyname) event argument specifies which property is being serialized.
### JSON Serialization
To serialize a diagram as a JSON string, call its (Markdown/T_com_mindfusion_diagramming_Diagram.md#savetojsonstring) method. To deserialize a diagram back from its JSON representation, call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#loadfromjsonstring) method. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#savetojson) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#loadfromjson) methods serialize the JSON strings to / from files.
Custom item classes can implement JSON serialization for their additional properties by overriding the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#savetojson) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#loadfromjson) methods. Such classes must be registered for serialization by calling the (Markdown/T_com_mindfusion_diagramming_Diagram.md#registeritemclass) method and providing a string identifier for the clientClass parameter.
The control raises (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#jsonserializetag) and (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#jsondeserializetag) to enable serialization of complex (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setid) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settag) objects without overriding the item classes. The (Markdown/T_com_mindfusion_diagramming_JsonSerializeTagEventArgs.md#getpropertyname) event argument specifies which property is being serialized.
### Binary Serialization
Diagrams can be serialized in byte sequences wrapped by Java streams. Such streams may represent files, memory buffers, communication pipes, TCP sockets and so on. In serialized form a diagram might be saved in a database record too. To save the current diagram into a stream call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#saveto) method, and respectively to load a diagram from a stream call (Markdown/T_com_mindfusion_diagramming_Diagram.md#loadfrom). Three shortcut methods are provided for work with files. (Markdown/T_com_mindfusion_diagramming_Diagram.md#saveto) creates a disk file and a stream that wraps it and invokes (Markdown/T_com_mindfusion_diagramming_Diagram.md#saveto). (Markdown/T_com_mindfusion_diagramming_Diagram.md#loadfrom) opens a read-stream on a disk file and invokes (Markdown/T_com_mindfusion_diagramming_Diagram.md#loadfrom).
All objects referenced by the diagram, such as images and fonts, are serialized together with the diagram elements. The tag objects that are associated with diagram elements are also saved if they implement the Serializable interface. If a tag is not serializable it won't be saved by the save- methods.
## Exporting the Diagram
### Exporting Images
You can create a static image representing the current diagram using the (Markdown/T_com_mindfusion_diagramming_Diagram.md#createimage) method. The method returns a java.awt.image.BufferedImage object. The BufferedImage can be further serialized as a Jpeg, Gif or Png file, as shown in the following example:
```java
try
{
java.awt.image.BufferedImage image = diagram.createImage();
javax.imageio.ImageIO.write(image, "png", new File("d:\\export.png"));
}
catch (IOException ex)
{
}
```
### Exporting PDF files
In order to export to PDF, import the com.mindfusion.diagramming.export and com.mindfusion.pdf packages. Create a (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md) instance and call its (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md#export) method. The (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md#setmarginleft) lets you specify the page margins for all pages in the document. If you need to set the page size and orientation, call the (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md#setpagesize), and (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md#setpageorientation) methods. The (Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md#setautoscale) method allows scaling the diagram to fit in one or more PDF pages. The following example shows how to export a diagram to a Pdf file in response to pressing a button event and using the JFileChooser control where the location is selected and the name of the Pdf file is entered:
```java
btnExportPdf.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
JFileChooser saveFileDialog = new JFileChooser();
saveFileDialog.setCurrentDirectory (new File ("."));
saveFileDialog.setFileFilter(
new javax.swing.filechooser.FileFilter()
{
public boolean accept(File f)
{
return f.getName().toLowerCase().endsWith(".pdf")
|| f.isDirectory();
}
public String getDescription()
{
return "PDF files|*.pdf";
}
});
if (saveFileDialog.showSaveDialog(MainFrame.this) == JFileChooser.APPROVE_OPTION)
{
PdfExporter pdfExp = new PdfExporter();
pdfExp.export(diagramView.getDiagram(), saveFileDialog.getSelectedFile().getAbsolutePath());
}
}
});
```
### Exporting SVG files
Create an (Markdown/T_com_mindfusion_diagramming_export_SvgExporter.md) instance and call its (Markdown/T_com_mindfusion_diagramming_export_SvgExporter.md#export) method, passing a (Markdown/T_com_mindfusion_diagramming_Diagram.md) object and the full path to the .svg file as parameters.
### Export Excel files
The (Markdown/T_com_mindfusion_diagramming_export_ExcelExporter.md) class from (#commindfusiondiagrammingexport) package exports diagrams to Excel Open XML format (XSLX). Diagrams are exported as Excel AutoShapes drawings. The (Markdown/T_com_mindfusion_diagramming_export_ExcelExporter.md#export) overload that takes a (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) parameter creates a sheet for each (Markdown/T_com_mindfusion_diagramming_DiagramPage.md) in the document. The export(Diagram) overload creates a single Excel sheet.
## Printing and Print Preview
### Print or Preview a Diagram
Call the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#print) method to print the current (Markdown/T_com_mindfusion_diagramming_DiagramView.md). The (Markdown/T_com_mindfusion_diagramming_DiagramView.md#printpreview) method opens a preview window that shows how the diagram would look when printed on paper.
### Settings for Printing
The (Markdown/T_com_mindfusion_diagramming_PrintOptions.md) class exposes the available settings for printing. An instance of this class is accessible by calling the (Markdown/T_com_mindfusion_diagramming_DiagramView.md)'s (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getprintoptions) method. Apart from properties inherited from (Markdown/T_com_mindfusion_diagramming_RenderOptions.md), the print options object exposes members for customizing the header of printed pages, such as (Markdown/T_com_mindfusion_diagramming_PrintOptions.md#setdocumentname), (Markdown/T_com_mindfusion_diagramming_PrintOptions.md#setheaderformat) and (Markdown/T_com_mindfusion_diagramming_PrintOptions.md#setheaderfont).
### Size of a Printed Diagram
If the background image is set and the printing of the background image is enabled by performing the (Markdown/T_com_mindfusion_diagramming_RenderOptions.md#setenablebackgroundimage) method, the size of the printed diagram is defined solely by the document bounds (obtained through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getbounds) method). If the actual diagram items occupy only a small portion of the document, there might be some pages printed that do not display any items but just a part of the background image. To avoid that, call (Markdown/T_com_mindfusion_diagramming_Diagram.md#resizetofititems)before printing.
If no background image is used, JDiagram prints only the part of the document containing all items that are both visible ((Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getvisible), (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setvisible)) and printable ((Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getprintable), (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setprintable)). That avoids printing blank pages.
### Print Scaling
Use the (Markdown/T_com_mindfusion_diagramming_RenderOptions.md#setscale) method to print a diagram in larger or smaller proportions than the actual ones.
## Appearance
## Styles and Themes
The style and theme system provides a consistent way to customize the appearance of a (Markdown/T_com_mindfusion_diagramming_Diagram.md) and its items. By using styles and themes, it is easier to achieve coherent look and feel across the entire diagram. In addition, changing the look and feel can be achieved by simply replacing the current theme. New themes can be designed in the visual environment of the Theme Editor tool and subsequently used and distributed as XML files. Several pre-defined theme files are installed under the Themes subfolder of the control's root installation folder.
### Styles
The style is a set of properties. Styles can be applied to diagrams and individual diagram items and this can potentially affect the values of some properties of the target object. More specifically, if the value of a style-affected property in the target object is null, then the value is obtained from the associated style. The style does not necessarily need to provide values for all of its properties. If a styled property is null and it is not defined in the associated style, the style system searches for a value in the current theme. A complete value precedence list can be found later in this topic.
The styles are represented by the (Markdown/T_com_mindfusion_diagramming_Style.md) class and its various subclasses. Styles can be applied to diagram objects through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setstyle) property of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class and to diagram items through the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setstyle) property of the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) class. Styles can also participate in themes, in which case they affect all objects of specific type.
### Themes
The theme is a set of styles, each associated with specific diagram or item type. When the theme is applied to a diagram, the styles registered in the theme affect all objects of their associated type.
Themes are represented by the (Markdown/T_com_mindfusion_diagramming_Theme.md) class and can be assigned to (Markdown/T_com_mindfusion_diagramming_Diagram.md) objects through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#settheme) method. Styles are associated with types within the theme through the (Markdown/T_com_mindfusion_diagramming_Theme.md#registerstyle) method. The following code creates a new theme, with a single style for (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) items and applies this theme to an existing diagram.
```java
Theme theme = new Theme();
ShapeNodeStyle style = new ShapeNodeStyle();
style.setFontFamily("Courier New");
theme.registerStyle(ShapeNode.class, style);
diagram.setTheme(theme);
```
Alternatively, themes can be loaded from XML files by calling the (Markdown/T_com_mindfusion_diagramming_Theme.md#loadfromxml) method. Such XML files can be produced by the Theme Editor tool, or by calling the (Markdown/T_com_mindfusion_diagramming_Theme.md#savetoxml) method of an existing theme.
### Value Precedence
The style and theme system is hierarchical. This means that, when a value of a styled property is requested, the system starts searching for this value along a chain of defined styles. The system returns the first valid value encountered. If no valid value is encountered along the chain, the system returns a globally defined default value for the property. The following list explains the search order in more details:
If the local value of the object is not null, the local value is returned.
- If the object has a style and the property in this style has value, this value is returned.
- If the object is an item, which is part of a diagram, the local style of the diagram is searched.
- If the object is an item, which is part of a diagram and the diagram has associated theme, the theme is searched for styles registered for the item's type or its base types. If a style with a defined property value is found, this value is returned.
- Similar search as the previous one is performed for a theme-registered style for the (Markdown/T_com_mindfusion_diagramming_Diagram.md) class.
- If the above steps do not produce value; the system returns a globally define default for the property.
For example, if the effective value of the text brush property of a (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) is requested (through the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#geteffectivetextbrush) method), the style system performs the following search, according to the above rules:
If the node's (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settextbrush) property is not null, its value is returned.
- If the node's (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setstyle) is set and the (Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md#settextbrush) property in this style has value, this value is returned.
- If the node is part of a diagram, the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setstyle) is set, and the (Markdown/T_com_mindfusion_diagramming_DiagramStyle.md#settextbrush) property of this style has value, this value is returned.
- If the node is part of a diagram and the (Markdown/T_com_mindfusion_diagramming_Diagram.md#settheme) is set, the theme is searched for a style registered for the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) type. If there is such style and its (Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md#settextbrush) property has value, this value is returned.
- Similar search as the previous one is performed for a theme-registered style for the (Markdown/T_com_mindfusion_diagramming_Diagram.md) type.
- Finally, the system returns a globally-defined default value for the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settextbrush) property (which is a solid Black brush).
### Theme Editor
The Theme Editor provides simple visual environment for theme creation and modification. The editor displays a sample diagram with items of various types and exposes a list of all possible built-in diagram and item styles through a property grid to the left. Any modification of the style properties in the grid is immediately reflected on the diagram to give a preview on what effect the change would have if the theme is applied to a diagram. The theme can be saved at any time through the Save menu. Existing themes can be opened and modified.
The following image illustrates the Theme Editor in action:
### Custom Styles
The following section describes how to enable styling for properties of custom item classes. To enable styling, create a custom style class by deriving from the closest existing type. For example, for a custom (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) (say, MyNode), the custom style needs to inherit from (Markdown/T_com_mindfusion_diagramming_ShapeNodeStyle.md):
```java
public class MyNodeStyle extends ShapeNodeStyle
{
}
```
For each property in MyNode that needs to be styled, define a property with the same name and type in the MyNodeStyle class by following the pattern below. For example, if MyNode contains a property MyBrush of type (Markdown/T_com_mindfusion_drawing_Brush_0.md), the following code defines its corresponding style property:
```java
class MyNodeStyle extends ShapeNodeStyle
{
public MyNodeStyle()
{
myBrushProperty = registerProperty("MyBrush");
}
public Brush getMyBrush()
{
return (Brush)getValue(myBrushProperty);
}
public void setMyBrush(Brush value)
{
setValue(myBrushProperty, value);
}
private Object myBrushProperty;
}
```
Now, in the custom MyNode class, define a new method, getEffectiveMyBrush, which will return the actual value of MyBrush:
```java
public Brush getEffectiveMyBrush()
{
// Checking for local value
Brush localValue = getBrush();
if (localValue != null)
return localValue;
// Querying the property value through the style system
return (Brush)getValue("MyBrush");
}
```
Remember to register the style class for serialization, along with the custom node class:
```java
Diagram.registerClass(MyNode.class, "MyNode", 1);
Diagram.registerClass(MyNodeStyle.class, "MyNodeStyle", 1);
```
Now you can style and theme your custom nodes. Here is a theme, which affects the MyBrush property of all MyNode items in a diagram:
```java
Theme theme = new Theme();
MyNodeStyle myNodeStyle = new MyNodeStyle();
myNodeStyle.setMyBrush(new SolidBrush(Color.lightGray));
theme.registerStyle(MyNode.class, myNodeStyle);
diagram.setTheme(theme);
```
It is important to remember that there are no global default values for custom properties. Therefore you should be prepare to handle null values from (Markdown/T_com_mindfusion_diagramming_Style.md#getvalue) or ensure that at least one of the five steps in the precedence list above produces a value.
## Brush and Pen Classes
### Brush Classes
JDiagram defines classes that encapsulate the Paint and Stroke classes of Java. There are four brush classes that inherit the abstract Brush class, namely HatchBrush, GradientBrush, SolidBrush and TextureBrush.
HatchBrush allows filling the interiors of objects with a hatch pattern. Supported patterns are exposed as members of the HatchStyle class.
The GradientBrush class provides a gradient brush which paints the interior of objects starting with one color and gradually changing to another color by interpolating the RGB values of the two colors. His getColor1 method gets the first gradient color, and getColor2 gets second gradient color. The getAngle method gets the gradient orientation angle.
The SolidBrush class represents a brush for painting the interior of objects with a single color. His getColor method gets the color that fills the interior of objects.
The TextureBrush class defines a brush that fills the interior of objects with a texture pattern. The getTexture and setTexture methods allow specifying a texture pattern.
A brush is assigned to an item by calling the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setbrush) method. To set the diagram's background brush, perform the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbackbrush) method. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinkbrush) method assigns a default brush to new links.
### The Pen Class
The Pen class allows specifying the pen for items, shapes, table nodes, links, and container frame lines. To get and/or set the pen color, use the getColor and/or setColor methods. The getWidth and setWidth methods enable indicating the width of the lines drawn with the pen.
To assign a pen to an item, call the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setpen) method. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinkpen) method allows assigning the default pen to new links.
To set the default pen that should be assigned to new nodes, call the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshapepen) method.
The (Markdown/T_com_mindfusion_diagramming_Diagram.md#settablepen) method allows specifying the pen for (Markdown/T_com_mindfusion_diagramming_TableNode.md) objects.
Use the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setboundspen) method to assign the pen for drawing the diagram bounds.
The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setcontainerhighlightpen) and (Markdown/T_com_mindfusion_diagramming_ContainerNode.md#sethighlightpen) methods set the Pen for drawing the container frame lines when an item is dragged over the container.
## Node Effects
To apply an effect to the nodes in a diagram, create an instance of one of the effect classes and add this instance to the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodeeffects) collection. To apply the effect to individual nodes, add the instance to the node's (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#geteffects) collection. To discard the diagram effects for a particular node, add a null reference at position 0 in the node's (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#geteffects) collection. Effects can also be applied through styles by adding them to the (Markdown/T_com_mindfusion_diagramming_DiagramStyle.md#getnodeeffects) and (Markdown/T_com_mindfusion_diagramming_DiagramNodeStyle.md#geteffects) collections respectively.
It is possible to combine different effects by adding instances of their appropriate types to the effect collections. If is also admissible to apply more than one effect of the same type.
The currently supplied effect types are Aero and Glass. They are examined in more details in the sections below.
### Aero Effect
The Aero effect is represented by the (Markdown/T_com_mindfusion_diagramming_AeroEffect.md) class. The effect is designed to roughly resemble the Aero theme of Windows. More specifically, the effect adds semi transparency to the nodes, a smooth shade at the outside and a thin inset stroke. The semi transparency is specified through the (Markdown/T_com_mindfusion_diagramming_AeroEffect.md#setopacity) method. Opacity varies from 0 to 1 inclusive, where 0 indicates full transparency and 1 indicates the original node color. The semi transparency is applied only on the node brush. The colors of the shade and the inner stroke are specified through the (Markdown/T_com_mindfusion_diagramming_AeroEffect.md#setshadecolor) and (Markdown/T_com_mindfusion_diagramming_AeroEffect.md#setinneroutlinecolor) methods respectively. The following image illustrates how these properties affect the output:
The following example applies the Aero effect on the nodes of an existing diagram:
```java
AeroEffect effect = new AeroEffect();
effect.setOpacity(0.5f);
effect.setInnerOutlineColor(new Color(255, 255, 255, 100));
diagram.getNodeEffects().add(effect);
```
### Tips
- The Aero effect works very well in scenarios with overlapping nodes or in cases where the background is more complex than solid color, due to the effect of semi transparency.
- Aero combines well with the Glass effect. There are some examples at the end of this topic.
- The (Markdown/T_com_mindfusion_diagramming_AeroEffect.md#setshadecolor) is usually black or another dark color. However, some nice glow effects can be achieved by setting bright (Markdown/T_com_mindfusion_diagramming_AeroEffect.md#setshadecolor) on a diagram with dark background.
- The Aero effect can impact performance if there are many nodes visible in the diagram.
### Glass Effect
The Glass effect is represented by the (Markdown/T_com_mindfusion_diagramming_GlassEffect.md) class. The Glass effect adds visuals on top of the nodes in order to give the impression of a reflective surface. There are several variations of this effect, which can be selected through the setType method. The color of the reflection and the ambient color can be specified through the (Markdown/T_com_mindfusion_diagramming_GlassEffect.md#setreflectioncolor) and (Markdown/T_com_mindfusion_diagramming_GlassEffect.md#setglowcolor) methods respectively. When (Markdown/T_com_mindfusion_diagramming_GlassEffect.md#setusepenasglow) is set to true the color of the node's pen is used as the ambient color. The following image illustrates the differences between the distinct effect types:
The following example applies a Glass effect with the default settings to the nodes of a diagram:
```java
diagram.getNodeEffects().add(new GlassEffect());
```
### Tips
- The (Markdown/T_com_mindfusion_diagramming_GlassEffect.md#setglowcolor) is usually white. However, for Type4 glass effects it is often more suitable to use black glow.
- The Glass effect combines well with the Aero effect. There are some examples at the end of this topic.
- Several glass effects of different types can be applied simultaneously for emphasized effect.
### Examples
The values of the effect properties are usually selected in accordance with the color scheme of the target diagram and the desired end result. In addition different types of effects can be applied simultaneously to achieve more interesting results. The examples below demonstrate possible effect combinations in various color contexts.
### Aero & Glass (Dark on Light)
In this example the Aero and Glass effects are combined. The Aero effect is useful in scenarios when dark nodes are placed on light background or vice versa, in order to emphasize the contrast.
Here is the code that applies the above effects:
```java
diagram.getNodeEffects().add(new GlassEffect());
diagram.getNodeEffects().add(new AeroEffect());
```
### Aero & Glass (Light on Dark)
This example is similar to the first one, only this time the nodes are painted in light colors and the background is dark.
Here is the code that applies the above effect:
```java
GlassEffect glassEffect = new GlassEffect();
glassEffect.setType(GlassEffectType.Type3);
diagram.getNodeEffects().add(glassEffect);
diagram.getNodeEffects().add(new AeroEffect());
```
### Glow Effect
This example uses bright colors on black background to create a glow effect. The example utilizes an Aero effect with (Markdown/T_com_mindfusion_diagramming_AeroEffect.md#setshadecolor) set to the color of the nodes' pens.
Here is the code that applies the above effects:
```java
GlassEffect glassEffect = new GlassEffect();
glassEffect.setType(GlassEffectType.Type2);
glassEffect.setUsePenAsGlow(true);
diagram.getNodeEffects().add(glassEffect);
AeroEffect aeroEffect = new AeroEffect();
aeroEffect.setOpacity(0);
aeroEffect.setInnerOutlineColor(Color.black);
aeroEffect.setShadeColor(new Color(128, 255, 255));
diagram.getNodeEffects().add(aeroEffect);
```
For the rest of the settings for the above effect images, refer to the Effects sample project.
## Customizing the Appearance of Items
Different visual styles and properties can be set individually for every JDiagram object as described in the following paragraphs.
### Line Width and Style
The borders of nodes and the lines of links are drawn using a pen whose width and style can be customized. Using the Pen objects, provided by JDiagram, you can specify dash pattern, color and thickness for items' contours. To assign a pen to an item, use the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setpen) method of the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) class. Links use the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getheadpen) method to draw their heads. To change it, use the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadpen) method of the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) class. When customizing items through styles and themes, the appearance of their border lines can be set via the (Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md#setstroke) and (Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md#setstrokethickness) properties of (Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md).
### Color of Diagram Elements
JDiagram provides Brush objects for filling the interior of items. Brush is an abstract class. Depending to the type of interior filling you desire, you instantiate a brush object from one of the derived classes (GradientBrush, HatchBrush, SolidBrush or TextureBrush) and associate that object with the appropriate item, using its (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setbrush) method. The (Markdown/T_com_mindfusion_diagramming_Cell.md) class provides a (Markdown/T_com_mindfusion_diagramming_Cell.md#setbrush) method, which enables setting separate brushes to individual cells.
### Text
Diagram items can have attached text, displayed inside / over them.
Text of shape nodes is set using the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settext) method and the text alignment is specified using the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settextformat) method. The text can contain formatting specifiers, such as bold, italic and so on, which can be enabled by calling of (Markdown/T_com_mindfusion_diagramming_Diagram.md#setenablestyledtext). To make a shape node big enough to display its text without clipping, call (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#resizetofittext). You can add more text labels to a node by creating (Markdown/T_com_mindfusion_diagramming_NodeLabel.md) objects.
Links have their text drawn horizontally above their middle segment or rotated as specified through the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settextstyle) method; the string to display can be set using the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settext) method. Links can display additional labels added via the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#addlabel) method. Each label can be rendered using distinct font, color and alignment attributes as set via the (Markdown/T_com_mindfusion_diagramming_LinkLabel.md) methods.
Tables have caption text and alignment is specified by (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaption) and (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionformat); table cells expose (Markdown/T_com_mindfusion_diagramming_Cell.md#settext) and (Markdown/T_com_mindfusion_diagramming_Cell.md#settextformat) methods.
All chart items expose (Markdown/T_com_mindfusion_diagramming_Diagram.md#setfont) method, specifying the name, style and size of the font of item's text.
The color of item's text is set through the corresponding (Markdown/T_com_mindfusion_diagramming_Diagram.md#settextcolor) method: ShapeNode.setTextColor, DiagramLink.setTextColor, TableNode.setTextColor and (Markdown/T_com_mindfusion_diagramming_Cell.md#settextcolor). Additionally, tables expose the setCaptionColor method for setting the color of their captions.
### Images
(Markdown/T_com_mindfusion_diagramming_ShapeNode.md) can render a java.awt.Image bitmap assigned to its (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setimage) property. Call the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#resizetofitimage) method to set the node's dimensions to the intrinsic size of the bitmap. You can add more images to a node by creating (Markdown/T_com_mindfusion_diagramming_NodeLabel.md) objects, and treat them as clickable icons by handling (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodeclicked) event and checking its (Markdown/T_com_mindfusion_diagramming_NodeEvent.md#getlabel) argument.
(Markdown/T_com_mindfusion_diagramming_TableNode.md) exposes (Markdown/T_com_mindfusion_diagramming_TableNode.md#setimage) property used to draw table's background. Each cell in the table can render its own (Markdown/T_com_mindfusion_diagramming_Cell.md#setimage) as well. For example that might be used to display an icon for the key field of a database table.
Images can be positioned in different ways: they can be tiled, stretched or aligned to the containing objects' centers or sides. Use (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setimagealign) and (Markdown/T_com_mindfusion_diagramming_TableNode.md#setimagealign) to specify how images are placed within the corresponding nodes. An image shown inside a node is clipped in accordance with the shape of that node. The (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setimagepadding) property specifies how much space to leave between image and node's borders.
### Shadows
The shadow of each diagram item can be painted with a distinct brush, as specified by the item's (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setshadowbrush) method. The brush can be set to null to hide an item's shadow. Shadow offsets from their items can be set individually by the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setshadowoffsetx) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setshadowoffsety) methods.
### DiagramLink-specific Properties
The shape and orientation of link segments is specified by the setStyle method; the number of segments is specified by the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setsegmentcount) method. The form and size of the arrowhead shape is set using the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadshape) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadshapesize) methods. Shapes displayed at the beginning of links can be set via (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setbaseshape) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setbaseshapesize). Shapes can be displayed at middles of segments, helping to follow long links . They are defined by the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setintermediateshape) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setintermediateshapesize) methods. The lines of arrowhead shapes are painted using the Pen specified by the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#setheadpen) method.
### Link crossings
Intersection points where links cross their paths can be rendered as arcs or breaks, as specified by (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinkcrossings). It depends on the z-order, which links jump over the others, or which links appear cut by the others. If (Markdown/T_com_mindfusion_diagramming_Diagram.md#getlinkcrossings) is set to Arcs, links with higher Z-index jump over those with lower Z-index. If set to Cut, links at lower Z position are cut by links at higher Z. Radius of arcs and breaks can be set through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setcrossingradius) method.
### ShapeNode-specific properties
The shape of a node is defined using the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setshape) method. Shape templates can be applied to a shape node with an orientation of 0/90/180/270 degrees as specified through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshapeorientation) method. The shape rotation can be modified through the setRotationAngle method. Your own drawing code may be invoked for a node, depending on the value specified in (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setcustomdraw). Shape nodes can be marked as transparent in the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settransparent) method, having only their text or images rendered.
### TableNode-specific properties
The outline of a table can be either a rectangle or rounded rectangle, as specified by the (Markdown/T_com_mindfusion_diagramming_TableNode.md#setshape) property. Set (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcellframestyle) to customize the borders of table cells. The table caption bar is painted according to (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionformat), (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionbrush) and (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionbackbrush) properties. You can run custom-drawing code for the whole table or its cells by setting (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcustomdraw) or (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcellcustomdraw) properties and handling (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawnode) or (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawcell) events.
## User Defined Node Shapes and Custom Drawing
The appearance of JDiagram items can be customized in several additional ways, as described below.
### Shape Templates
The (Markdown/T_com_mindfusion_diagramming_Shape.md) class provides the means for defining complex node shapes, made of straight lines, arcs and Bezier curves. A shape must always contain an outline to be used for hit testing, clipping and finding intersections with other objects. Optionally shapes can contain decoration elements and text region definitions. Decorations are visual elements that do not take part in hit testing and clipping. Text regions are the parts of shapes in which node's text is laid-out and rendered. JDiagram provides a set of over 100 predefined shape templates, which can be accessed by calling the (Markdown/T_com_mindfusion_diagramming_Shape.md#getshapes) method of the (Markdown/T_com_mindfusion_diagramming_Shape.md) class. Each predefined shape has a string identifier assigned to it. Use the (Markdown/T_com_mindfusion_diagramming_Shape.md#fromid) method to find a shape with the specified id. A shape template can be assigned to the (Markdown/T_com_mindfusion_diagramming_Shape.md#shape-members) member of shape nodes through the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setshape) method.
### Shape Libraries
The ShapeDesigner tool that comes with the JDiagram suite lets you draw custom shapes and store them in shape libraries. Note that the tool is not available yet as a Java application, and the JDiagram shape designer runs only under Microsoft Windows. A library file can be loaded into your application using the (Markdown/T_com_mindfusion_diagramming_ShapeLibrary.md) class. The definitions loaded from a shape library are automatically added to the shared shapes collection and can be accessed through the (Markdown/T_com_mindfusion_diagramming_ShapeLibrary.md#getshapes) and (Markdown/T_com_mindfusion_diagramming_Shape.md#fromid) methods of the (Markdown/T_com_mindfusion_diagramming_Shape.md) class, just as the predefined shapes.
### Custom Painting
Another way to customize a item's appearance is implemented by firing events each time an item is painted, giving you the option to attach your own drawing code to the JDiagram's rendering engine. Use the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setcustomdraw) method to enable that feature in your application. JDiagram gives you five options for custom drawing. If you choose (Markdown/T_com_mindfusion_diagramming_CustomDraw_0.md) drawing style, your drawing code will be executed after the standard item drawing code is executed and the image is rendered, but before the text is rendered. Furthermore, the Graphics object you receive to draw on has a clipping region applied that corresponds to the node's shape. If using (Markdown/T_com_mindfusion_diagramming_CustomDraw_0.md) drawing mode, none of the standard JDiagram drawing code is executed - just yours. The (Markdown/T_com_mindfusion_diagramming_CustomDraw_0.md) mode performs standard painting of items, but leaves the drawing of shadows to your code. Place your own drawing code in a handler of the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawnode), (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawlink) and (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawcell) events. This events are fired for each item with custom-draw style that needs repainting.
### Combining Custom Shapes with Custom Drawing
Finally, you could combine user-defined shapes with the Additional custom-painting style. Thus, you can get custom shapes enabled for a node and your custom painting code executing with the node shape used as clipping region. You might clear the clipping region, but be careful - if you draw outside node's bounding rectangle, the view may not update correctly.
## Text Formatting
### Text in Shape Nodes
A (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) can display text within its outlines. Text layout and alignment depend on the value specified through (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settextformat). The text is painted with the color set in (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settextbrush). Even more useful formatting attributes can be enabled by (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setenablestyledtext).
### Layout Text in Arbitrary Shapes
(Markdown/T_com_mindfusion_diagramming_ShapeNode.md) instances can have various shapes, as specified through (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setshape) and (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setshapeorientation) methods. JDiagram uses a formatting algorithm that fits exactly each line of the node's text within the width of a line inside a polygonal shape. If a shape node has curved outlines, the formatting algorithm approximates them the polylines.### Supplementary Node Labels
Apart from main text content, the (Markdown/T_com_mindfusion_diagramming_NodeLabel.md) class lets you display additional labels and pin them to node's edges or corners. Call the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#addlabel) method to create such supplementary labels, and use (Markdown/T_com_mindfusion_diagramming_NodeLabel.md) (and base (Markdown/T_com_mindfusion_diagramming_ItemLabel.md)) properties and methods to customize their appearance and position.### Text in Tables
A (Markdown/T_com_mindfusion_diagramming_TableNode.md) can display text in its caption bar and inside each cell. The caption text is specified by (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaption) and its color and alignment are specified through (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionbrush) and (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcaptionformat). The text in individual cells is specified by a call to the (Markdown/T_com_mindfusion_diagramming_Cell.md#settext) method and its color and format are set through (Markdown/T_com_mindfusion_diagramming_Cell.md#settextcolor) and (Markdown/T_com_mindfusion_diagramming_Cell.md#settextformat) respectively. Calling the (Markdown/T_com_mindfusion_diagramming_TableNode.md#setenablestyledtext) method can enable the use of formatting tags in the text.### Styled Text
The (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#setenablestyledtext) method for shape nodes and (Markdown/T_com_mindfusion_diagramming_TableNode.md#setenablestyledtext) method of tables respectively enable or disable styled text rendering. Styled text can have various attributes applied to the characters it contains. The attributes are specified using HTML-like formatting tags embedded in the raw text.
The following table lists the currently supported style tags:
| **Tag
** | **Description
**
| text
| Italic text
| text
| Bold text
| text
| Underlined text
| text
| Subscript
| text
| Superscript
| text
| Changes the color of the text. The red, green and blue color channels are specified as hexadecimal numbers.
### Link Labels
The text of a (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) is specified by (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settext). The setTextColor and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#settextstyle) methods can be used to specify the color and position of the text.
Apart from main text content, the (Markdown/T_com_mindfusion_diagramming_LinkLabel.md) class lets you display additional labels and pin them to link's points or segments. Call the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#addlabel) method to create such supplementary labels, and use (Markdown/T_com_mindfusion_diagramming_LinkLabel.md) (and base (Markdown/T_com_mindfusion_diagramming_ItemLabel.md)) properties and methods to customize their appearance and position. Labels can automatically avoid overlapping nodes or other labels when their (Markdown/T_com_mindfusion_diagramming_LinkLabel.md#setautoarrange) property is set.
### Fonts
All items provide a (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setfont) method that allows getting or setting the font used for rendering their text.
## Modifying the Diagram Appearance
You can customize most of JDiagram visualization effects.
### Background
JDiagram background area is filled using the brush specified by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbackbrush) method. Background theme can also be an image set by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbackgroundimage) method. The image can be any of the supported by Java file formats - JPG, PNG or GIF. Background image can be centered, aligned to a corner of the control or document, tiled or stretched to cover the drawing area - as specified by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setbackgroundimagealign) method.### Shadows
By default all diagram objects have shadows drawn under them. If the shadow style is set to OneLevel, the object shadows are drawn at the lowest Z-level under all objects, which makes them look as on single Z-level. If it is set to ZOrder, each shadow is drawn immediately under its corresponding object, possibly covering parts of other objects, which gives more 3D-like look to the diagram. If the style is set to None, no shadows are drawn. The shadows style can be set through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshadowsstyle) method. Shadows' offset from items is specified by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshadowoffset), (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshadowoffsetx) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshadowoffsety) methods. Shadows are painted using the brush specified via (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshadowbrush).
### Selection
Selection handles drawn around the active item can be customized through the style object returned by (Markdown/T_com_mindfusion_diagramming_Diagram.md#getactiveitemhandlesstyle). Items in multiple selection have their handles drawn using the style returned by (Markdown/T_com_mindfusion_diagramming_Diagram.md#getselecteditemhandlesstyle). Disabled manipulation handles are painted using the style returned by (Markdown/T_com_mindfusion_diagramming_Diagram.md#getdisabledhandlesstyle) when disabled handles are displayed (see (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshowdisabledhandles)). You can control the way multiple selection is displayed through the (Markdown/T_com_mindfusion_diagramming_Selection.md#sethandlesstyle) method of the (Markdown/T_com_mindfusion_diagramming_Selection.md) class.
### Mouse Cursors
Different mouse cursor icons can be set to give context-sensitive feedback to users, prompting them if creation/modification of an object is possible. The following methods can be used to specify the cursor's appearance in different situations: (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setpointercursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmovecursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdisallowcursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdrawlinkcursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setallowlinkcursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdisallowlinkcursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#sethorizontalresizecursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setverticalresizecursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setdiagonalresizecursor), (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcounterdiagonalresizecursor).
### Grid Settings
You can turn on/off the alignment grid by calling the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshowgrid) method. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgridcolor) method can be used to specify the color of grid points and lines.
## Miscellaneous
### Associate Custom Data with Items
You can associate custom values from any data type with diagram elements by setting their (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#settag) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#setid) properties. If the associated data is of a value type or of type that is serializable, then it is saved and loaded together with the diagram items when diagrams are saved or loaded. The (Markdown/T_com_mindfusion_diagramming_Diagram.md#findnode), (Markdown/T_com_mindfusion_diagramming_Diagram.md#findlink), (Markdown/T_com_mindfusion_diagramming_Diagram.md#findnodebyid) and (Markdown/T_com_mindfusion_diagramming_Diagram.md#findlinkbyid) methods let you find diagram elements associated with a specific value.### Inspecting Items Geometry
- The (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#intersects) method of (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) lets you test if links intersect other links or nodes.The (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getlength) method of the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) class returns the total length of a link.
- The (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#hittest) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#containspoint) methods let you check if an item contains specified point.### Fluent API
Builder classes in com.mindfusion.diagramming.builders package add support for fluent programming style. Static (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#with) and instance (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#init) methods in (Markdown/T_com_mindfusion_diagramming_DiagramItem.md), (Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md) and (Markdown/T_com_mindfusion_diagramming_AbstractLayout.md) -derived classes return a builder instance that can be used to set-up respective new or existing objects:
```java
diagram.getNodes().add(
ShapeNode.with()
.brush(Color.LIGHT_GRAY)
.font("Arial", 4)
.enableStyledText(true)
.text("Task 1")
.toolTip("This is the task")
.create());
diagram.getFactory()
.createShapeNode(20, 20, 20, 20).init()
.brush(Color.LIGHT_GRAY)
.font("Arial", 4)
.enableStyledText(true)
.text("Task 2")
.toolTip("This is the second task");
TreeLayout.with()
.levelDistance(20)
.nodeDistance(20)
.linkStyle(TreeLayoutLinkType.Cascading3)
.create()
.arrange(diagram);
```
## Tutorials
The tutorials in this section assume you have already added a (Markdown/T_com_mindfusion_diagramming_DiagramView.md) object to your Java application as shown in the (#getting-started) topics.
Eclipse projects that contain the full source code from the tutorials are available in the Samples folder under the JDiagram installation folder.
## Tutorial 1: Loading Graph Data
This tutorial shows how to load graph data from XML and create diagram objects corresponding to the graph nodes and edges.
1. Right-click the project in Package Explorer and choose New -> Other from the context menu. Create a new XML file called SampleGraph.xml and add to it content in the following form:
```
```
2. Add a windowOpened event handler to the JFrame:
```java
this.addWindowListener(new WindowAdapter()
{
@Override
public void windowOpened(WindowEvent e)
{
loadGraph(diagram, "SampleGraph.xml");
}
});
```
3. Create the loadGraph method and declare the following variables. "nodeMap" maps diagram nodes to their identifiers, and "bounds" contains the default node size.
```java
void loadGraph(Diagram diagram, String filepath)
{
HashMap nodeMap = new HashMap();
Rectangle2D.Float bounds = new Rectangle2D.Float(0, 0, 15, 8);
}
```
4. Load the XML document and its root element using the XML DOM API:
```java
// load the graph XML
Document document = loadXmlFile(filepath);
Element root = document.getDocumentElement();
```
5. Load the graph node elements and create their corresponding (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) objects by calling the (Markdown/T_com_mindfusion_diagramming_Factory.md#createshapenode) method of the (Markdown/T_com_mindfusion_diagramming_Factory.md) class. (Markdown/T_com_mindfusion_diagramming_Factory.md#createshapenode) is just a shortcut to creating a (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) instance using the "new" operator and adding it to the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getnodes) collection of the diagram. Additionally, this code maps the new node to the "id" attribute of the XML element, and sets the node's (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#settext) to the value of the "name" attribute.
```java
// load node data
NodeList nodes = root.getElementsByTagName("Node");
for (int i = 0; i < nodes.getLength(); ++i)
{
Element node = (Element)nodes.item(i);
ShapeNode diagramNode = diagram.getFactory().createShapeNode(bounds);
nodeMap.put(node.getAttribute("id"), diagramNode);
diagramNode.setText(node.getAttribute("name"));
}
```
6. Load the graph links and create corresponding (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) objects. The (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getorigin) and (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#getdestination) of the links are accessed by their ids through the "nodeMap" dictionary.
```java
// load link data
NodeList links = root.getElementsByTagName("Link");
for (int i = 0; i < links.getLength(); ++i)
{
Element link = (Element)links.item(i);
DiagramNode origin = nodeMap.get(link.getAttribute("origin"));
DiagramNode target = nodeMap.get(link.getAttribute("target"));
diagram.getFactory().createDiagramLink(origin, target);
}
```
7. Arrange the diagram using the (Markdown/T_com_mindfusion_diagramming_LayeredLayout.md) class.
```java
// arrange the graph
LayeredLayout layout = new LayeredLayout();
layout.setLayerDistance(12);
layout.arrange(diagram);
```
8. Build and run the project. If everything is fine, you should see this representation of the graph:
## Tutorial 2: Loading Hierarchical Data
This tutorial shows how to load hierarchical data recursively from XML and create diagram items corresponding to the hierarchy.
1. Right-click the project in Package Explorer and choose New -> Other from the context menu. Create a new XML file called SampleTree.xml and add to it content in the following form:
```
```
2. Add a windowOpened event handler to the JFrame:
```java
this.addWindowListener(new WindowAdapter()
{
@Override
public void windowOpened(WindowEvent e)
{
loadTree(diagram, "SampleTree.xml");
}
});
```
3. Add the following member to the frame class to hold the default node size.
```java
final Rectangle2D.Float bounds = new Rectangle2D.Float(0,0,30,8);
```
4. In loadTree, create the tree root node, and call the createChildren method, which builds the tree recursively.
```java
void loadTree(Diagram diagram, String filepath)
{
// load the tree XML
Document document = loadXmlFile(filepath);
Element rootElement = document.getDocumentElement();
// create diagram elements recursively
ShapeNode root = diagram.getFactory().createShapeNode(bounds);
root.setText("Project");
createChildren(diagram, root, rootElement);
}
```
5. Define createChildren as follows. It takes as parameters the parent (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) and parent XML element, iterates the child XML elements to build the next level of the hierarchy, and creates corresponding diagram items by calling (Markdown/T_com_mindfusion_diagramming_Factory.md#createshapenode) and (Markdown/T_com_mindfusion_diagramming_Factory.md#creatediagramlink).
```java
void createChildren(Diagram diagram, DiagramNode parentNode, Node parentElement)
{
NodeList elements = parentElement.getChildNodes();
for (int i = 0; i < elements.getLength(); i++)
{
Node element = elements.item(i);
if (element.getNodeName().equals("Activity"))
{
ShapeNode node = diagram.getFactory().createShapeNode(bounds);
node.setText(((Element)element).getAttribute("Name"));
diagram.getFactory().createDiagramLink(parentNode, node);
createChildren(diagram, node, element);
}
}
}
```
6. Use (Markdown/T_com_mindfusion_diagramming_TreeLayout.md) to arrange the diagram. Add the following code to the end of the loadTree method.
```java
// arrange using TreeLayout
TreeLayout layout = new TreeLayout();
layout.setType(TreeLayoutType.Cascading);
layout.setDirection(TreeLayoutDirection.LeftToRight);
layout.setLinkStyle(TreeLayoutLinkType.Cascading2);
layout.setNodeDistance(3);
layout.setLevelDistance(-8); // let horizontal positions overlap
layout.arrange(diagram);
```
7. Build and run the project. If everything is fine, you should see this representation of the hierarchy:
## Tutorial 3: Create a Custom Node Type
This tutorial shows how to define a custom node class that inherits (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) and adds several new properties. Its appearance is defined using an XML template.
1. Right-click the project in Package Explorer and choose New -> Other from the context menu. Create a new XML file called OrgChartNode.xml and add the following template code to it.
```
```
2. Add to the project a new class called OrgChartNode. Make it derive from (Markdown/T_com_mindfusion_diagramming_CompositeNode.md).
```java
import java.awt.*;
import java.io.*;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import com.mindfusion.diagramming.*;
import com.mindfusion.diagramming.components.*;
import com.mindfusion.diagramming.components.TextComponent;
public class OrgChartNode extends CompositeNode
{
static Document xmlTemplate = loadXmlFile("OrgChartNode.xml");
public OrgChartNode(Diagram diagram)
{
super(diagram);
}
private ShapeComponent shapeComponent;
private ImageComponent imageComponent;
private TextComponent titleComponent;
private TextComponent fullNameComponent;
private TextComponent detailsComponent;
}
```
3. In the constructor, load from the XML template using (Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md), and assign references to individual components using (Markdown/T_com_mindfusion_diagramming_CompositeNode.md#findcomponent):
```java
// create components from XML template
getComponents().add(XmlLoader.load(xmlTemplate, null, null));
// find components by name
shapeComponent = (ShapeComponent) findComponent("Shape");
imageComponent = (ImageComponent) findComponent("Image");
titleComponent = (TextComponent) findComponent("Title");
fullNameComponent = (TextComponent) findComponent("FullName");
detailsComponent = (TextComponent) findComponent("Details");
// customize appearance
titleComponent.getTextFormat().setHorizontalAlign(Align.Near);
fullNameComponent.getTextFormat().setHorizontalAlign(Align.Near);
detailsComponent.getTextFormat().setHorizontalAlign(Align.Near);
shapeComponent.setIsOutline(true);
setFill(new SolidBrush(Color.WHITE));
setStroke(new Pen(Color.BLACK, 0.5));
```
4. Define custom properties that delegate their implementation to the components loaded from the template.
```java
public Pen getStroke()
{
return shapeComponent.getPen();
}
public void setStroke(Pen value)
{
shapeComponent.setPen(value);
this.repaint();
}
public Brush getFill()
{
return shapeComponent.getBrush();
}
public void setFill(Brush value)
{
shapeComponent.setBrush(value);
this.repaint();
}
public Image getImage()
{
return imageComponent.getImage();
}
public void setImage(Image value)
{
imageComponent.setImage(value);
this.repaint();
}
public String getTitle()
{
return titleComponent.getText();
}
public void setTitle(String value)
{
titleComponent.setText(value);
this.repaint();
}
public String getFullName()
{
return fullNameComponent.getName();
}
public void setFullName(String value)
{
fullNameComponent.setText(value);
this.repaint();
}
public String getDetails()
{
return detailsComponent.getText();
}
public void setDetails(String value)
{
detailsComponent.setText(value);
this.repaint();
}
```
5. Add a (Markdown/T_com_mindfusion_diagramming_Diagram.md) and (Markdown/T_com_mindfusion_diagramming_DiagramView.md) to the JFrame constructor.
```java
Diagram diag = new Diagram();
DiagramView view = new DiagramView();
view.setDiagram(diag);
JScrollPane scrollPane = new JScrollPane(view);
scrollPane.setVisible(true);
getContentPane().add(scrollPane);
```
6. Add a few instances of the OrgChartNode class.
```java
// create first OrgChartNode
OrgChartNode node1 = new OrgChartNode(diag);
node1.setStroke(new Pen(0.5f, Color.RED));
node1.setBounds(20, 10, 80, 40);
node1.setTitle("CEO");
node1.setFullName("John Smith");
node1.setDetails("Our beloved leader.\n" +
"The CEO of this great corporation.");
node1.setImage(loadImage("image1.png"));
diag.add(node1);
// create second OrgChartNode
OrgChartNode node2 = new OrgChartNode(diag);
node2.setBounds(60, 60, 80, 40);
node2.setTitle("CIO");
node2.setFullName("Bob Smith");
node2.setDetails("The CIO of this great corporation.");
node2.setImage(loadImage("image2.png"));
diag.add(node2);
// create connector
diag.getFactory().createDiagramLink(node1, node2);
```
7. Build and run the project. You should see the custom nodes rendered like this:
## Tutorial 4: Custom Nodes Integration
This tutorial builds upon the OrgChartNode type from (#tutorial-3-create-a-custom-node-type). It shows how to fully integrate the custom type with other JDiagram features, such as serialization, undo support, creating nodes by drag-and-drop or drawing with the mouse on the canvas.
1. Add a (Markdown/T_com_mindfusion_diagramming_NodeListView.md) to the frame and add a few OrgChartNode objects as its children:
```java
// create a NodeListView
NodeListView nodeList = new NodeListView();
nodeList.setSize(110, 800);
nodeList.setDefaultNodeSize(new Dimension(80,40));
nodeList.setIconSize(new Dimension(60, 30));
nodeList.setIconMargin(new Dimension(5, 5));
getContentPane().add(nodeList, BorderLayout.WEST);
// add nodes to list view
OrgChartNode orgNode = new OrgChartNode(diagram);
orgNode.setTitle("CEO");
orgNode.setFullName("Type here");
orgNode.setDetails("Chief executive officer");
orgNode.setImage(loadImage("image1.png"));
nodeList.addNode(orgNode);
orgNode = new OrgChartNode(diagram);
orgNode.setTitle("CIO");
orgNode.setFullName("Type here");
orgNode.setDetails("Chief information officer");
orgNode.setImage(loadImage("image2.png"));
nodeList.addNode(orgNode);
```
2. Add a copy constructor to the OrgChartNode class. The control throws an exception if you try to create via drag-and-drop an instance of a class without copy constructor:
```java
public OrgChartNode(OrgChartNode prototype)
{
super(prototype);
findComponents();
}
void findComponents()
{
// find components by name
shapeComponent = (ShapeComponent) findComponent("Shape");
imageComponent = (ImageComponent) findComponent("Image");
titleComponent = (TextComponent) findComponent("Title");
fullNameComponent = (TextComponent) findComponent("FullName");
detailsComponent = (TextComponent) findComponent("Details");
}
```
3. In order to enable drawing OrgChartNodes with the mouse, inherit the (Markdown/T_com_mindfusion_diagramming_LinkNodesBehavior.md) and override its (Markdown/T_com_mindfusion_diagramming_LinkNodesBehavior.md#createnode) method. You could also inherit (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md) or any of its derived classes, and override either (Markdown/T_com_mindfusion_diagramming_LinkNodesBehavior.md#createnode) or (Markdown/T_com_mindfusion_diagramming_BehaviorBase.md#startdraw):
```java
public class OrgChartBehavior
extends LinkNodesBehavior
{
protected OrgChartBehavior(DiagramView diagramView)
{
super(diagramView);
}
@Override
protected DiagramNode createNode()
{
return new OrgChartNode(getDiagram());
}
}
```
4. Assign an instance of the behavior class to the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setcustombehavior) property of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md) class:
```java
// enable drawing OrgChartNodes with the mouse
view.setCustomBehavior(new OrgChartBehavior(view));
```
5. To implement serialization support, add an empty constructor to the node class. Since all custom properties simply delegate to the components hosted in base (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) class, you don't have to override serialization methods such as (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#savetoxml) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#loadfromxml) methods in this instance. However you will have to recreate the references to components loaded by the base class by overriding onLoad:
```java
// empty constructor required for deserialization
public OrgChartNode()
{
}
@Override
protected void onLoad(Diagram diagram)
{
super.onLoad(diagram);
findComponents();
}
```
6. Call the static (Markdown/T_com_mindfusion_diagramming_Diagram.md#registeritemclass) method to assign an XML element name to the custom item type:
```java
Diagram.registerClass(OrgChartNode.class, "my:OrgChartNode", 1);
```
7. In order to enable undo / redo of changes done on OrgChartNode, create a (Markdown/T_com_mindfusion_diagramming_DiagramItemProperties.md) -derived class that contains member corresponding to the additional properties defined by OrgChartNode:
```java
public class OrgChartNodeProperties
extends DiagramNodeProperties
{
String Title;
String FullName;
String Details;
Pen Stroke;
Brush Fill;
Image Image;
}
```
8. Override the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#createproperties), (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#saveproperties) and (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#restoreproperties) methods:
```java
@Override
protected DiagramItemProperties createProperties()
{
return new OrgChartNodeProperties();
}
@Override
protected void saveProperties(DiagramItemProperties props)
{
super.saveProperties(props);
OrgChartNodeProperties state = (OrgChartNodeProperties)props;
state.Title = getTitle();
state.FullName = getFullName();
state.Details = getDetails();
state.Stroke = getStroke();
state.Fill = getFill();
state.Image = getImage();
}
@Override
protected void restoreProperties(DiagramItemProperties props)
{
super.restoreProperties(props);
OrgChartNodeProperties state = (OrgChartNodeProperties)props;
setTitle(state.Title);
setFullName(state.FullName);
setDetails(state.Details);
setStroke(state.Stroke);
setFill(state.Fill);
setImage(state.Image);
}
```
9. The full source code for this tutorial is available in the Samples/Tutorial4 subfolder under the JDiagram installation folder.
## Reference
## Table of Predefined Shapes
| **Shape
** | **Identifier
** | **Common Uses
**
|
| Actor
| A user
An actor in use case model
|
| Alternative
| An alternative in SDL
An extraction in flowcharts
Storage in quality management
|
| Arrow1
| Use as desired
|
| Arrow2
| Use as desired
|
| Arrow3
| Transportation in quality management
A reference point
|
| Arrow4
| Use as desired
|
| Arrow5
| Use as desired
|
| Arrow6
| Use as desired
|
| Arrow7
| A signal
Electronic transmission of data
|
| Arrow8
| Use as desired
|
| Arrow9
| Use as desired
|
| BeginLoop
| Begin of a loop
|
| BpmnComplex
| BPMN Gateways: Complex Decision/Merge
|
| BpmnDataBasedXor
| BPMN Gateways: Data-Based Exclusive Decision/Merge (XOR)
|
| BpmnEndCancel
| BPMN Events: Cancel (End)
|
| BpmnEndCompensation
| BPMN Events: Compensation (End)
|
| BpmnEndError
| BPMN Events: Error (End)
|
| BpmnEndLink
| BPMN Events: Link (End)
|
| BpmnEndMessage
| BPMN Events: Message (End)
|
| BpmnEndMultiple
| BPMN Events: Multiple (End)
|
| BpmnEndTerminate
| BPMN Events: Terminate (End)
|
| BpmnEventBasedXor
| BPMN Gateways: Event-Based Exclusive Decision/Merge (XOR)
|
| BpmnInclusive
| BPMN Gateways: Inclusive Decision/Merge (OR)
|
| BpmnIntermediateCancel
| BPMN Events: Cancel (Intermediate)
|
| BpmnIntermediateCompensation
| BPMN Events: Compensation (Intermediate)
|
| BpmnIntermediateError
| BPMN Events: Error (Intermediate)
|
| BpmnIntermediateLink
| BPMN Events: Link (Intermediate)
|
| BpmnIntermediateMessage
| BPMN Events: Message (Intermediate)
|
| BpmnIntermediateMultiple
| BPMN Events: Multiple (Intermediate)
|
| BpmnIntermediateRule
| BPMN Events: Rule (Intermediate)
|
| BpmnIntermediateTimer
| BPMN Events: Timer (Intermediate)
|
| BpmnParallelFork
| BPMN Gateways: Parallel Fork/Join (AND)
|
| BpmnStartLink
| BPMN Events: Link (Start)
|
| BpmnStartMessage
| BPMN Events: Message (Start)
|
| BpmnStartMultiple
| BPMN Events: Multiple (Start)
|
| BpmnStartRule
| BPMN Events: Rule (Start)
|
| BpmnStartTimer
| BPMN Events: Timer (Start)
|
| Cloud
| Object instance in data flow diagrams
|
| Collate
| A collation in flowcharts
|
| ConeDown
| Use as desired
|
| ConeUp
| Use as desired
|
| ConnectedIssues
| Connected issues in quality management
|
| CreateRequest
| Request to create in SDL
|
| Cross
| Use as desired
|
| Cube
| Use as desired
|
| Cylinder
| Use as desired
|
| Database
| A database in flowcharts
|
| DataTransmition
| Electronic transmission of data
|
| DDelay
| Use as desired
|
| Decagon
| Use as desired
|
| Decision
| Decision in flowcharts
A comparison in flowcharts
Relationship in data flow diagrams
|
| Decision2
| A decision in SDL
|
| Delay
| A delay in process diagrams
|
| DInDelay
| Use as desired
|
| DirectAccessStorage
| A direct access storage
|
| DiskStorage
| Data stored on disk in flowcharts
|
| Display
| Data that is displayed for human use
|
| DividedEvent
| An event
|
| DividedProcess
| A process or document in flowcharts
Entity in data flow diagrams
|
| Document
| A document
|
| Donut
| Use as desired
|
| DOutDelay
| Use as desired
|
| Ellipse
| A cross-reference within the same page of a flowchart
Process in data flow diagrams
State in data flow diagrams
A continuation of the flowchart in SDL
An use case
Operation in quality management
|
| EndLoop
| End of a loop
|
| ExternalOrganization
| An external organization
|
| ExternalProcess
| An external process
|
| File
| A file
|
| FramedRectangle
| Use as desired
|
| Gate
| A gateway
|
| Heart
| Use as desired
|
| Heptagon
| Use as desired
|
| Hourglass
| Use as desired
|
| Input
| Data that is input by manual means
|
| InternalStorage
| An internal storage
|
| Interrupt
| An interrupt
|
| Interrupt2
| An interrupt
|
| IsoProcess
| Iso9000 process
|
| Junction
| A summing junction
A return in SDL
|
| Lightning
| Use as desired
|
| LinedDocument
| A document in flowcharts
|
| ManualOperation
| Operation performed by a human
|
| Merge
| A merger in flowcharts
Inbound goods in quality management
Non-electronic file
Stop state in data flow diagrams
|
| MessageFromUser
| A message from user side in SDL
|
| MessageToUser
| A message to user side in SDL
|
| Microform
| A microform
|
| MicroformProcessing
| A microform processing
|
| MicroformRecording
| A microform recording
|
| MultiDocument
| A multiple document in flowcharts
|
| MultiProc
| A multiple process or document in flowcharts
|
| Octagon
| Use as desired
|
| OfflineStorage
| An offline storage
|
| OffpageConnection
| A cross-reference to another page of a flowchart
|
| OffpageReference
| A cross-reference to another page of a flowchart
A foreign module
|
| Or
| An 'or' statement
|
| Pentagon
| Use as desired
|
| Plaque
| Use as desired
|
| PrimitiveFromCall
| A primitive from call control in SDL
|
| PrimitiveToCall
| A primitive to call control in SDL
|
| Procedure
| Procedure in SDL
|
| Process
| A process or document in flowcharts
A file or data storage
|
| Prysm
| Use as desired
|
| PunchedCard
| A punched card
|
| PyramidDown
| Use as desired
|
| PyramidUp
| Use as desired
|
| Rectangle
| A metric operation
'External interactor' in data flow diagrams
Inspection in quality management
|
| RightTriangle
| Use as desired
|
| RoundRect
| A process or item in flowcharts
An event
An issue in quality management
|
| RSave
| Input or output data in flowcharts
|
| Save
| A save in SDL
Input or output data in flowcharts
|
| Sort
| A sort operation
|
| Sphere
| Use as desired
|
| Star
| Use as desired
|
| Star4Pointed
| Use as desired
|
| Star5Pointed
| Use as desired
|
| Star6Pointed
| Use as desired
|
| Star7Pointed
| Use as desired
|
| Star16Pointed
| Use as desired
|
| Star24Pointed
| Use as desired
|
| Star32Pointed
| Use as desired
|
| Start
| Start of a program flow
A starting point in SDL
|
| Tape
| Sequentially accessible data
|
| Terminator
| Start or end of a program flow
|
| TransmittalTape
| A transmittal tape
|
| Trapezoid
| Use as desired
## Licensing
There are no separate trial and licensed builds of JAR archives for MindFusion components. When you purchase a license, you can find the license key for this component listed on the Keys & Downloads page at MindFusion's customer portal. Pass this license key to the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setlicensekey) method to disable the component's evaluation mode and stop displaying trial messages. (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setlicensekey) is a static method and you need to call it just once from application's initialization code.
## Online Resources
### Video Tutorials
- Database Schema with the Java Diagram Library
### Blog Posts
- Database Schema with the Java Diagram Library - Part I
- Database Schema with the Java Diagram Library - Part II
- A Class Diagram Tool with the Flowchart Library
## Technical Support
Detailed information about everything connected with software products offered by MindFusion - online documentation, demos, information about forthcoming products can be found at https://mindfusion.dev. The site is updated every day, so make sure you visit it regularly to catch up with the newest from us.
Apart from that, MindFusion employs a dedicated and technically proficient support team. This guarantees that all your questions and inquiries will be answered in quick and professional manner. They can be reached by e-mail at mailto:support@mindfusion.eu or by phone at +359 889 199 729.
You can post a question on the JDiagram discussion board here:
https://mindfusion.dev/Forum/YaBB.pl?board=jdiag_disc
or visit our help desk site:
https://mindfusion.dev/HelpDesk/index.php
We will be happy to hear any suggestions and recommendations you might have regarding JDiagram. We take in account the opinion of every single person who has shown interest in our products.
## MindFusion Products
MindFusion offers various programming components for different platforms. Below is a list of our products with links to their sections on our website as well link to download a trial version. Clients that have already purchased a product use an increasing discount for each subsequent one.
| **Diagramming
** | **Links
**
| Diagramming for WPF
| Product Information
Download
| Diagramming for WinForms
| Product Information
Download
| Diagramming for Java Swing
| Product Information
Download
| Diagramming for JavaScript
| Product Information
Download
| Diagramming for ASP.NET
| Product Information
Download
| Diagramming for ASP.NET MVC
| Product Information
Download
| Diagramming for Xamarin
| Product Information
Download
| Diagramming for UWP
| Product Information
Download
| Diagramming for Android
| Product Information
Download
| DiagramViewer for iOS/Cocoa Touch
| Product Information
Download
| Diagramming for ActiveX
| Product Information
Download
| Diagramming for Silverlight
| Product Information
Download
| **Charting
** | **Links
**
| Charting for WPF
| Product Information
Download
| Charting for WinForms
| Product Information
Download
| Charting for Java Swing
| Product Information
Download
| Charting for JavaScript
| Product Information
Download
| Charting for ASP.NET
| Product Information
Download
| Charting for Xamarin
| Product Information
Download
| Charting for Android
| Product Information
Download
| Charting for Silverlight
| Product Information
Download
| **Scheduling
** | **Links
**
| Scheduling for WPF
| Product Information
Download
| Scheduling for WinForms
| Product Information
Download
| Scheduling for Java Swing
| Product Information
Download
| Scheduling for JavaScript
| Product Information
Download
| Scheduling for ASP.NET
| Product Information
Download
| Scheduling for Xamarin
| Product Information
Download
| Scheduling for Silverlight
| Product Information
Download
| **Spreadsheet
** | **Links
**
| Spreadsheet for WPF
| Product Information
Download
| Spreadsheet for WinForms
| Product Information
Download
| Spreadsheet for Java Swing
| Product Information
Download
| **Reporting
** | **Links
**
| Reporting for WPF
| Product Information
Download
| Reporting for WinForms
| Product Information
Download
| Reporting for Silverlight
| Product Information
Download
| **Virtual Keyboard
** | **Links
**
| Virtual Keyboard for WPF
| Product Information
Download
| Virtual Keyboard for WinForms
| Product Information
Download
| Virtual Keyboard for Java Swing
| Product Information
Download
| Virtual Keyboard for JavaScript
| Product Information
Download
| **Mapping
** | **Links
**
| Mapping for WPF
| Product Information
Download
| Mapping for WinForms
| Product Information
Download
| Mapping for ASP.NET
| Product Information
Download
| Mapping for Silverlight
| Product Information
Download
| **Suites
** | **Links
**
| Pack for WPF
| Product Information
Download
| Pack for WinForms
| Product Information
Download
| Pack for Java Swing
| Product Information
Download
| Pack for JavaScript
| Product Information
Download
| Pack for ASP.NET
| Product Information
Download
| Pack for Xamarin
| Product Information
Download
| Pack for Silverlight
| Product Information
Download
| Pack for Diagramming
| Product Information
Download
| Pack for Scheduling
| Product Information
Download
# Section 2: API Class Reference
The following are links to the consolidated class reference guides. Each file contains all constructors, fields, properties, methods, and events for that class.
### Namespace com.mindfusion.common
- [Accordion Class](Markdown/T_com_mindfusion_common_Accordion.md): A container control that displays a stack of collapsible panes.
- [AccordionPane Class](Markdown/T_com_mindfusion_common_AccordionPane.md): Represents a single collapsible pane within an (Markdown/T_com_mindfusion_common_Accordion.md) control.
- [AlignConverter Class](Markdown/T_com_mindfusion_common_AlignConverter_0.md):
- [ArrayIterable Class](Markdown/T_com_mindfusion_common_ArrayIterable.md): Defines an Iterable on a two-dimensional array of type T.
- [BaseList Class](Markdown/T_com_mindfusion_common_BaseList_0.md): Represents a generic list with modification notifications.
- [BaseListAdapter Class](Markdown/T_com_mindfusion_common_BaseListAdapter_0.md): Provides empty implementations for the methods defined in the (Markdown/T_com_mindfusion_common_BaseListListener_0.md) interface.
- [BaseListListener Interface](Markdown/T_com_mindfusion_common_BaseListListener_0.md): Defines the events raised by the (Markdown/T_com_mindfusion_common_BaseList_0.md) class.
- [BitMask Interface](Markdown/T_com_mindfusion_common_BitMask.md):
- [ByRef Class](Markdown/T_com_mindfusion_common_ByRef.md): Allows using "by reference" value type parameters.
- [CanConvert Interface](Markdown/T_com_mindfusion_common_CanConvert_0.md):
- [Category Interface](Markdown/T_com_mindfusion_common_Category.md): Specifies the name of a category in which to group annotated property when displayed in a property grid.
- [ChangeListener Interface](Markdown/T_com_mindfusion_common_ChangeListener_0.md): Defines the events raised when an object is changed.
- [Collections Class](Markdown/T_com_mindfusion_common_Collections_0.md): Provides utility methods for processing collections.
- [ColorConverter Class](Markdown/T_com_mindfusion_common_ColorConverter_0.md):
- [CommonUtils Class](Markdown/T_com_mindfusion_common_CommonUtils.md):
- [Comparison Interface](Markdown/T_com_mindfusion_common_Comparison.md):
- [Convert Class](Markdown/T_com_mindfusion_common_Convert.md): Converts various types to and from string in a locale-independent way.
- [Convertible Interface](Markdown/T_com_mindfusion_common_Convertible.md):
- [DateTime Class](Markdown/T_com_mindfusion_common_DateTime_0.md): Immutable representation of date and time.
- [DayOfWeek Enumeration](Markdown/T_com_mindfusion_common_DayOfWeek_0.md): Specifies the day of the week.
- [DefaultComparison Class](Markdown/T_com_mindfusion_common_DefaultComparison.md):
- [Double Class](Markdown/T_com_mindfusion_common_Double.md):
- [Duration Class](Markdown/T_com_mindfusion_common_Duration_0.md): Represents an immutable time interval.
- [EqualityComparer Interface](Markdown/T_com_mindfusion_common_EqualityComparer.md):
- [Equatable Interface](Markdown/T_com_mindfusion_common_Equatable.md):
- [ExtendedArrayList Class](Markdown/T_com_mindfusion_common_ExtendedArrayList.md): Represents an ArrayList which is capable to sort and reverse itself.
- [ExtendedHashMap Class](Markdown/T_com_mindfusion_common_ExtendedHashMap.md): Represents a HashMap which provides a tryGetValue method.
- [Formattable Interface](Markdown/T_com_mindfusion_common_Formattable.md):
- [Helper Class](Markdown/T_com_mindfusion_common_Helper_0.md): Provides utility methods when translating from C# to Java.
- [HorizontalAlignment Class](Markdown/T_com_mindfusion_common_HorizontalAlignment_0.md): Specifies how an object or text is horizontally aligned relative to an element.
- [HorizontalAlignment Enumeration](Markdown/T_com_mindfusion_common_HorizontalAlignment.md): Specifies how an object or text is horizontally aligned relative to an element.
- [IntegerComparison Class](Markdown/T_com_mindfusion_common_IntegerComparison.md):
- [InvalidFormatException Class](Markdown/T_com_mindfusion_common_InvalidFormatException_0.md): Thrown during deserialization if the supplied source is not in the appropriate format.
- [InvalidOperationException Class](Markdown/T_com_mindfusion_common_InvalidOperationException_0.md): Thrown when performing an operation that is considered illegal in the current context.
- [ISupportInitialize Interface](Markdown/T_com_mindfusion_common_ISupportInitialize.md):
- [JsonContext Class](Markdown/T_com_mindfusion_common_JsonContext.md):
- [JsonConverter Class](Markdown/T_com_mindfusion_common_JsonConverter.md):
- [JsonObject Class](Markdown/T_com_mindfusion_common_JsonObject.md): Represents a dictionary of property names and values.
- [JsonValue Class](Markdown/T_com_mindfusion_common_JsonValue.md):
- [KeyValuePair Class](Markdown/T_com_mindfusion_common_KeyValuePair.md):
- [License Class](Markdown/T_com_mindfusion_common_License.md):
- [LicenseManager Class](Markdown/T_com_mindfusion_common_LicenseManager.md):
- [ListChangedAction Class](Markdown/T_com_mindfusion_common_ListChangedAction_0.md): Describes the action that caused a (Markdown/T_com_mindfusion_common_BaseListListener_0.md#listchanged) event.
- [ListChangedEvent Class](Markdown/T_com_mindfusion_common_ListChangedEvent_0.md): Provides data for the (Markdown/T_com_mindfusion_common_BaseListListener_0.md#listchanged) event.
- [ListItemEvent Class](Markdown/T_com_mindfusion_common_ListItemEvent_0.md): Provides data for the (Markdown/T_com_mindfusion_common_BaseListListener_0.md#itemadded) event.
- [MyCheckBoxIcon Class](Markdown/T_com_mindfusion_common_MyCheckBoxIcon.md):
- [ObservableList Class](Markdown/T_com_mindfusion_common_ObservableList_1.md):
- [ObservableListListener Interface](Markdown/T_com_mindfusion_common_ObservableListListener_0.md):
- [Orientation Enumeration](Markdown/T_com_mindfusion_common_Orientation.md): Specifies orientation.
- [OrientationConverter Class](Markdown/T_com_mindfusion_common_OrientationConverter_0.md):
- [OverflowException Class](Markdown/T_com_mindfusion_common_OverflowException_0.md): Thrown when an operation results in an overflow.
- [Pair Class](Markdown/T_com_mindfusion_common_Pair.md): Defines a class used to store two related objects.
- [Parser Class](Markdown/T_com_mindfusion_common_Parser.md):
- [Queryable Class](Markdown/T_com_mindfusion_common_Queryable.md): Extends Iterable objects with additional functionality.
- [ReleaseDate Interface](Markdown/T_com_mindfusion_common_ReleaseDate.md):
- [ScrollEvent Class](Markdown/T_com_mindfusion_common_ScrollEvent_0.md): Provides data for the scroll events.
- [ScrollEventType Class](Markdown/T_com_mindfusion_common_ScrollEventType_0.md): Specifies the type of action used to raise a scroll event.
- [Serialization Class](Markdown/T_com_mindfusion_common_Serialization.md):
- [Serializer Class](Markdown/T_com_mindfusion_common_Serializer.md):
- [SwingFuture Class](Markdown/T_com_mindfusion_common_SwingFuture.md): Wraps a java.util.concurrent.Future to run completion on Swing UI thread. @param The result type.
- [TristateButtonModel Class](Markdown/T_com_mindfusion_common_TristateButtonModel.md):
- [TriStateCheckBox Class](Markdown/T_com_mindfusion_common_TriStateCheckBox.md):
- [TypeConverter Interface](Markdown/T_com_mindfusion_common_TypeConverter_0.md):
- [ValueType Interface](Markdown/T_com_mindfusion_common_ValueType_0.md): An annotation used to mark types which once were value types.
- [Vector Class](Markdown/T_com_mindfusion_common_Vector_0.md): Represents a two-dimensional vector.
- [VerticalAlignment Enumeration](Markdown/T_com_mindfusion_common_VerticalAlignment.md): Specifies how an object or text is vertically aligned relative to an element.
- [XDimension2D Class](Markdown/T_com_mindfusion_common_XDimension2D.md):
- [XmlException Class](Markdown/T_com_mindfusion_common_XmlException.md): Represents XML serialization error.
- [XmlFunctions Class](Markdown/T_com_mindfusion_common_XmlFunctions_0.md):
### Namespace com.mindfusion.diagramming
- [AbstractLayout Class](Markdown/T_com_mindfusion_diagramming_AbstractLayout.md): The base class for all layout classes.
- [Action Enumeration](Markdown/T_com_mindfusion_diagramming_Action_0.md): The members of this enumeration identify the current operation carried out interactively on an item. Usually you would pass one of these constants to the constructor of an InteractionState instance...
- [AddGroupCmd Class](Markdown/T_com_mindfusion_diagramming_AddGroupCmd.md): Implements creation of new groups.
- [AddItemCmd Class](Markdown/T_com_mindfusion_diagramming_AddItemCmd.md): Implements creation of new diagram items.
- [AddToContainerCmd Class](Markdown/T_com_mindfusion_diagramming_AddToContainerCmd.md): Undoable command that implements an addition of a node to a container.
- [AdjustmentHandle Class](Markdown/T_com_mindfusion_diagramming_AdjustmentHandle.md): Represents an adjustment handle used to move or modify diagram items.
- [AdjustmentHandles Class](Markdown/T_com_mindfusion_diagramming_AdjustmentHandles.md): Provides predefined sets of (Markdown/T_com_mindfusion_diagramming_NodeHandleType.md) elements that can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setenabled...
- [AeroEffect Class](Markdown/T_com_mindfusion_diagramming_AeroEffect.md): Represents an effect that adds semitransparency to the node and emphasizes its outline by adding a shade and an inner stroke. This effect can be applied to the nodes in a (Markdown/T_com_mindfusion...
- [Anchoring Enumeration](Markdown/T_com_mindfusion_diagramming_Anchoring_0.md): The members of this enumeration specify whether the automatic layout algorithms and the link routing algorithm should align link ends to the anchor points of nodes. Use these constants as parameter...
- [AnchorPattern Class](Markdown/T_com_mindfusion_diagramming_AnchorPattern.md): Represents a set of (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md) objects, which can be assigned to a node through the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setanchorpatter...
- [AnchorPoint Class](Markdown/T_com_mindfusion_diagramming_AnchorPoint.md): Represent a point where a link can connect to a node. A set of anchor points is represented by the (Markdown/T_com_mindfusion_diagramming_AnchorPattern.md) class. Such a set can be assigned to a no...
- [AnchorPointEvent Class](Markdown/T_com_mindfusion_diagramming_AnchorPointEvent.md): Contains the arguments passed to anchor point -related events.
- [AnchorPointList Class](Markdown/T_com_mindfusion_diagramming_AnchorPointList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_AnchorPoint.md) objects.
- [AnnealLayout Class](Markdown/T_com_mindfusion_diagramming_AnnealLayout.md): Implements a simulated annealing graph layout algorithm.
- [ArcTemplate Class](Markdown/T_com_mindfusion_diagramming_ArcTemplate.md): Represents an arc segment in a (Markdown/T_com_mindfusion_diagramming_Shape.md) definition.
- [ArrowHeads Class](Markdown/T_com_mindfusion_diagramming_ArrowHeads.md): Contains predefined arrowhead shapes.
- [AttachToLink Enumeration](Markdown/T_com_mindfusion_diagramming_AttachToLink_0.md): The members of this enumeration specify how a node is attached to a link. These constants can be used as parameters of the DiagramNode.attachTo method of the (Markdown/T_com_mindfusion_diagramming_...
- [AttachToNode Enumeration](Markdown/T_com_mindfusion_diagramming_AttachToNode_0.md): The members of this enumeration specify how a node is attached to another node. These constants can be used as parameters of the DiagramNode.attachTo method of the (Markdown/T_com_mindfusion_diagra...
- [AutoJson Interface](Markdown/T_com_mindfusion_diagramming_AutoJson.md):
- [AutoResize Enumeration](Markdown/T_com_mindfusion_diagramming_AutoResize_0.md): The members of this enumeration specify whether the size of the document area should be automatically enlarged if needed, and to what direction it should be enlarged. These constants can be used as...
- [BaseList Class](Markdown/CC_T_com_mindfusion_diagramming_BaseList_0.md): Implements common functionality of JDiagram List classes.
- [Behavior Enumeration](Markdown/T_com_mindfusion_diagramming_Behavior_0.md): The members of this enumeration specify how the component should respond to users actions. These constants can be used as arguments of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setb...
- [BehaviorBase Class](Markdown/T_com_mindfusion_diagramming_BehaviorBase.md): An abstract base class for types that define how the control reacts to users' actions with a mouse or other pointing devices.
- [BezierTemplate Class](Markdown/T_com_mindfusion_diagramming_BezierTemplate.md): Represents a Bezier curve in a (Markdown/T_com_mindfusion_diagramming_Shape.md) definition.
- [BranchIndicator Enumeration](Markdown/T_com_mindfusion_diagramming_BranchIndicator.md):
- [ByteArrayTransferable Class](Markdown/T_com_mindfusion_diagramming_ByteArrayTransferable.md): Implements clipboard support for diagram items.
- [CascadeLayout Class](Markdown/T_com_mindfusion_diagramming_CascadeLayout.md): Performs cascading layout on simple, connected graphs.
- [Cell Class](Markdown/T_com_mindfusion_diagramming_Cell.md): Represents a cell in a table. Cells are arranged in a grid of rows and columns, and can span more than one rows or columns if needed. Each cell can display an image and a text label.
- [CellEvent Class](Markdown/T_com_mindfusion_diagramming_CellEvent.md): Contains information passed to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#cellclicked) event defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [CellFrameStyle Enumeration](Markdown/T_com_mindfusion_diagramming_CellFrameStyle_0.md): The members of this enumeration specify the style of the frame lines of tables' cells. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_TableNode.md#setcellframestyle) m...
- [CellList Class](Markdown/T_com_mindfusion_diagramming_CellList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_Cell.md) objects.
- [CellValidationEvent Class](Markdown/T_com_mindfusion_diagramming_CellValidationEvent.md): Contains the arguments passed to event handlers, such as CellTextEditing.
- [ChangeItemCmd Class](Markdown/T_com_mindfusion_diagramming_ChangeItemCmd.md): Handles undo / redo of property changes.
- [CircularLayout Class](Markdown/T_com_mindfusion_diagramming_CircularLayout.md): Implements a circular graph layout algorithm. Nodes are distributed evenly on the circumference of a circle at positions that result in as few link crossing as possible.
- [ClassDescriptor Class](Markdown/T_com_mindfusion_diagramming_ClassDescriptor.md): Implements XML serialization support for diagram items.
- [Column Class](Markdown/T_com_mindfusion_diagramming_Column.md): Represents a column of cells in a table.
- [ColumnList Class](Markdown/T_com_mindfusion_diagramming_ColumnList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_Column.md) objects.
- [ColumnStyle Enumeration](Markdown/T_com_mindfusion_diagramming_ColumnStyle_0.md): The members of this enumeration specify whether a table's column is automatically resized when the table is resized. These constants can be used as parameters of the (Markdown/T_com_mindfusion_diag...
- [Command Class](Markdown/T_com_mindfusion_diagramming_Command.md): Represents an action that can be undone or redone.
- [CommandContext Class](Markdown/T_com_mindfusion_diagramming_CommandContext.md): Represents the context in which a command is executed.
- [CommandHistory Class](Markdown/T_com_mindfusion_diagramming_CommandHistory.md): Represent the command undo/redo history.
- [CommandList Class](Markdown/T_com_mindfusion_diagramming_CommandList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_Command.md) objects.
- [CompositeCmd Class](Markdown/T_com_mindfusion_diagramming_CompositeCmd.md): Represents a composite command object that contains other commands.
- [CompositeNode Class](Markdown/T_com_mindfusion_diagramming_CompositeNode.md): The (Markdown/T_com_mindfusion_diagramming_CompositeNode.md) class represents nodes that are defined via hierarchies of child components, arranged within layout panels.
- [CompositeNodeStyle Class](Markdown/T_com_mindfusion_diagramming_CompositeNodeStyle.md):
- [CompositeRouter Class](Markdown/T_com_mindfusion_diagramming_CompositeRouter.md): Implements a chain of link routers (objects implementing (Markdown/T_com_mindfusion_diagramming_LinkRouter.md) interface) so that a link passes through the sequence until it gets routed successfully.
- [ConnectionPoint Class](Markdown/T_com_mindfusion_diagramming_ConnectionPoint.md): This class represents a connection between an edge and a node in a graph. It decouples the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) class from the (Markdown/T_com_mindfusion_diagrammi...
- [Constants Class](Markdown/T_com_mindfusion_diagramming_Constants.md):
- [ContainerChildEvent Class](Markdown/T_com_mindfusion_diagramming_ContainerChildEvent.md): Contains arguments passed to ContainerChildEvent Handler.
- [ContainerNode Class](Markdown/T_com_mindfusion_diagramming_ContainerNode.md): Implements nodes that can contain other nodes.
- [ContainerNodeProperties Class](Markdown/T_com_mindfusion_diagramming_ContainerNodeProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) properties during undo / redo operations. If you need to implement undo support for the additional properties defined b...
- [ContainerNodeStyle Class](Markdown/T_com_mindfusion_diagramming_ContainerNodeStyle.md): Represents a reusable set of properties that define the appearance of container nodes.
- [ControlNode Class](Markdown/T_com_mindfusion_diagramming_ControlNode.md): (Markdown/T_com_mindfusion_diagramming_ControlNode.md) is an adapter class that enables using any java.awt.Component -derived object as a diagram node.
- [ControlNodeEvent Class](Markdown/T_com_mindfusion_diagramming_ControlNodeEvent.md): Contains the arguments passes to handlers of the control host serialization events.
- [ControlNodeProperties Class](Markdown/T_com_mindfusion_diagramming_ControlNodeProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_ControlNode.md) properties during undo / redo operations. If you need to implement undo support for the additional properties defined by ...
- [Converter Class](Markdown/T_com_mindfusion_diagramming_Converter.md): Provides capabilities to convert various types to and from strings in a culture-independent way.
- [CursorHint Enumeration](Markdown/T_com_mindfusion_diagramming_CursorHint_0.md): Specifies what mouse cursor to display while a user interacts with the diagram.
- [CustomDraw Enumeration](Markdown/T_com_mindfusion_diagramming_CustomDraw_0.md): The members of this enumeration specify what type of custom-drawing will be performed on an item. These constants can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_ShapeNode.m...
- [DecisionLayout Class](Markdown/T_com_mindfusion_diagramming_DecisionLayout.md): Implements a flowchart layout algorithm.
- [DefaultPaletteModel Class](Markdown/T_com_mindfusion_diagramming_DefaultPaletteModel.md): A default implementation of the (Markdown/T_com_mindfusion_diagramming_PaletteModel.md).
- [DelKeyAction Enumeration](Markdown/T_com_mindfusion_diagramming_DelKeyAction_0.md): The members of this enumeration specify the type of action performed when the user presses the DEL key.
- [Diagram Class](Markdown/T_com_mindfusion_diagramming_Diagram.md): The (Markdown/T_com_mindfusion_diagramming_Diagram.md) class represents a flow diagram.
- [DiagramAdapter Class](Markdown/T_com_mindfusion_diagramming_DiagramAdapter.md): Provides empty implementations for the methods defined in the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md) interface. This lets you override only the handlers for the events you are i...
- [DiagramBase Class](Markdown/T_com_mindfusion_diagramming_DiagramBase.md): The base class of the (Markdown/T_com_mindfusion_diagramming_Diagram.md) and (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) classes.
- [DiagramDocument Class](Markdown/T_com_mindfusion_diagramming_DiagramDocument.md): Represents a collection of diagram pages.
- [DiagramEvent Class](Markdown/T_com_mindfusion_diagramming_DiagramEvent.md): Contains information passed to the events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [DiagramItem Class](Markdown/T_com_mindfusion_diagramming_DiagramItem.md): The (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) class represents an element in a diagram. It defines the basic drawing, interaction, undo/redo and serialization functionality for all the...
- [DiagramItemList Class](Markdown/T_com_mindfusion_diagramming_DiagramItemList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_DiagramItem.md) objects.
- [DiagramItemProperties Class](Markdown/T_com_mindfusion_diagramming_DiagramItemProperties.md): The base class for types that store the values of diagram item properties during undo / redo operations.
- [DiagramItemState Class](Markdown/T_com_mindfusion_diagramming_DiagramItemState.md): Contains a snapshot of the internal state of a diagram item. Instances of this class are used to store the state of items for later undo or redo operations.
- [DiagramItemStyle Class](Markdown/T_com_mindfusion_diagramming_DiagramItemStyle.md): Represents a reusable set of properties that define the appearance of diagram items.
- [DiagramLink Class](Markdown/T_com_mindfusion_diagramming_DiagramLink.md): Links between nodes in JDiagram diagrams are represented by instances of the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) class.
- [DiagramLinkList Class](Markdown/T_com_mindfusion_diagramming_DiagramLinkList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) objects.
- [DiagramLinkProperties Class](Markdown/T_com_mindfusion_diagramming_DiagramLinkProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_DiagramLink.md) properties during undo / redo operations. If you need to implement undo support for the additional properties defined by ...
- [DiagramLinkState Class](Markdown/T_com_mindfusion_diagramming_DiagramLinkState.md): Contains a snapshot of the internal state of a (Markdown/T_com_mindfusion_diagramming_DiagramLink.md). Instances of this class are used to store the state of links for later undo or redo operations...
- [DiagramLinkStyle Class](Markdown/T_com_mindfusion_diagramming_DiagramLinkStyle.md): Represents a reusable set of properties that define the appearance of diagram links.
- [DiagramListener Interface](Markdown/T_com_mindfusion_diagramming_DiagramListener.md): Defines events raised by JDiagram in response to users actions.
- [DiagramNode Class](Markdown/T_com_mindfusion_diagramming_DiagramNode.md): (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) is an abstract base class from which the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md), (Markdown/T_com_mindfusion_diagramming_TableNod...
- [DiagramNodeList Class](Markdown/T_com_mindfusion_diagramming_DiagramNodeList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) objects.
- [DiagramNodeProperties Class](Markdown/T_com_mindfusion_diagramming_DiagramNodeProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) properties during undo / redo operations. If you need to implement undo support for the additional properties defined by ...
- [DiagramNodeState Class](Markdown/T_com_mindfusion_diagramming_DiagramNodeState.md): Contains a snapshot of the internal state of a (Markdown/T_com_mindfusion_diagramming_DiagramNode.md). Instances of this class are used to store the state of nodes for later undo or redo operations...
- [DiagramNodeStyle Class](Markdown/T_com_mindfusion_diagramming_DiagramNodeStyle.md): Represents a reusable set of properties that define the appearance of diagram nodes.
- [DiagramPage Class](Markdown/T_com_mindfusion_diagramming_DiagramPage.md): Represents a single page in a (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) object.
- [DiagramPageEvent Class](Markdown/T_com_mindfusion_diagramming_DiagramPageEvent.md): Contains the arguments passed to (Markdown/T_com_mindfusion_diagramming_DiagramPage.md)-related events.
- [DiagramPageValidationEvent Class](Markdown/T_com_mindfusion_diagramming_DiagramPageValidationEvent.md): Contains the arguments passed to handlers of DiagramPage validation events. @author Meppy
- [DiagramStyle Class](Markdown/T_com_mindfusion_diagramming_DiagramStyle.md): Represents a reusable set of properties that define the appearance of diagrams.
- [DiagramTransferHandler Class](Markdown/T_com_mindfusion_diagramming_DiagramTransferHandler.md): Provides support for drag and drop to DiagramView.
- [DiagramView Class](Markdown/T_com_mindfusion_diagramming_DiagramView.md): (Markdown/T_com_mindfusion_diagramming_DiagramView.md) is a Swing component that displays the content of a (Markdown/T_com_mindfusion_diagramming_Diagram.md) object.
- [DirectionConstraint Enumeration](Markdown/T_com_mindfusion_diagramming_DirectionConstraint_0.md): The members of these enumeration specify in what direction to constrain the movement of a node. These constants can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_NodeConstrain...
- [DisconnectLinkCmd Class](Markdown/T_com_mindfusion_diagramming_DisconnectLinkCmd.md): Disconnects links from a deleted node.
- [DocumentView Class](Markdown/T_com_mindfusion_diagramming_DocumentView.md): Represents an extended (Markdown/T_com_mindfusion_diagramming_DiagramView.md) for (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) objects.
- [Double Class](Markdown/T_com_mindfusion_diagramming_Double.md):
- [DraggedItem Class](Markdown/T_com_mindfusion_diagramming_DraggedNode.md): Class used to hold a DiagramItem reference during drag and drop.
- [DraggedItemTransferable Class](Markdown/T_com_mindfusion_diagramming_DraggedNodeTransferable.md): Implements drag-and-drop transfers from ItemListView.
- [DraggedShape Class](Markdown/T_com_mindfusion_diagramming_DraggedShape.md): Class that holds shape id and size during drag and drop operation.
- [DrawAnchorPointEvent Class](Markdown/T_com_mindfusion_diagramming_DrawAnchorPointEvent.md): Contains the arguments passed to the DrawAnchorPoint event handlers.
- [DrawCellEvent Class](Markdown/T_com_mindfusion_diagramming_DrawCellEvent.md): Contains the arguments passed to the (Markdown/T_com_mindfusion_diagramming_DrawCellEvent.md#drawcellevent-methods) event handlers.
- [DrawContainersBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawContainersBehavior.md): Implements the Behavior.DrawContainers behavior.
- [DrawControlsBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawControlsBehavior.md): Implements the Behavior.DrawControls behavior.
- [DrawFreeFormsBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawFreeFormsBehavior.md): This class is used when Behavior is set to DrawFreeForms or DrawFreeShapes.
- [DrawItemEvent Class](Markdown/T_com_mindfusion_diagramming_DrawItemEvent.md): Contains information passed to the custom-draw events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [DrawLinkEvent Class](Markdown/T_com_mindfusion_diagramming_DrawLinkEvent.md): Contains the arguments passed to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawlink) event handlers.
- [DrawLinksBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawLinksBehavior.md): Implements the Behavior.DrawLinks behavior.
- [DrawNodeEvent Class](Markdown/T_com_mindfusion_diagramming_DrawNodeEvent.md): Contains the arguments passed to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#drawnode) event handlers.
- [DrawNodesBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawNodesBehavior.md): The base class for behavior types that allow drawing of nodes, but not links.
- [DrawParams Class](Markdown/T_com_mindfusion_diagramming_DrawParams.md):
- [DrawShapesBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawShapesBehavior.md): Implements the Behavior.DrawShapes behavior.
- [DrawTablesBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawTablesBehavior.md): Implements the Behavior.DrawTables behavior.
- [DrawTreeViewsBehavior Class](Markdown/T_com_mindfusion_diagramming_DrawTreeViewsBehavior.md): Implements the Behavior.DrawTreeViews behavior.
- [DummyNode Class](Markdown/T_com_mindfusion_diagramming_DummyNode.md): Represents the origin and/or destination of an unconnected (Markdown/T_com_mindfusion_diagramming_DiagramLink.md).
- [EditCellTextEvent Class](Markdown/T_com_mindfusion_diagramming_EditCellTextEvent.md): Contains the arguments passed to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#celltextedited) event handlers.
- [EditLinkTextEvent Class](Markdown/T_com_mindfusion_diagramming_EditLinkTextEvent.md): Contains the arguments passed to (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#linktextedited) handlers.
- [EditNodeTextEvent Class](Markdown/T_com_mindfusion_diagramming_EditNodeTextEvent.md): Contains the arguments passed to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodetextedited) event handlers.
- [EditTextCmd Class](Markdown/T_com_mindfusion_diagramming_EditTextCmd.md): Changes the text of a (Markdown/T_com_mindfusion_diagramming_DiagramItem.md).
- [EditTreeItemTextEvent Class](Markdown/T_com_mindfusion_diagramming_EditTreeItemTextEvent.md): Contains the arguments passed to (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#treeitemtextedited) handlers.
- [EffectPhase Enumeration](Markdown/T_com_mindfusion_diagramming_EffectPhase_0.md): The members of this enumeration specify the rendering phase during which an effect application is requested.
- [ElementTemplate Class](Markdown/T_com_mindfusion_diagramming_ElementTemplate.md): This is the base class for the elements that can be used in (Markdown/T_com_mindfusion_diagramming_Shape.md) definitions. You will use its descendants - (Markdown/T_com_mindfusion_diagramming_LineT...
- [ExpandButtonAction Enumeration](Markdown/T_com_mindfusion_diagramming_ExpandButtonAction_0.md): The members of this enumeration specify what action is triggered by the +/- buttons that are displayed near expandable nodes.
- [ExpandButtonPosition Enumeration](Markdown/T_com_mindfusion_diagramming_ExpandButtonPosition_0.md): The members of this enumeration specify possible locations for expand/collapse buttons.
- [ExpandHeaderRowCmd Class](Markdown/T_com_mindfusion_diagramming_ExpandHeaderRowCmd.md): Implements undo and redo of collapsing or expanding the header row of a table section.
- [ExpandIconRenderer Class](Markdown/T_com_mindfusion_diagramming_ExpandIconRenderer.md): Draws expand and collapse buttons of (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#setexpandable) nodes.
- [ExpandItemCmd Class](Markdown/T_com_mindfusion_diagramming_ExpandItemCmd.md): Implements expanding/collapsing branched of items in a tree.
- [ExpandTreeViewItemCmd Class](Markdown/T_com_mindfusion_diagramming_ExpandTreeViewItemCmd.md): Implements support for undo of (Markdown/T_com_mindfusion_diagramming_TreeViewItem.md) collapse/expand operations.
- [Factory Class](Markdown/T_com_mindfusion_diagramming_Factory.md): Provides shortcut methods for creating and adding instances of the standard item types. Call the class methods through the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getfactory) property of ...
- [FitSize Enumeration](Markdown/T_com_mindfusion_diagramming_FitSize_0.md): Specifies how the (Markdown/T_com_mindfusion_diagramming_ShapeNode.md#resizetofittext) method should resize a box.
- [FlowchartLayout Class](Markdown/T_com_mindfusion_diagramming_FlowchartLayout.md): (Markdown/T_com_mindfusion_diagramming_FlowchartLayout.md) can be used to arrange flowcharts representing program source code.
- [FoldContainerCmd Class](Markdown/T_com_mindfusion_diagramming_FoldContainerCmd.md): Undoable command that implements folding and unfolding of container nodes.
- [Folder Class](Markdown/T_com_mindfusion_diagramming_Folder.md): Implements the fold/unfold button shown in ContainerNode caption.
- [FoldIconRenderer Class](Markdown/T_com_mindfusion_diagramming_FoldIconRenderer.md): Draws fold and unfold buttons in (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) caption bar.
- [FractalLayout Class](Markdown/T_com_mindfusion_diagramming_FractalLayout.md): A tree layout algorithm that places child nodes symmetrically around their parent node.
- [FreeFormHandle Class](Markdown/T_com_mindfusion_diagramming_FreeFormHandle.md): Represents an adjustment handle used to modify the outline of a (Markdown/T_com_mindfusion_diagramming_FreeFormNode.md).
- [FreeFormNode Class](Markdown/T_com_mindfusion_diagramming_FreeFormNode.md): A (Markdown/T_com_mindfusion_diagramming_FreeFormNode.md) collects all points from users' mouse or touch input and displays them as node's outline.
- [FreeFormNodeStyle Class](Markdown/T_com_mindfusion_diagramming_FreeFormNodeStyle.md): Represents a reusable set of properties that define the appearance of free-form nodes.
- [GlassEffect Class](Markdown/T_com_mindfusion_diagramming_GlassEffect.md): Represents a glass-like visual effect. This effect can be applied to the nodes in a (Markdown/T_com_mindfusion_diagramming_Diagram.md) by adding an instance of this class to the (Markdown/T_com_min...
- [GlassEffectType Enumeration](Markdown/T_com_mindfusion_diagramming_GlassEffectType_0.md): The members of this enumeration specify the type of a (Markdown/T_com_mindfusion_diagramming_GlassEffect.md) node effect.
- [GlassPane Class](Markdown/T_com_mindfusion_diagramming_GlassPane.md): For internal use.
- [Granularity Enumeration](Markdown/T_com_mindfusion_diagramming_Granularity_0.md): The members of this enumeration specify the granularity of the obstacles map generated by (Markdown/T_com_mindfusion_diagramming_QuickRouter.md).
- [GridLayout Class](Markdown/T_com_mindfusion_diagramming_GridLayout.md): Implements a grid graph layout algorithm. (Markdown/T_com_mindfusion_diagramming_GridLayout.md) arranges diagram nodes in a grid, keeping connected nodes close together. The algorithm strives to ac...
- [GridRouter Class](Markdown/T_com_mindfusion_diagramming_GridRouter.md): Implements a link routing algorithm that uses a grid to represent the free and occupied regions in the diagram.
- [GridStyle Enumeration](Markdown/T_com_mindfusion_diagramming_GridStyle_0.md): The members of this enumeration specify how the alignment grid should be drawn on the screen. Its elements can be used as arguments of the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setgrids...
- [Group Class](Markdown/T_com_mindfusion_diagramming_Group.md): Represents an hierarchical group of items. One of the items is considered the master item, the rest are subordinated items that follow the master one when it is modified.
- [GroupAttachCmd Class](Markdown/T_com_mindfusion_diagramming_GroupAttachCmd.md): Represents an action that attaches an item to a group.
- [GroupDetachCmd Class](Markdown/T_com_mindfusion_diagramming_GroupDetachCmd.md): Represents an action that detaches an item from a group.
- [GroupEvent Class](Markdown/T_com_mindfusion_diagramming_GroupEvent.md): Contains the arguments passed to handlers of group-related events, such as (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#groupdestroyed).
- [GroupList Class](Markdown/T_com_mindfusion_diagramming_GroupList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_Group.md) objects.
- [GroupRotation Enumeration](Markdown/T_com_mindfusion_diagramming_GroupRotation_0.md): The members of this enumeration indicate how rotation of a group's master node affects the nodes attached to that group.
- [HandlesStyle Enumeration](Markdown/T_com_mindfusion_diagramming_HandlesStyle_0.md): The members of this enumeration specify the appearance and functionality of the manipulation handles displayed around a selected node. They can be used as parameters of the (Markdown/T_com_mindfusi...
- [HandlesVisualStyle Class](Markdown/T_com_mindfusion_diagramming_HandlesVisualStyle.md): Defines the Pen and Brush objects used to draw items' adjustment handles.
- [HierarchicalLayout Class](Markdown/T_com_mindfusion_diagramming_HierarchicalLayout.md): Performs hierarchical layout on simple, connected, level-planar graphs.
- [HitTestEvent Class](Markdown/T_com_mindfusion_diagramming_HitTestEvent.md): Contains the arguments passed to custom hit-testing event handlers.
- [HitTestPriority Enumeration](Markdown/T_com_mindfusion_diagramming_HitTestPriority_0.md): The members of this enumeration specify the order of item hit testing. They can be used as arguments to the (Markdown/T_com_mindfusion_diagramming_Diagram.md#sethittestpriority) method.
- [HtmlBuilder Class](Markdown/T_com_mindfusion_diagramming_HtmlBuilder.md): Provides helper methods for building HTML image maps.
- [HyperLinkStyle Enumeration](Markdown/T_com_mindfusion_diagramming_HyperLinkStyle_0.md): Specifies how various export components should treat the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#sethyperlink) property of items.
- [IItemFactory Interface](Markdown/T_com_mindfusion_diagramming_IItemFactory.md): Defines an interface for constructing objects from their XML elements.
- [ImageAlign Enumeration](Markdown/T_com_mindfusion_diagramming_ImageAlign_0.md): The members of this enumeration specify the position and size of the image displayed inside a node. These constants can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_ShapeNode...
- [ImageLoadedEvent Class](Markdown/T_com_mindfusion_diagramming_ImageLoadedEvent.md): Contains information passed to the events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [InplaceEditable Interface](Markdown/T_com_mindfusion_diagramming_InplaceEditable.md): Represents an in-place editable object.
- [InPlaceEditEvent Class](Markdown/T_com_mindfusion_diagramming_InPlaceEditEvent.md): The event is raised when leaving in-place editing mode.
- [Interaction Class](Markdown/T_com_mindfusion_diagramming_Interaction.md): Tracks pointer messages to implement user interaction with the diagram.
- [InteractionState Class](Markdown/T_com_mindfusion_diagramming_InteractionState.md): Encapsulates the current state of user interaction with the control.
- [ItemEvent Class](Markdown/T_com_mindfusion_diagramming_ItemEvent.md): Contains information passed to the events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [ItemLabel Class](Markdown/T_com_mindfusion_diagramming_ItemLabel.md): The base class for node and link labels.
- [ItemListEvent Class](Markdown/T_com_mindfusion_diagramming_ItemListEvent.md): Provides data for the events that are raised by an (Markdown/T_com_mindfusion_diagramming_ItemListView.md).
- [ItemListView Class](Markdown/T_com_mindfusion_diagramming_ItemListView.md): A list view control that hosts (Markdown/T_com_mindfusion_diagramming_DiagramItem.md)s and supports drag-and-drop to (Markdown/T_com_mindfusion_diagramming_DiagramView.md).
- [ItemListViewAdapter Class](Markdown/T_com_mindfusion_diagramming_ItemListViewAdapter.md): Provides empty implementations for the methods defined in the (Markdown/T_com_mindfusion_diagramming_ItemListViewListener.md) interface. This lets you override only the handlers for the events you ...
- [ItemListViewListener Interface](Markdown/T_com_mindfusion_diagramming_ItemListViewListener.md): Defines the events that can be raised by an (Markdown/T_com_mindfusion_diagramming_ItemListView.md).
- [ItemTransferHandler Class](Markdown/T_com_mindfusion_diagramming_ItemTransferHandler.md): Implements drag-and-drop transfers from ItemListView.
- [JsonPersistContext Class](Markdown/T_com_mindfusion_diagramming_JsonPersistContext.md):
- [JsonSerializeTagEvent Class](Markdown/T_com_mindfusion_diagramming_JsonSerializeTagEventArgs.md): Contains the arguments passed to the JsonSerializeTag and JsonDeserializeTag event handlers.
- [LaneGrid Class](Markdown/T_com_mindfusion_diagramming_LaneGrid.md): Represents an (Markdown/T_com_mindfusion_diagramming_SwimlaneGrid.md) which operates on a (Markdown/T_com_mindfusion_diagramming_lanes_Grid.md) object.
- [LaneGridInteraction Class](Markdown/T_com_mindfusion_diagramming_LaneGridInteraction.md): Resizes rows and columns of the (Markdown/T_com_mindfusion_diagramming_LaneGrid.md).
- [Layer Class](Markdown/T_com_mindfusion_diagramming_Layer.md): The Layer class represents a layer in the diagram. The visibility, z order and lock status of items in a layer can be controlled via properties of the respective Layer object.
- [LayeredLayout Class](Markdown/T_com_mindfusion_diagramming_LayeredLayout.md): Implements a layered graph layout algorithm.
- [LayeredLayoutLinkType Enumeration](Markdown/T_com_mindfusion_diagramming_LayeredLayoutLinkType_0.md): Specifies the style of the links after they are laid out.
- [LayeredLayoutStatistics Class](Markdown/T_com_mindfusion_diagramming_LayeredLayoutStatistics.md): Encapsulates information about a layered layout which has already complete.
- [LayerListView Class](Markdown/T_com_mindfusion_diagramming_LayerListView.md): Provides user interface for changing layer attributes.
- [LayerListViewAdapter Class](Markdown/T_com_mindfusion_diagramming_LayerListViewAdapter.md): Provides empty implementations for the methods defined in the LayerListViewListener interface. This lets you override only the handlers for the events you are interested in, instead of implementing...
- [LayerListViewItem Class](Markdown/T_com_mindfusion_diagramming_LayerListViewItem.md): Represents an item within a LayerListView control.
- [LayerListViewListener Interface](Markdown/T_com_mindfusion_diagramming_LayerListViewListener.md): Defines the events that can be raised by LayerListView.
- [Layout Interface](Markdown/T_com_mindfusion_diagramming_Layout.md): Defines the interface of automatic graph layout classes.
- [LayoutLink Interface](Markdown/T_com_mindfusion_diagramming_LayoutLink.md): Defines a callback method called for links during layout.
- [LayoutNode Interface](Markdown/T_com_mindfusion_diagramming_LayoutNode.md): Defines a callback method called for nodes during layout.
- [LayoutProgress Interface](Markdown/T_com_mindfusion_diagramming_LayoutProgress.md): Defines a callback method that notifies about layout progress.
- [LegacySupport Class](Markdown/T_com_mindfusion_diagramming_LegacySupport.md): Implements deserialization of objects saved with JDiagram 1.x versions.
- [LegacySupportStream Class](Markdown/T_com_mindfusion_diagramming_LegacySupportStream.md): Implements deserialization of objects saved with JDiagram 1.x versions.
- [LineTemplate Class](Markdown/T_com_mindfusion_diagramming_LineTemplate.md): Represents a straight line segment in a (Markdown/T_com_mindfusion_diagramming_Shape.md) definition.
- [LinkAdjustmentHandle Class](Markdown/T_com_mindfusion_diagramming_LinkAdjustmentHandle.md): Represents an adjustment handle used to modify the position of a link's control point.
- [LinkContainersBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkContainersBehavior.md): Implements the Behavior.LinkContainers behavior.
- [LinkControlsBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkControlsBehavior.md): Implements the Behavior.LinkControls behavior.
- [LinkCrossings Enumeration](Markdown/T_com_mindfusion_diagramming_LinkCrossings_0.md): The members of this enumeration specify how the points where links cross should be drawn on the screen. It is used as parameter of the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setlinkcross...
- [LinkEvent Class](Markdown/T_com_mindfusion_diagramming_LinkEvent.md): Contains the arguments passed to handlers of link related events.
- [LinkFreeFormsBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkFreeFormsBehavior.md): This class is used when Behavior is set to LinkFreeForms or LinkFreeShapes.
- [LinkLabel Class](Markdown/T_com_mindfusion_diagramming_LinkLabel.md): Represents a label displayed by a (Markdown/T_com_mindfusion_diagramming_DiagramLink.md). New labels can be added to a link by calling the (Markdown/T_com_mindfusion_diagramming_DiagramLink.md#addl...
- [LinkNodesBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkNodesBehavior.md): The base class for behavior types that allow drawing both nodes and links.
- [LinkRouter Interface](Markdown/T_com_mindfusion_diagramming_LinkRouter.md): Defines methods that should be implemented by a link-router component. The control calls them when a new link path should be set in response to changes in the diagram, such as adding or modifying n...
- [LinkShape Enumeration](Markdown/T_com_mindfusion_diagramming_LinkShape_0.md): The members of this enumeration specify the geometry of link segments and how the segments are related to each other. The enumeration elements can be used as parameters of the (Markdown/T_com_mindf...
- [LinkShapeEvent Class](Markdown/T_com_mindfusion_diagramming_LinkShapeEvent.md): Contains the arguments passed to the SetSelfLoopShape event handler.
- [LinkShapesBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkShapesBehavior.md): Implements the Behavior.LinkShapes behavior.
- [LinkTablesBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkTablesBehavior.md): Implements the Behavior.LinkTables behavior.
- [LinkTextStyle Enumeration](Markdown/T_com_mindfusion_diagramming_LinkTextStyle_0.md): The members of this enumeration specify where the label of a link is placed and how it is oriented relatively to the link segments. These constants can be used as parameters of the (Markdown/T_com_...
- [LinkTreeViewsBehavior Class](Markdown/T_com_mindfusion_diagramming_LinkTreeViewsBehavior.md): Implements the Behavior.LinkTreeViews behavior.
- [LinkValidationEvent Class](Markdown/T_com_mindfusion_diagramming_LinkValidationEvent.md): Contains the arguments passed to handlers of link validation events.
- [Manipulator Class](Markdown/T_com_mindfusion_diagramming_Manipulator.md): The base class for interactive widgets displayed in diagram items.
- [MarkStyle Enumeration](Markdown/T_com_mindfusion_diagramming_MarkStyle_0.md): The members of this enumeration specify what marks should be drawn where the anchor points of a node are located. They can be used as parameters of the constructors and the (Markdown/T_com_mindfusi...
- [MeasureUnit Class](Markdown/T_com_mindfusion_diagramming_MeasureUnit.md): Specifies units of measure.
- [ModificationStart Enumeration](Markdown/T_com_mindfusion_diagramming_ModificationStart_0.md): The members of this enumeration specify how users can start modifying an item. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setmodificationstart) meth...
- [ModifierKeyAction Enumeration](Markdown/T_com_mindfusion_diagramming_ModifierKeyAction.md): Defines the actions that can be assigned to a modifier key such as CTRL or ALT.
- [ModifierKeyActions Class](Markdown/T_com_mindfusion_diagramming_ModifierKeyActions.md): Maps keyboard modifier keys to special actions in MindFusion.Diagramming, such as panning and drawing selection rectangle.
- [ModifyBehavior Class](Markdown/T_com_mindfusion_diagramming_ModifyBehavior.md): Implements the Behavior.Modify behavior.
- [ModifyItemCmd Class](Markdown/T_com_mindfusion_diagramming_ModifyItemCmd.md): Represents an action that changes the size or position of a diagram item.
- [MouseButtonAction Enumeration](Markdown/T_com_mindfusion_diagramming_MouseButtonAction.md): Specifies what actions can be associated with the middle and right mouse buttons.
- [MouseInputMode Enumeration](Markdown/T_com_mindfusion_diagramming_MouseInputMode_0.md): The members of this enumeration specify specify how to process mouse actions done over a (Markdown/T_com_mindfusion_diagramming_ControlNode.md).
- [MoveNodesBehavior Class](Markdown/T_com_mindfusion_diagramming_MoveNodesBehavior.md): This class is used when the view's (Markdown/T_com_mindfusion_diagramming_DiagramView.md#setbehavior) is set to (Markdown/T_com_mindfusion_diagramming_Behavior_0.md).
- [MultipleGraphsPlacement Enumeration](Markdown/T_com_mindfusion_diagramming_MultipleGraphsPlacement_0.md): The members of this enumeration specify graph orientation and positioning.
- [NamedEnum Interface](Markdown/T_com_mindfusion_diagramming_NamedEnum_0.md): Implements XML serialization of enumeration members.
- [NodeAdjustmentHandle Class](Markdown/T_com_mindfusion_diagramming_NodeAdjustmentHandle.md): Represents an adjustment handle used to move, resize or rotate a node.
- [NodeConstraints Class](Markdown/T_com_mindfusion_diagramming_NodeConstraints.md): Represents the movement and size constraints that can be applied to a node.
- [NodeEffect Class](Markdown/T_com_mindfusion_diagramming_NodeEffect.md): Represents the base class of all visual effects that can be applied to the nodes in a (Markdown/T_com_mindfusion_diagramming_Diagram.md). Effects can be applied by adding instances of the concrete ...
- [NodeEvent Class](Markdown/T_com_mindfusion_diagramming_NodeEvent.md): Contains the arguments passed to handlers of node-related events, such as (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#nodecreated) and (Markdown/T_com_mindfusion_diagramming_DiagramLi...
- [NodeHandleType Enumeration](Markdown/T_com_mindfusion_diagramming_NodeHandleType.md): Identifies the types of selection handles of a node.
- [NodeLabel Class](Markdown/T_com_mindfusion_diagramming_NodeLabel.md): Represents a label displayed by a (Markdown/T_com_mindfusion_diagramming_DiagramNode.md). New labels can be added to a node by calling the (Markdown/T_com_mindfusion_diagramming_DiagramNode.md#addl...
- [NodeListEvent Class](Markdown/T_com_mindfusion_diagramming_NodeListEvent.md): Contains the arguments passed to the NodeSelected and NodeRemoved event handlers.
- [NodeListView Class](Markdown/T_com_mindfusion_diagramming_NodeListView.md): Represents a list control containing (Markdown/T_com_mindfusion_diagramming_DiagramNode.md) objects. Nodes from the list can be dragged to a (Markdown/T_com_mindfusion_diagramming_Diagram.md) canva...
- [NodeListViewAdapter Class](Markdown/T_com_mindfusion_diagramming_NodeListViewAdapter.md): Provides empty implementations for the methods defined in the NodeListViewListener interface. This lets you override only the handlers for the events you are interested in, instead of implementing ...
- [NodeListViewListener Interface](Markdown/T_com_mindfusion_diagramming_NodeListViewListener.md): Defines the events that can be raised by NodeListView.
- [NodeTransferHandler Class](Markdown/T_com_mindfusion_diagramming_NodeTransferHandler.md): Implements drag-and-drop transfers from NodeListView.
- [NodeValidationEvent Class](Markdown/T_com_mindfusion_diagramming_NodeValidationEvent.md): Contains the arguments passed to handlers of node validation events.
- [NotifyPropertyChanged Interface](Markdown/T_com_mindfusion_diagramming_NotifyPropertyChanged.md): Defines the interface for subscribing to property change events.
- [OneWayLayout Class](Markdown/T_com_mindfusion_diagramming_OneWayLayout.md): Implements a one-way graph layout algorithm. The one-way layout ensures that links enter into nodes from the same general direction and exit them from the opposite side. If the graph contains cycle...
- [Orientation Enumeration](Markdown/T_com_mindfusion_diagramming_Orientation_0.md): The members of this enumeration specify what orientation a graphic element should have - vertical, horizontal, or one determined automatically by JDiagram. They can be used as parameters of the (Ma...
- [OrthogonalLayout Class](Markdown/T_com_mindfusion_diagramming_OrthogonalLayout.md): Implements an orthogonal graph layout algorithm. Each link is drawn as a chain of alternating horizontal and vertical segments. Nodes are placed in a way that facilitates few links bends and crossi...
- [OrthogonalRouter Class](Markdown/T_com_mindfusion_diagramming_OrthogonalRouter.md): Implements an orthogonal link routing algorithm.
- [Overview Class](Markdown/T_com_mindfusion_diagramming_Overview.md): The (#overview) control provides a scaled-down view of (Markdown/T_com_mindfusion_diagramming_Diagram.md) contents and allows scrolling and zooming the diagram with the mouse.
- [Palette Class](Markdown/T_com_mindfusion_diagramming_Palette.md): A control that displays a palette of diagram items grouped into categories.
- [PaletteCategory Class](Markdown/T_com_mindfusion_diagramming_PaletteCategory.md): Represents a category in a (Markdown/T_com_mindfusion_diagramming_Palette.md) control.
- [PaletteModel Interface](Markdown/T_com_mindfusion_diagramming_PaletteModel.md): Defines the data model for a (Markdown/T_com_mindfusion_diagramming_Palette.md) control.
- [PanBehavior Class](Markdown/T_com_mindfusion_diagramming_PanBehavior.md): Implements the (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) behavior.
- [Path Class](Markdown/T_com_mindfusion_diagramming_Path.md): Represents a series of connected nodes and links.
- [PathFinder Class](Markdown/T_com_mindfusion_diagramming_PathFinder.md): Provides methods that help you find paths and cycles in a graph.
- [PathList Class](Markdown/T_com_mindfusion_diagramming_PathList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_Path.md) objects.
- [PatternRouter Class](Markdown/T_com_mindfusion_diagramming_PatternRouter.md): Routes links by applying patterns of segment and turn sequences and accepting them when resulting paths do not cross nodes.
- [PolylineRouting Enumeration](Markdown/T_com_mindfusion_diagramming_PolylineRouting.md): Defines values that indicate how (Markdown/T_com_mindfusion_diagramming_LinkShape_0.md) links should be routed.
- [PrintOptions Class](Markdown/T_com_mindfusion_diagramming_PrintOptions.md): Defines the attributes of a printed diagram. Use the PrintOptions object returned by the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getprintoptions) method to set the attributes of a spe...
- [PrintPreview Class](Markdown/T_com_mindfusion_diagramming_PrintPreview.md): Implements a print preview window.
- [QuickRouter Class](Markdown/T_com_mindfusion_diagramming_QuickRouter.md): Implements a very fast link routing algorithm that uses a tree to represent the free and occupied regions in the diagram.
- [ReadOnlyDiagramNodeList Class](Markdown/T_com_mindfusion_diagramming_ReadOnlyDiagramNodeList.md): Represents a read-only wrapper of a node list.
- [ReadOnlyList Class](Markdown/T_com_mindfusion_diagramming_ReadOnlyList.md): Represents a generic read-only list.
- [RedimTableCmd Class](Markdown/T_com_mindfusion_diagramming_RedimTableCmd.md): Represents an action that changes the number of columns or rows in a table.
- [Relationship Enumeration](Markdown/T_com_mindfusion_diagramming_Relationship_0.md): The members of this enumeration specify how table rows should be related. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_TableNode.md#addrelation) method of the (Markd...
- [RelativeToLink Enumeration](Markdown/T_com_mindfusion_diagramming_RelativeToLink_0.md): The members of this enumeration specify how the link labels are positioned.
- [RelativeToNode Enumeration](Markdown/T_com_mindfusion_diagramming_RelativeToNode.md): The members of this enumeration specify how labels are positioned relative to their node.
- [RemoveFromContainerCmd Class](Markdown/T_com_mindfusion_diagramming_RemoveFromContainerCmd.md): Undoable command that implements removal of nodes from a container.
- [RemoveGroupCmd Class](Markdown/T_com_mindfusion_diagramming_RemoveGroupCmd.md): Represents an action that destroys a group.
- [RemoveItemCmd Class](Markdown/T_com_mindfusion_diagramming_RemoveItemCmd.md): Represents an action that removes an item from the diagram.
- [RenderCallback Interface](Markdown/T_com_mindfusion_diagramming_RenderCallback.md): This functional interface declares the prototype of drawing callbacks called by various icon (Markdown/T_com_mindfusion_diagramming_Renderers.md).
- [Renderers Class](Markdown/T_com_mindfusion_diagramming_Renderers.md): This class lets you set icons for shared diagram elements such as expand / collapse and fold / unfold buttons, or provide callbacks that draws them using Graphics2D code.
- [RenderOptions Class](Markdown/T_com_mindfusion_diagramming_RenderOptions.md): Defines the attributes of a printed diagram. Use the PrintOptions object returned by the (Markdown/T_com_mindfusion_diagramming_DiagramView.md#getprintoptions) method to set the attributes of a spe...
- [RenderTarget Enumeration](Markdown/T_com_mindfusion_diagramming_RenderTarget_0.md):
- [RepaintEvent Class](Markdown/T_com_mindfusion_diagramming_RepaintEvent.md): Specifies the coordinates of the area that should be repainted by views when the Repaint event is raised.
- [RerouteLinks Enumeration](Markdown/T_com_mindfusion_diagramming_RerouteLinks_0.md): The members of this enumeration specify in what circumstances JDiagram should automatically re-route links. An EnumSet of (Markdown/T_com_mindfusion_diagramming_RerouteLinks_0.md) values can be use...
- [ResizeTableColumnCmd Class](Markdown/T_com_mindfusion_diagramming_ResizeTableColumnCmd.md): Implements resizing of table's columns. Instances of this class are implicitly created by MindFusion.Diagramming in response to resizing table's columns interactively. References to those instances...
- [ResizeTableRowCmd Class](Markdown/T_com_mindfusion_diagramming_ResizeTableRowCmd.md): Implements resizing of table's rows. Instances of this class are implicitly created by MindFusion.Diagramming in response to resizing table's rows interactively. References to those instances are p...
- [RestrictToBounds Enumeration](Markdown/T_com_mindfusion_diagramming_RestrictToBounds_0.md): The members of this enumeration specify whether JDiagram lets users drag items outside of the currently define document bounds. They can be used as parameters of the (Markdown/T_com_mindfusion_diag...
- [RoundRectangleTemplate Class](Markdown/T_com_mindfusion_diagramming_RoundRectangleTemplate.md): Represents a straight line segment in a (Markdown/T_com_mindfusion_diagramming_Shape.md) definition.
- [RoutePattern Class](Markdown/T_com_mindfusion_diagramming_RoutePattern.md): Represents a template from which routes are created.
- [RouteStep Class](Markdown/T_com_mindfusion_diagramming_RouteStep.md): Represents segments or turns in routing patterns.
- [RouteStepKind Enumeration](Markdown/T_com_mindfusion_diagramming_RouteStepKind.md): Represents parts of a route template.
- [RoutingOptions Class](Markdown/T_com_mindfusion_diagramming_RoutingOptions.md): An instance of this class accessible by the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getroutingoptions) method lets you customize the behavior of the link routing algorithm.
- [Row Class](Markdown/T_com_mindfusion_diagramming_Row.md): Represents a row of cells in a table. Rows are the entity to which links related to a table are connected.
- [RowEvent Class](Markdown/T_com_mindfusion_diagramming_RowEvent.md): Contains the arguments passed to handlers of table row-related events.
- [RowList Class](Markdown/T_com_mindfusion_diagramming_RowList.md): A strongly typed list of (Markdown/T_com_mindfusion_diagramming_Row.md) objects.
- [Ruler Class](Markdown/T_com_mindfusion_diagramming_Ruler.md): The (Markdown/T_com_mindfusion_diagramming_Ruler.md) control provides horizontal and vertical scales that help users measure diagram items.
- [SaveToStringFormat Enumeration](Markdown/T_com_mindfusion_diagramming_SaveToStringFormat_0.md): The members of this enumeration specify in what format to save the diagram when generating a string using the (Markdown/T_com_mindfusion_diagramming_Diagram.md#savetostring) method.
- [ScrollBar Class](Markdown/T_com_mindfusion_diagramming_ScrollBar.md):
- [ScrollContainerCmd Class](Markdown/T_com_mindfusion_diagramming_ScrollContainerCmd.md): Implements support for undo of (Markdown/T_com_mindfusion_diagramming_ContainerNode.md) scroll operations.
- [ScrollIconRenderer Class](Markdown/T_com_mindfusion_diagramming_ScrollIconRenderer.md): Draws scroll arrows in (Markdown/T_com_mindfusion_diagramming_TableNode.md) caption bar.
- [ScrollTableCmd Class](Markdown/T_com_mindfusion_diagramming_ScrollTableCmd.md): Represents an action that scrolls table rows up or down.
- [ScrollTreeViewCmd Class](Markdown/T_com_mindfusion_diagramming_ScrollTreeViewCmd.md):
- [Selection Class](Markdown/T_com_mindfusion_diagramming_Selection.md): Represents a selection of multiple items. Each (Markdown/T_com_mindfusion_diagramming_Diagram.md) has its own (Markdown/T_com_mindfusion_diagramming_Selection.md) instance, which can be accessed by...
- [SelectionCopy Class](Markdown/T_com_mindfusion_diagramming_SelectionCopy.md): Used internally in the implementation of copy/paste functions.
- [SelectionEvent Class](Markdown/T_com_mindfusion_diagramming_SelectionEvent.md): Contains information passed to the selection events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [SelectionStyle Enumeration](Markdown/T_com_mindfusion_diagramming_SelectionStyle_0.md): The members of this enumeration specify what a multiple selection of items should look like. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_Selection.md#sethandlesstyl...
- [SelectionValidationEvent Class](Markdown/T_com_mindfusion_diagramming_SelectionValidationEvent.md): Contains information passed to the selection validation events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [SelectOnlyBehavior Class](Markdown/T_com_mindfusion_diagramming_SelectOnlyBehavior.md): Implements the Behavior.SelectOnly behavior.
- [Serialization Class](Markdown/T_com_mindfusion_diagramming_Serialization.md):
- [SerializeTagEvent Class](Markdown/T_com_mindfusion_diagramming_SerializeTagEvent.md): Contains information passed to the tag serialization related events in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [ShadowsStyle Enumeration](Markdown/T_com_mindfusion_diagramming_ShadowsStyle_0.md): The members of this enumeration specify how JDiagram should draw the shadows of items. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshadowsstyle) metho...
- [Shape Class](Markdown/T_com_mindfusion_diagramming_Shape.md): A (Markdown/T_com_mindfusion_diagramming_Shape.md) object describes a shape consisting of a series of straight lines, arcs and Bezier curves. The main component of a shape definition is its outline...
- [ShapeConverter Class](Markdown/T_com_mindfusion_diagramming_ShapeConverter.md): Converts strings to Shape.
- [ShapeData Class](Markdown/T_com_mindfusion_diagramming_ShapeData.md):
- [ShapeDecoration Class](Markdown/T_com_mindfusion_diagramming_ShapeDecoration.md): That class contained an array of shape template elements that define shape decorations. Can contain lines, arcs and Bezier curves. The shape is closed and filled.
- [ShapeEvent Class](Markdown/T_com_mindfusion_diagramming_ShapeEvent.md):
- [ShapeFormulaParam Class](Markdown/T_com_mindfusion_diagramming_ShapeFormulaParam.md): Represents the position of a ShapeControlPoint, passed as parameter to shape formulas.
- [ShapeLibrary Class](Markdown/T_com_mindfusion_diagramming_ShapeLibrary.md): The (Markdown/T_com_mindfusion_diagramming_ShapeLibrary.md) class represents a collection of shape definitions stored together.
- [ShapeList Class](Markdown/T_com_mindfusion_diagramming_ShapeList.md): A strongly-typed list of (Markdown/T_com_mindfusion_diagramming_Shape.md) objects.
- [ShapeListBox Class](Markdown/T_com_mindfusion_diagramming_ShapeListBox.md): The (Markdown/T_com_mindfusion_diagramming_ShapeListBox.md) control displays a set of shapes defined in the (Markdown/T_com_mindfusion_diagramming_Shape.md) class.
- [ShapeListBoxListener Interface](Markdown/T_com_mindfusion_diagramming_ShapeListBoxListener.md): Defines signatures for shape select, rename and delete events in ShapeListBox.
- [ShapeNode Class](Markdown/T_com_mindfusion_diagramming_ShapeNode.md): (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) objects represent nodes in graphs, tree, process diagrams, and so on.
- [ShapeNodeList Class](Markdown/T_com_mindfusion_diagramming_ShapeNodeList.md): A strongly-typed list of (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) objects.
- [ShapeNodeProperties Class](Markdown/T_com_mindfusion_diagramming_ShapeNodeProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_ShapeNode.md) properties during undo / redo operations. If you need to implement undo support for the additional properties defined by a ...
- [ShapeNodeState Class](Markdown/T_com_mindfusion_diagramming_ShapeNodeState.md):
- [ShapeNodeStyle Class](Markdown/T_com_mindfusion_diagramming_ShapeNodeStyle.md): Represents a reusable set of properties that define the appearance of shape nodes.
- [ShowAnchors Enumeration](Markdown/T_com_mindfusion_diagramming_ShowAnchors_0.md): The members of this enumeration specify whether JDiagram should display marks at the anchor points positions. They can be assigned to the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setshowan...
- [SimpleShape Enumeration](Markdown/T_com_mindfusion_diagramming_SimpleShape_0.md): The members of this enumeration specify the shape of a node's outline. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_TableNode.md#setshape) method of the (Markdown/T_...
- [SmoothingMode Enumeration](Markdown/T_com_mindfusion_diagramming_SmoothingMode_0.md): Specifies whether smoothing (antialiasing) is applied
- [SnapToAnchor Enumeration](Markdown/T_com_mindfusion_diagramming_SnapToAnchor_0.md): The members of this enumeration specify when a link should be aligned to a node's anchor point. They can be used as parameters of the (Markdown/T_com_mindfusion_diagramming_Diagram.md#setsnaptoanch...
- [SortOrder Class](Markdown/T_com_mindfusion_diagramming_SortOrder.md):
- [SpringLayout Class](Markdown/T_com_mindfusion_diagramming_SpringLayout.md): Implements the Spring-Embedder graph layout algorithm.
- [Style Class](Markdown/T_com_mindfusion_diagramming_Style.md): Represents an unordered dynamic collection of properties that can be identified by name.
- [SvgNode Class](Markdown/T_com_mindfusion_diagramming_SvgNode.md): Represents nodes that can render SVG drawings.
- [SvgNodeProperties Class](Markdown/T_com_mindfusion_diagramming_SvgNodeProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_SvgNode.md) properties during undo / redo operations. If you need to implement undo support for the additional properties defined by a cl...
- [SvgNodeStyle Class](Markdown/T_com_mindfusion_diagramming_SvgNodeStyle.md): Represents a reusable set of properties that define the appearance of SVG nodes.
- [SwimlaneGrid Interface](Markdown/T_com_mindfusion_diagramming_SwimlaneGrid.md): Represents an object which can be used by a SwimlaneLayout to adjust the corresponding swimlane grid.
- [SwimlaneLayout Class](Markdown/T_com_mindfusion_diagramming_SwimlaneLayout.md): Implements an algorithm which arranges nodes in lanes.
- [TabbedScrollPane Class](Markdown/T_com_mindfusion_diagramming_TabbedScrollPane.md): Represents a (Markdown/T_com_mindfusion_diagramming_DiagramView.md) that can display (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) objects. The individual diagram pages can be activate...
- [TabbedScrollPaneAdapter Class](Markdown/T_com_mindfusion_diagramming_TabbedScrollPaneAdapter.md): Provides empty implementations for the methods defined in the TabbedScrollPaneListener interface. This lets you override only the handlers for the events you are interested in, instead of implement...
- [TabbedScrollPaneListener Interface](Markdown/T_com_mindfusion_diagramming_TabbedScrollPaneListener.md): Defines the events that can be raised by TabbedScrollPane.
- [TableConnectionStyle Enumeration](Markdown/T_com_mindfusion_diagramming_TableConnectionStyle_0.md): The members of this enumeration specify whether links drawn by users are connected to tables rows, to tables as integral nodes, or both. They can be used as parameters of the (Markdown/T_com_mindfu...
- [TableNode Class](Markdown/T_com_mindfusion_diagramming_TableNode.md): Tables are diagram nodes that can contain multiple cells and can be related to other nodes through their rows.
- [TableNodeProperties Class](Markdown/T_com_mindfusion_diagramming_TableNodeProperties.md): Stores the values of (Markdown/T_com_mindfusion_diagramming_TableNode.md) attributes during undo / redo operations. If you need to implement undo support for the additional properties defined by a ...
- [TableNodeStyle Class](Markdown/T_com_mindfusion_diagramming_TableNodeStyle.md): Represents a reusable set of properties that define the appearance of table nodes.
- [TableSectionExpander Class](Markdown/T_com_mindfusion_diagramming_TableSectionExpander.md):
- [TextRenderer Class](Markdown/T_com_mindfusion_diagramming_TextRenderer.md):
- [Theme Class](Markdown/T_com_mindfusion_diagramming_Theme.md): Represents a set of (Markdown/T_com_mindfusion_diagramming_Style.md) objects for different diagram item types.
- [ThemeListener Interface](Markdown/T_com_mindfusion_diagramming_ThemeListener.md): Defines the events that can be raised by the Theme class.
- [Thickness Class](Markdown/T_com_mindfusion_diagramming_Thickness.md): Describes the thickness of a rectangular frame.
- [TickPosition Enumeration](Markdown/T_com_mindfusion_diagramming_TickPosition_1.md): The members of this enumeration specify the position of trackbar ticks.
- [TopologicalLayout Class](Markdown/T_com_mindfusion_diagramming_TopologicalLayout.md): Implements a topological ordering.
- [TreeItemList Class](Markdown/T_com_mindfusion_diagramming_TreeItemList.md):
- [TreeLayout Class](Markdown/T_com_mindfusion_diagramming_TreeLayout.md): Implements several algorithms for arranging tree structures.
- [TreeLayoutBalance Enumeration](Markdown/T_com_mindfusion_diagramming_TreeLayoutBalance_0.md): Specifies how to order child nodes in order to produce tree layouts with custom balance.
- [TreeLayoutLinkType Enumeration](Markdown/T_com_mindfusion_diagramming_TreeLayoutLinkType_0.md): The members of this enumeration specify what style to assign to the links processed by (Markdown/T_com_mindfusion_diagramming_TreeLayout.md). They can be used as parameters of the (Markdown/T_com_m...
- [TreeLayoutType Enumeration](Markdown/T_com_mindfusion_diagramming_TreeLayoutType_0.md): The members of this enumeration specify what the shape of a tree arranged by the (Markdown/T_com_mindfusion_diagramming_TreeLayout.md) class should be. They can be used as parameters of the (Markdo...
- [TreeMapLayout Class](Markdown/T_com_mindfusion_diagramming_TreeMapLayout.md): Implements a tree map layout algorithm.
- [TreeViewConnectionPoint Class](Markdown/T_com_mindfusion_diagramming_TreeViewConnectionPoint.md):
- [TreeViewConnectionStyle Enumeration](Markdown/T_com_mindfusion_diagramming_TreeViewConnectionStyle_0.md): The members of this enumeration specify the possible ways to connect links to TreeViewNodes. They can be assigned to the (Markdown/T_com_mindfusion_diagramming_TreeViewNode.md#setconnectionstyle) p...
- [TreeViewItem Class](Markdown/T_com_mindfusion_diagramming_TreeViewItem.md): Represents a constituent item of the hierarchy displayed inside a (Markdown/T_com_mindfusion_diagramming_TreeViewNode.md).
- [TreeViewNode Class](Markdown/T_com_mindfusion_diagramming_TreeViewNode.md): Represents nodes that can draw hierarchical data.
- [TreeViewNodeStyle Class](Markdown/T_com_mindfusion_diagramming_TreeViewNodeStyle.md): Represents a reusable set of properties that define the appearance of tree view nodes.
- [TriangularLayout Class](Markdown/T_com_mindfusion_diagramming_TriangularLayout.md): Performs triangular layout on simple, connected graphs.
- [UndoEvent Class](Markdown/T_com_mindfusion_diagramming_UndoEvent.md): Contains the arguments passed to the (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#actionrecorded), (Markdown/T_com_mindfusion_diagramming_DiagramListener.md#actionundone) and (Markdown...
- [UndoManager Class](Markdown/T_com_mindfusion_diagramming_UndoManager.md): Implements undo/redo functionality. The undo manager can be accessed by calling the (Markdown/T_com_mindfusion_diagramming_Diagram.md#getundomanager) method of the (Markdown/T_com_mindfusion_diagra...
- [UndoValidationEvent Class](Markdown/T_com_mindfusion_diagramming_UndoValidationEvent.md): Contains the arguments passed to the ActionRecording event handlers.
- [UnitType Enumeration](Markdown/T_com_mindfusion_diagramming_UnitType_0.md): Defines values that indicate whether point positions are specified as percentage, or in absolute units relative to the node's top-left corner.
- [Utilities Class](Markdown/T_com_mindfusion_diagramming_Utilities.md):
- [ValidationEvent Class](Markdown/T_com_mindfusion_diagramming_ValidationEvent.md): Contains information passed to the validation events defined in (Markdown/T_com_mindfusion_diagramming_DiagramListener.md).
- [VerticalFlowLayout Class](Markdown/T_com_mindfusion_diagramming_VerticalFlowLayout.md): A version of FlowLayout which arranges its components vertically.
- [XDimension2D Class](Markdown/T_com_mindfusion_diagramming_XDimension2D.md):
- [XmlElementNameAnnotation Interface](Markdown/T_com_mindfusion_diagramming_XmlElementNameAnnotation.md): Specifies a string to be used as a XML element name of a type during XML serialization.
- [XmlPersistContext Class](Markdown/T_com_mindfusion_diagramming_XmlPersistContext.md): Contains methods that can help you serialize and deserialize diagram items to and from XML documents.
- [XmlReaderException Class](Markdown/T_com_mindfusion_diagramming_XmlReaderException.md): An exception thrown by XmlReader if it cannot parse an input file.
- [XmlReaderListener Interface](Markdown/T_com_mindfusion_diagramming_XmlReaderListener.md): Defines events that let you load custom tag data from XML files.
- [ZoomBehavior Class](Markdown/T_com_mindfusion_diagramming_ZoomBehavior.md): Implements the (Markdown/T_com_mindfusion_diagramming_Behavior_0.md) behavior.
- [ZoomControl Class](Markdown/T_com_mindfusion_diagramming_ZoomControl.md): (Markdown/T_com_mindfusion_diagramming_ZoomControl.md) lets users zoom and pan a target (Markdown/T_com_mindfusion_diagramming_DiagramView.md) interactively.
### Namespace com.mindfusion.diagramming.components
- [AddChild Interface](Markdown/T_com_mindfusion_diagramming_components_AddChild.md): Defines a method for adding child objects to a parent objects.
- [BorderComponent Class](Markdown/T_com_mindfusion_diagramming_components_BorderComponent.md): Represents a component that draws a border around another component.
- [ButtonComponent Class](Markdown/T_com_mindfusion_diagramming_components_ButtonComponent.md): Represents a button-like component, which can respond to user clicks.
- [ButtonComponentAdapter Class](Markdown/T_com_mindfusion_diagramming_components_ButtonComponentAdapter.md): Provides empty implementations for the methods defined in the ButtonComponentListener interface. This lets you override only the handlers for the events you are interested in, instead of implementi...
- [ButtonComponentListener Interface](Markdown/T_com_mindfusion_diagramming_components_ButtonComponentListener.md): Defines the events that can be raised by ButtonComponent.
- [ButtonDrawEvent Class](Markdown/T_com_mindfusion_diagramming_components_ButtonDrawEventArgs.md): Contains arguments passed to the customDraw event of buttons.
- [ButtonState Enumeration](Markdown/T_com_mindfusion_diagramming_components_ButtonState.md): Indicates the state of a button.
- [ButtonType Enumeration](Markdown/T_com_mindfusion_diagramming_components_ButtonType.md): Indicates the behavior of the button.
- [CheckBoxComponent Class](Markdown/T_com_mindfusion_diagramming_components_CheckBoxComponent.md): Displays a check-box that lets users select true / false values.
- [ComponentBase Class](Markdown/T_com_mindfusion_diagramming_components_ComponentBase.md): Represents the abstract base of all components.
- [ComponentEvent Class](Markdown/T_com_mindfusion_diagramming_components_ComponentEvent.md): The base class for arguments supplied to various component-related events.
- [ComponentEventListener Interface](Markdown/T_com_mindfusion_diagramming_components_ComponentEventListener.md): Defines events raised by components.
- [ComponentFinder Class](Markdown/T_com_mindfusion_diagramming_components_ComponentFinder.md): For internal use.
- [ComponentHitTester Class](Markdown/T_com_mindfusion_diagramming_components_ComponentHitTester.md): For internal use.
- [ComponentHost Interface](Markdown/T_com_mindfusion_diagramming_components_ComponentHost.md): For internal use.
- [ComponentKeyEvent Class](Markdown/T_com_mindfusion_diagramming_components_ComponentKeyEvent.md): Provides data to keyboard-related events.
- [ComponentKeyEventAdapter Class](Markdown/T_com_mindfusion_diagramming_components_ComponentKeyEventAdapter.md): Provides empty implementations for the methods defined in the ComponentKeyEventListener interface. This lets you override only the handlers for the events you are interested in, instead of implemen...
- [ComponentKeyEventListener Interface](Markdown/T_com_mindfusion_diagramming_components_ComponentKeyEventListener.md): Defines keyboard events that can be raised by components.
- [ComponentMouseEvent Class](Markdown/T_com_mindfusion_diagramming_components_ComponentMouseEvent.md): Provides data to mouse-related component events.
- [ComponentMouseEventAdapter Class](Markdown/T_com_mindfusion_diagramming_components_ComponentMouseEventAdapter.md): Provides empty implementations for the methods defined in the ComponentMouseEventListener interface. This lets you override only the handlers for the events you are interested in, instead of implem...
- [ComponentMouseEventListener Interface](Markdown/T_com_mindfusion_diagramming_components_ComponentMouseEventListener.md): Defines keyboard events that can be raised by components.
- [ComponentPostLoader Class](Markdown/T_com_mindfusion_diagramming_components_ComponentPostLoader.md): For internal use.
- [ComponentTextEvent Class](Markdown/T_com_mindfusion_diagramming_components_ComponentTextEvent.md): Provides arguments for text-related events.
- [ComponentTextValidationEvent Class](Markdown/T_com_mindfusion_diagramming_components_ComponentTextValidationEvent.md): Provides argument for text validation events.
- [ComponentValidationEvent Class](Markdown/T_com_mindfusion_diagramming_components_ComponentValidationEvent.md): Provides arguments for validation events.
- [ComponentValidationEventListener Interface](Markdown/T_com_mindfusion_diagramming_components_ComponentValidationEventListener.md): Defines validation events that can be raised by components.
- [ComponentVisitor Interface](Markdown/T_com_mindfusion_diagramming_components_ComponentVisitor.md): For internal use.
- [ContainerComponent Class](Markdown/T_com_mindfusion_diagramming_components_ContainerComponent.md): Represents a component which can host other components.
- [ContentComponent Class](Markdown/T_com_mindfusion_diagramming_components_ContentComponent.md): Represents a component which can host a single component as its child.
- [EditComponent Class](Markdown/T_com_mindfusion_diagramming_components_EditComponent.md): Represents an editable text area.
- [EditComponentAdapter Class](Markdown/T_com_mindfusion_diagramming_components_EditComponentAdapter.md): Provides empty implementations for the methods defined in the EditComponentListener interface. This lets you override only the handlers for the events you are interested in, instead of implementing...
- [EditComponentListener Interface](Markdown/T_com_mindfusion_diagramming_components_EditComponentListener.md): Defines the events that can be raised by EditComponent.
- [GridPanel Class](Markdown/T_com_mindfusion_diagramming_components_GridPanel.md): Represents a container which arranges it's children in a two-dimensional grid.
- [HorizontalAlignment Class](Markdown/T_com_mindfusion_diagramming_components_HorizontalAlignment.md): Contains static constants that specify the horizontal alignment of a component relative to its allocated space. Center - Indicates that the component should be centered. Left - Indicates that the c...
- [ImageComponent Class](Markdown/T_com_mindfusion_diagramming_components_ImageComponent.md): Represents a component which can display an image.
- [NumericEditComponent Class](Markdown/T_com_mindfusion_diagramming_components_NumericEditComponent.md): Represents a numeric-only edit component.
- [NumericEditComponentListener Interface](Markdown/T_com_mindfusion_diagramming_components_NumericEditComponentListener.md): Defines the events that can be raised by NumericEditComponent.
- [Predicate Interface](Markdown/T_com_mindfusion_diagramming_components_Predicate.md):
- [RangeSliderRailComponent Class](Markdown/T_com_mindfusion_diagramming_components_RangeSliderRailComponent.md): Represents a slider rail component.
- [ShapeComponent Class](Markdown/T_com_mindfusion_diagramming_components_ShapeComponent.md): Represents components which can display geometric shapes.
- [SimplePanel Class](Markdown/T_com_mindfusion_diagramming_components_SimplePanel.md): A container which arranges its items so that they fill all available space.
- [SliderAdapter Class](Markdown/T_com_mindfusion_diagramming_components_SliderAdapter.md): Provides empty implementations for the methods defined in the SliderListener interface. This lets you override only the handlers for the events you are interested in, instead of implementing all me...
- [SliderComponent Class](Markdown/T_com_mindfusion_diagramming_components_SliderComponent.md): Represents a slider component, which allows users to select a single value or a range of values.
- [SliderListener Interface](Markdown/T_com_mindfusion_diagramming_components_SliderListener.md): Defines the events that can be raised by SliderComponent.
- [SliderRailAdapter Class](Markdown/T_com_mindfusion_diagramming_components_SliderRailAdapter.md): Provides empty implementations for the methods defined in the SliderRailListener interface. This lets you override only the handlers for the events you are interested in, instead of implementing al...
- [SliderRailComponent Class](Markdown/T_com_mindfusion_diagramming_components_SliderRailComponent.md): Represents a slider rail component.
- [SliderRailListener Interface](Markdown/T_com_mindfusion_diagramming_components_SliderRailListener.md): Defines the events that can be raised by SliderRailComponent.
- [SliderType Enumeration](Markdown/T_com_mindfusion_diagramming_components_SliderType.md): Specifies the type of a slider component.
- [SpinnerComponent Class](Markdown/T_com_mindfusion_diagramming_components_SpinnerComponent.md): Represents a spin edit component.
- [SpinnerComponentListener Interface](Markdown/T_com_mindfusion_diagramming_components_SpinnerComponentListener.md): Defines the events that can be raised by SpinnerComponent.
- [StackPanel Class](Markdown/T_com_mindfusion_diagramming_components_StackPanel.md): Represents a container which arranges its children either vertically or horizontally.
- [TextComponent Class](Markdown/T_com_mindfusion_diagramming_components_TextComponent.md): Represents a component displaying static unformatted text.
- [TextLayout Class](Markdown/T_com_mindfusion_diagramming_components_TextLayout.md): Encapsulates the layouting information for the text in edit components.
- [TextWrapping Enumeration](Markdown/T_com_mindfusion_diagramming_components_TextWrapping.md): Specifies the type of text wrapping.
- [ThumbComponent Class](Markdown/T_com_mindfusion_diagramming_components_ThumbComponent.md): Represents a thumb subcomponent in slider or similar components.
- [ThumbComponentAdapter Class](Markdown/T_com_mindfusion_diagramming_components_ThumbComponentAdapter.md): Provides empty implementations for the methods defined in the ThumbComponentListener interface. This lets you override only the handlers for the events you are interested in, instead of implementin...
- [ThumbComponentListener Interface](Markdown/T_com_mindfusion_diagramming_components_ThumbComponentListener.md): Defines the events that can be raised by ThumbComponent.
- [ThumbDragEvent Class](Markdown/T_com_mindfusion_diagramming_components_ThumbDragEventArgs.md): Provides data to the handlers of the ThumbComponent.Dragged event.
- [TypeResolver Interface](Markdown/T_com_mindfusion_diagramming_components_TypeResolver.md): Resolves types by their names.
- [ValueChangedEvent Class](Markdown/T_com_mindfusion_diagramming_components_ValueChangedEventArgs.md): Provides data for value change event handlers. @param The type of the value that is changing.
- [ValueChangingEvent Class](Markdown/T_com_mindfusion_diagramming_components_ValueChangingEventArgs.md): Provides data for value validation event handlers. @param The type of the value that is changing.
- [VerticalAlignment Class](Markdown/T_com_mindfusion_diagramming_components_VerticalAlignment.md): Contains static constants that specify the vertical alignment of a component relative to its allocated space. Bottom - Indicates that the component should be bottom-aligned. Center - Indicates that...
- [XmlLoader Class](Markdown/T_com_mindfusion_diagramming_components_XmlLoader.md): Provides methods for loading component hierarchies from XML.
- [XmlLoaderException Class](Markdown/T_com_mindfusion_diagramming_components_XmlLoaderException.md): An exception raised when a XmlLoader fails to parse XML content.
### Namespace com.mindfusion.diagramming.export
- [ExcelExporter Class](Markdown/T_com_mindfusion_diagramming_export_ExcelExporter.md): Exports MindFusion.Diagramming diagrams to Excel Open XML Format (XLSX) files.
- [PdfExporter Class](Markdown/T_com_mindfusion_diagramming_export_PdfExporter.md): Exports JDiagram diagrams to Adobe Portable Document Format (PDF) files.
- [SvgExporter Class](Markdown/T_com_mindfusion_diagramming_export_SvgExporter.md): Creates an SVG (Scalable Vector Graphics) drawing representing the content of a (Markdown/T_com_mindfusion_diagramming_Diagram.md).
- [VisioExporter Class](Markdown/T_com_mindfusion_diagramming_export_VisioExporter.md): Exports the contents of (Markdown/T_com_mindfusion_diagramming_Diagram.md) or (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) objects to Visio 2013 XML drawing files (.vsdx).
### Namespace com.mindfusion.diagramming.importers
- [DrawImporter Class](Markdown/T_com_mindfusion_diagramming_importers_DrawImporter.md): (Markdown/T_com_mindfusion_diagramming_importers_DrawImporter.md) lets you import an OpenOffice Draw document into a (Markdown/T_com_mindfusion_diagramming_Diagram.md) or (Markdown/T_com_mindfusion...
- [ImportItemEvent Class](Markdown/T_com_mindfusion_diagramming_importers_ImportItemEvent.md): Contains the arguments passed to handlers of the importItem event of (Markdown/T_com_mindfusion_diagramming_importers_VisioImportListener.md).
- [IPageHandler Interface](Markdown/T_com_mindfusion_diagramming_importers_IPageHandler.md):
- [VisioImporter Class](Markdown/T_com_mindfusion_diagramming_importers_VisioImporter.md): Imports Visio 2013 XML Drawing files (.vsdx) into (Markdown/T_com_mindfusion_diagramming_Diagram.md) or (Markdown/T_com_mindfusion_diagramming_DiagramDocument.md) objects.
- [VisioImportListener Interface](Markdown/T_com_mindfusion_diagramming_importers_VisioImportListener.md): Defines events raised by VisioImporter to let you customize imported shapes.
### Namespace com.mindfusion.diagramming.jlayout
- [AdjacencyMatrix Class](Markdown/T_com_mindfusion_diagramming_jlayout_AdjacencyMatrix.md):
- [AnnealLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_AnnealLayout.md):
- [AnnealLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_AnnealLayoutInfo.md):
- [AssistantType Class](Markdown/T_com_mindfusion_diagramming_jlayout_AssistantType.md): Indicates the type of an assistant node in a tree.
- [BaseLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_BaseLayout.md): Specifies how OrthogonalLayout should arrange nodes.
- [BaseList Class](Markdown/CC_T_com_mindfusion_diagramming_jlayout_BaseList_0.md): All JLayout list classes inherit from this one.
- [BorderTreeLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_BorderTreeLayout.md):
- [CascadeLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_CascadeLayout.md): Performs cascading layout on simple, connected graphs. The cascade layout places vertices on a virtual grid and arranges edges orthogonally, such that if the source graph is planar it is guaranteed...
- [CascadeLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_CascadeLayoutInfo.md): Contains settings for the CascadeLayout class.
- [CascadeLayoutStatistics Class](Markdown/T_com_mindfusion_diagramming_jlayout_CascadeLayoutStatistics.md): Encapsulates information about a cascade layout which has already complete.
- [CenterTreeLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_CenterTreeLayout.md):
- [CircularLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_CircularLayout.md):
- [CircularLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_CircularLayoutInfo.md):
- [DecisionLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_DecisionLayout.md): Performs decision layout on a graph.
- [DecisionLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_DecisionLayoutInfo.md): Contains settings for the (Markdown/T_com_mindfusion_diagramming_jlayout_DecisionLayout.md) class.
- [Direction Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_Direction_0.md): Specifies layout direction.
- [Double Class](Markdown/T_com_mindfusion_diagramming_jlayout_Double.md):
- [FlowchartLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_FlowchartLayout.md):
- [FlowchartLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_FlowchartLayoutInfo.md):
- [FractalLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_FractalLayout.md):
- [Graph Interface](Markdown/T_com_mindfusion_diagramming_jlayout_Graph.md):
- [GraphBuilder Interface](Markdown/T_com_mindfusion_diagramming_jlayout_GraphBuilder.md): Factory class used to create graphs.
- [GraphLibUtilities Class](Markdown/T_com_mindfusion_diagramming_jlayout_GraphLibUtilities.md): Provides utility methods for operating with the MindFusion.Graphs library.
- [GraphNodeHashMap Class](Markdown/T_com_mindfusion_diagramming_jlayout_GraphNodeHashMap.md):
- [GraphSplitter Class](Markdown/T_com_mindfusion_diagramming_jlayout_GraphSplitter.md):
- [GridLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_GridLayout.md):
- [GridLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_GridLayoutInfo.md):
- [HierarchicalLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_HierarchicalLayout.md): Performs hierarchical layout on simple, connected, level-planar graphs. The hierarchical layout places vertices on predefined levels, such that if the source graph is level-planar it is guaranteed ...
- [HierarchicalLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_HierarchicalLayoutInfo.md): Contains settings for the (Markdown/T_com_mindfusion_diagramming_jlayout_HierarchicalLayout.md) class.
- [HierarchicalLayoutTraits Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_HierarchicalLayoutTraits_0.md): Indicates item traits specific to hierarchical layouts. Members of this enumeration can be used as keys in the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) hashtable.
- [LayerComparator Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayerComparator.md):
- [LayerDistributor Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayerDistributor.md):
- [LayeredLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayout.md):
- [LayeredLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayoutInfo.md):
- [LayeredLayoutNodeData Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayoutNodeData.md):
- [LayeredLayoutStatistics Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayoutStatistics.md): Encapsulates information about a layered layout which has already complete.
- [LayeredLayoutTraits Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_LayeredLayoutTraits_0.md): Indicates item traits specific to layered layouts. Members of this enumeration can be used as keys in the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) hashtable.
- [Layout Class](Markdown/T_com_mindfusion_diagramming_jlayout_Layout.md):
- [LayoutRules Class](Markdown/T_com_mindfusion_diagramming_jlayout_LayoutRules.md): Summary description for LayoutRules.
- [Link Interface](Markdown/T_com_mindfusion_diagramming_jlayout_Link.md):
- [LinkList Class](Markdown/T_com_mindfusion_diagramming_jlayout_LinkList.md):
- [LinkOperations Class](Markdown/T_com_mindfusion_diagramming_jlayout_LinkOperations.md):
- [Node Interface](Markdown/T_com_mindfusion_diagramming_jlayout_Node.md):
- [NodeList Class](Markdown/T_com_mindfusion_diagramming_jlayout_NodeList.md):
- [NodeOrderComparer Class](Markdown/T_com_mindfusion_diagramming_jlayout_NodeOrderComparer.md):
- [NodeOrderComparer2 Class](Markdown/T_com_mindfusion_diagramming_jlayout_NodeOrderComparer2.md):
- [OneWayLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_OneWayLayout.md): Performs one-way layout on a graph.
- [OneWayLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_OneWayLayoutInfo.md): Contains settings for the (Markdown/T_com_mindfusion_diagramming_jlayout_OneWayLayout.md) class.
- [OrthogonalBendLinks Class](Markdown/T_com_mindfusion_diagramming_jlayout_OrthogonalBendLinks.md):
- [OrthogonalLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_OrthogonalLayout.md):
- [OrthogonalLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_OrthogonalLayoutInfo.md):
- [OrthogonalRouter Class](Markdown/T_com_mindfusion_diagramming_jlayout_OrthogonalRouter.md):
- [OrthogonalRouterInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_OrthogonalRouterInfo.md):
- [Pair Class](Markdown/T_com_mindfusion_diagramming_jlayout_Pair.md): Represents a coupling between two arbitrary objects.
- [Path Class](Markdown/T_com_mindfusion_diagramming_jlayout_Path.md):
- [PathFinder Class](Markdown/T_com_mindfusion_diagramming_jlayout_PathFinder.md):
- [PathList Class](Markdown/T_com_mindfusion_diagramming_jlayout_PathList.md):
- [PathNode Class](Markdown/T_com_mindfusion_diagramming_jlayout_PathNode.md):
- [PointList Class](Markdown/T_com_mindfusion_diagramming_jlayout_PointList.md):
- [PointOperations Class](Markdown/T_com_mindfusion_diagramming_jlayout_PointOperations.md):
- [ProcessLink Interface](Markdown/T_com_mindfusion_diagramming_jlayout_ProcessLink.md):
- [RadialTreeLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_RadialTreeLayout.md):
- [RandomFactory Class](Markdown/T_com_mindfusion_diagramming_jlayout_RandomFactory.md): A replacement of java.util.Random that return values from a file, so it is equvalent to its .NET version Used to compare results of java and .NET algorithms using random generator
- [Routable Interface](Markdown/T_com_mindfusion_diagramming_jlayout_Routable.md):
- [RouteDescriptor Class](Markdown/T_com_mindfusion_diagramming_jlayout_RouteDescriptor.md):
- [RouteHeuristics Class](Markdown/T_com_mindfusion_diagramming_jlayout_RouteHeuristics.md):
- [Router Class](Markdown/T_com_mindfusion_diagramming_jlayout_Router.md):
- [RoutingGrid Interface](Markdown/T_com_mindfusion_diagramming_jlayout_RoutingGrid.md):
- [RoutingOptions Interface](Markdown/T_com_mindfusion_diagramming_jlayout_RoutingOptions.md):
- [SortOrder Class](Markdown/T_com_mindfusion_diagramming_jlayout_SortOrder.md):
- [SpringLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_SpringLayout.md):
- [SpringLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_SpringLayoutInfo.md):
- [SpringLayoutTraits Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_SpringLayoutTraits_0.md): Indicates item traits specific to (Markdown/T_com_mindfusion_diagramming_SpringLayout.md). Members of this enumeration can be used as keys in the (Markdown/T_com_mindfusion_diagramming_DiagramItem....
- [SwimlaneGrid Interface](Markdown/T_com_mindfusion_diagramming_jlayout_SwimlaneGrid.md):
- [SwimlaneLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_SwimlaneLayout.md): Performs layered layout on a graph.
- [SwimlaneLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_SwimlaneLayoutInfo.md): Contains settings for the (Markdown/T_com_mindfusion_diagramming_jlayout_SwimlaneLayout.md) class.
- [SwimlaneLayoutTraits Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_SwimlaneLayoutTraits_0.md): Indicates item traits specific to swimlane layouts. Members of this enumeration can be used as keys in the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) hashtable.
- [TopologicalLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_TopologicalLayout.md):
- [TopologicalLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_TopologicalLayoutInfo.md):
- [TransparentGraphNode Class](Markdown/T_com_mindfusion_diagramming_jlayout_TransparentGraphNode.md): A GraphNode wrapper which when checked for equality with another TransparentGraphNode returns true if its GraphNode.getNode() is equal to the target TransparentGraphNode's GraphNode.getNode().
- [TreeLayoutBalance Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_TreeLayoutBalance_0.md): Specifies how to order child nodes in order to produce layouts with custom balance.
- [TreeLayoutDirection Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_TreeLayoutDirection_0.md): The members of this enumeration specify the overall direction of the layouts produced by the (Markdown/T_com_mindfusion_diagramming_TreeLayout.md) class. These constants can be used as parameters o...
- [TreeLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_TreeLayoutInfo.md):
- [TreeLayoutTraits Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_TreeLayoutTraits_0.md): Indicates item traits specific to tree layouts. Members of this enumeration can be used as keys in the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) hashtable.
- [TreeLevels Class](Markdown/T_com_mindfusion_diagramming_jlayout_TreeLevels.md):
- [TreeMapLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_TreeMapLayout.md): Performs tree map layout on a graph.
- [TreeMapLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_TreeMapLayoutInfo.md): Contains settings for the (Markdown/T_com_mindfusion_diagramming_jlayout_TreeMapLayout.md) class.
- [TreeMapLayoutTraits Enumeration](Markdown/T_com_mindfusion_diagramming_jlayout_TreeMapLayoutTraits_0.md): Indicates item traits specific to tree map layouts. Members of this enumeration can be used as keys in the (Markdown/T_com_mindfusion_diagramming_DiagramItem.md#getlayouttraits) hashtable.
- [TriangularLayout Class](Markdown/T_com_mindfusion_diagramming_jlayout_TriangularLayout.md): Performs triangular layout on simple, connected graphs. The triangular layout places vertices on a virtual grid, such that if the source graph is planar it is guaranteed that all edges will have a ...
- [TriangularLayoutInfo Class](Markdown/T_com_mindfusion_diagramming_jlayout_TriangularLayoutInfo.md): Contains settings for the (Markdown/T_com_mindfusion_diagramming_jlayout_TriangularLayout.md) class.
- [XBoundsComparer Class](Markdown/T_com_mindfusion_diagramming_jlayout_XBoundsComparer.md):
- [XDimension2D Class](Markdown/T_com_mindfusion_diagramming_jlayout_XDimension2D.md):
### Namespace com.mindfusion.diagramming.lanes
- [CellBoundsEvent Class](Markdown/T_com_mindfusion_diagramming_lanes_CellBoundsEvent.md):
- [Grid Class](Markdown/T_com_mindfusion_diagramming_lanes_Grid.md): Represents a lane grid.
- [GridAdapter Class](Markdown/T_com_mindfusion_diagramming_lanes_GridAdapter.md):
- [GridListener Interface](Markdown/T_com_mindfusion_diagramming_lanes_GridListener.md):
- [Header Class](Markdown/T_com_mindfusion_diagramming_lanes_Header.md): Represents a header in a grid view.
- [HeaderEvent Class](Markdown/T_com_mindfusion_diagramming_lanes_HeaderEvent.md):
- [HeaderList Class](Markdown/T_com_mindfusion_diagramming_lanes_HeaderList.md):
- [HeaderResizeEvent Class](Markdown/T_com_mindfusion_diagramming_lanes_HeaderResizeEvent.md):
- [ICell Interface](Markdown/T_com_mindfusion_diagramming_lanes_ICell.md):
- [ResizeType Class](Markdown/T_com_mindfusion_diagramming_lanes_ResizeType.md):
- [Style Class](Markdown/T_com_mindfusion_diagramming_lanes_Style.md):
### Namespace com.mindfusion.drawing
- [Align Enumeration](Markdown/T_com_mindfusion_drawing_Align_0.md): The members of this enumeration specify how text should be aligned to the text layout rectangle.
- [Brush Class](Markdown/T_com_mindfusion_drawing_Brush_0.md): A Brush specifies how the interior of an element should be filled. The (Markdown/T_com_mindfusion_drawing_SolidBrush_0.md) and (Markdown/T_com_mindfusion_drawing_GradientBrush_0.md) classes inherit...
- [Brushes Class](Markdown/T_com_mindfusion_drawing_Brushes_0.md): Contains the predefined (Markdown/T_com_mindfusion_drawing_Brush_0.md) objects.
- [CardinalSpline Class](Markdown/T_com_mindfusion_drawing_CardinalSpline_0.md):
- [Colors Class](Markdown/T_com_mindfusion_drawing_Colors_0.md): Contains the predefined Color objects.
- [CombineMode Enumeration](Markdown/T_com_mindfusion_drawing_CombineMode.md): Specifies how different clipping regions can be combined.
- [DashStyle Class](Markdown/T_com_mindfusion_drawing_DashStyle_0.md): Represents the dash style of a contour.
- [ExternalizableImage Class](Markdown/T_com_mindfusion_drawing_ExternalizableImage.md): Implement support for serialization of shared images.
- [FillMode Enumeration](Markdown/T_com_mindfusion_drawing_FillMode.md): Typed enumeration corresponding to .NET enum FillMode
- [FontStyle Enumeration](Markdown/T_com_mindfusion_drawing_FontStyle.md):
- [GradientBrush Class](Markdown/T_com_mindfusion_drawing_GradientBrush_0.md): Represents a gradient brush which paints the interior of objects starting with one color and gradually changing to another color by interpolating the RGB values of the two colors.
- [GraphicsEx Interface](Markdown/T_com_mindfusion_drawing_GraphicsEx_0.md):
- [GraphicsUnit Enumeration](Markdown/T_com_mindfusion_drawing_GraphicsUnit.md): The members of this enumeration specify the unit of measure for graphic objects drawn by JDiagram.
- [HatchBrush Class](Markdown/T_com_mindfusion_drawing_HatchBrush.md): Represents a brush that fills the interiors of objects with a hatch pattern.
- [HatchStyle Enumeration](Markdown/T_com_mindfusion_drawing_HatchStyle.md): Represents hatch patterns available to (Markdown/T_com_mindfusion_drawing_HatchBrush.md) objects.
- [ImageAlignment Enumeration](Markdown/T_com_mindfusion_drawing_ImageAlignment_0.md): Specifies the alignment of an image.
- [ImageAttributes Class](Markdown/T_com_mindfusion_drawing_ImageAttributes.md): Contains information about how image colors are manipulated during rendering.
- [ImagePainter Class](Markdown/T_com_mindfusion_drawing_ImagePainter.md): Provides advanced methods for drawing images.
- [Pen Class](Markdown/T_com_mindfusion_drawing_Pen_0.md): A Pen specifies how the outline of an element should be stroked.
- [Pens Class](Markdown/T_com_mindfusion_drawing_Pens_0.md): Contains pens for all standard colors.
- [PointList Class](Markdown/T_com_mindfusion_drawing_PointList.md): A strongly-typed list of Point2D.Float objects.
- [Polygon Class](Markdown/T_com_mindfusion_drawing_Polygon.md):
- [RadialGradientBrush Class](Markdown/T_com_mindfusion_drawing_RadialGradientBrush_0.md):
- [SolidBrush Class](Markdown/T_com_mindfusion_drawing_SolidBrush_0.md): Represents a brush that paints the interior of objects with a single color.
- [TextAlignment Enumeration](Markdown/T_com_mindfusion_drawing_TextAlignment_0.md): Specifies the alignment of text on the drawing surface.
- [TextFormat Class](Markdown/T_com_mindfusion_drawing_TextFormat_0.md): Specifies the format and alignment of text.
- [TextureBrush Class](Markdown/T_com_mindfusion_drawing_TextureBrush_0.md): Represents a brush that fills the interiors of objects with a texture pattern.
### Namespace com.mindfusion.graphs
- [Attribute Class](Markdown/T_com_mindfusion_graphs_Attribute_0.md):
- [Bend Class](Markdown/T_com_mindfusion_graphs_Bend_0.md):
- [BimodalSplit Class](Markdown/T_com_mindfusion_graphs_BimodalSplit_0.md):
- [BinaryTree Class](Markdown/T_com_mindfusion_graphs_BinaryTree.md):
- [BlockCutpointGraph Class](Markdown/T_com_mindfusion_graphs_BlockCutpointGraph_0.md):
- [Cell Class](Markdown/T_com_mindfusion_graphs_Cell_0.md):
- [CircularDrawing Class](Markdown/T_com_mindfusion_graphs_CircularDrawing_0.md):
- [ComponentBlocksHandler Interface](Markdown/T_com_mindfusion_graphs_ComponentBlocksHandler_0.md):
- [ConstrainedVisibility Class](Markdown/T_com_mindfusion_graphs_ConstrainedVisibility_0.md):
- [DatabaseDrawing Class](Markdown/T_com_mindfusion_graphs_DatabaseDrawing_0.md):
- [DrawingGrid Class](Markdown/T_com_mindfusion_graphs_DrawingGrid_0.md):
- [DualGraph Class](Markdown/T_com_mindfusion_graphs_DualGraph_0.md):
- [Edge Class](Markdown/T_com_mindfusion_graphs_Edge_0.md):
- [EdgeShape Class](Markdown/T_com_mindfusion_graphs_EdgeShape_0.md):
- [Embedding Class](Markdown/T_com_mindfusion_graphs_Embedding_0.md):
- [Face Class](Markdown/T_com_mindfusion_graphs_Face_0.md):
- [FractalDrawing Class](Markdown/T_com_mindfusion_graphs_FractalDrawing_0.md): A tree drawing algorithm that places child nodes symmetrically around their parent node. Nodes at the lowest level are arranged directly in a circle around their parent. At the upper level, the alr...
- [Graph Class](Markdown/T_com_mindfusion_graphs_Graph_0.md):
- [GridDrawing Class](Markdown/T_com_mindfusion_graphs_GridDrawing_0.md): Straight-line drawing on a grid. The input must be a simple graph. Paper "A linear-time algorithm for drawing a planar graph on a grid" by Chrobak and Payne.
- [HierarchicalDrawing Class](Markdown/T_com_mindfusion_graphs_HierarchicalDrawing_0.md):
- [HierarchicalEmbedding Class](Markdown/T_com_mindfusion_graphs_HierarchicalEmbedding_0.md):
- [Interval Class](Markdown/T_com_mindfusion_graphs_Interval_0.md):
- [IntervalGraph Class](Markdown/T_com_mindfusion_graphs_IntervalGraph_0.md):
- [LayoutTraits Class](Markdown/T_com_mindfusion_graphs_LayoutTraits_0.md):
- [MinBendOrthogonalDrawing Class](Markdown/T_com_mindfusion_graphs_MinBendOrthogonalDrawing_0.md):
- [Network Class](Markdown/T_com_mindfusion_graphs_Network_0.md):
- [Node Class](Markdown/T_com_mindfusion_graphs_Node_0.md):
- [NodePair Class](Markdown/T_com_mindfusion_graphs_NodePair_0.md):
- [OrthogonalDrawing Class](Markdown/T_com_mindfusion_graphs_OrthogonalDrawing_0.md):
- [OrthogonalRepresentation Class](Markdown/T_com_mindfusion_graphs_OrthogonalRepresentation_0.md):
- [OverlapGraph Class](Markdown/T_com_mindfusion_graphs_OverlapGraph_0.md):
- [Point Class](Markdown/T_com_mindfusion_graphs_Point_0.md):
- [PointD Class](Markdown/T_com_mindfusion_graphs_PointD_0.md):
- [PointF Class](Markdown/T_com_mindfusion_graphs_PointF_0.md):
- [PolylineDrawing Class](Markdown/T_com_mindfusion_graphs_PolylineDrawing_0.md):
- [PQTree Class](Markdown/T_com_mindfusion_graphs_PQTree.md):
- [QuasiUpwardDrawing Class](Markdown/T_com_mindfusion_graphs_QuasiUpwardDrawing_0.md): Creates quasi-upward drawing of a connected graph.
- [Representation Class](Markdown/T_com_mindfusion_graphs_Representation_0.md):
- [Set Class](Markdown/T_com_mindfusion_graphs_Set.md):
- [Size Class](Markdown/T_com_mindfusion_graphs_Size_0.md):
- [StConversion Class](Markdown/T_com_mindfusion_graphs_StConversion_0.md):
- [StEmbedding Class](Markdown/T_com_mindfusion_graphs_StEmbedding_0.md):
- [StPlanarization Class](Markdown/T_com_mindfusion_graphs_StPlanarization_0.md):
- [Table Class](Markdown/T_com_mindfusion_graphs_Table_0.md):
- [Tessellation Class](Markdown/T_com_mindfusion_graphs_Tessellation_0.md):
- [Utilities Class](Markdown/T_com_mindfusion_graphs_Utilities_0.md):
- [Vertex Class](Markdown/T_com_mindfusion_graphs_Vertex_0.md):
- [VertexExchangeGraph Class](Markdown/T_com_mindfusion_graphs_VertexExchangeGraph_0.md):
- [VertexSizeFunction Interface](Markdown/T_com_mindfusion_graphs_VertexSizeFunction_0.md):
- [Visibility Class](Markdown/T_com_mindfusion_graphs_Visibility_0.md):
### Namespace com.mindfusion.pdf
- [AutoScale Enumeration](Markdown/T_com_mindfusion_pdf_AutoScale.md):
- [BufferedImageConverter Class](Markdown/T_com_mindfusion_pdf_BufferedImageConverter_0.md): BufferedImageConverter.java -- static class containing a method to convert a java.awt.image.BufferedImage into a java.awt.Image
- [Flags Class](Markdown/T_com_mindfusion_pdf_Flags_0.md):
- [Globals Class](Markdown/T_com_mindfusion_pdf_Globals_0.md):
- [INotify Interface](Markdown/T_com_mindfusion_pdf_INotify.md):
- [IPdfSaver Interface](Markdown/T_com_mindfusion_pdf_IPdfSaver_0.md):
- [NotifyableList Class](Markdown/T_com_mindfusion_pdf_NotifyableList.md):
- [PageOrientation Enumeration](Markdown/T_com_mindfusion_pdf_PageOrientation.md):
- [PageSizes Class](Markdown/T_com_mindfusion_pdf_PageSizes_0.md):
- [PageSizesEnum Enumeration](Markdown/T_com_mindfusion_pdf_PageSizesEnum.md):
- [PaintType Enumeration](Markdown/T_com_mindfusion_pdf_PaintType.md):
- [Patterns Class](Markdown/T_com_mindfusion_pdf_Patterns_0.md):
- [PdfCatalog Class](Markdown/T_com_mindfusion_pdf_PdfCatalog_0.md):
- [PdfDocument Class](Markdown/T_com_mindfusion_pdf_PdfDocument_0.md):
- [PdfFont Class](Markdown/T_com_mindfusion_pdf_PdfFont_0.md):
- [PdfFontDescription Class](Markdown/T_com_mindfusion_pdf_PdfFontDescription_0.md):
- [PdfFunction Class](Markdown/T_com_mindfusion_pdf_PdfFunction_0.md):
- [PdfGraphics2D Class](Markdown/T_com_mindfusion_pdf_PdfGraphics2D_0.md):
- [PdfGraphicsState Class](Markdown/T_com_mindfusion_pdf_PdfGraphicsState_0.md):
- [PdfHref Class](Markdown/T_com_mindfusion_pdf_PdfHref_0.md):
- [PdfImage Class](Markdown/T_com_mindfusion_pdf_PdfImage_0.md):
- [PdfImageHolder Class](Markdown/T_com_mindfusion_pdf_PdfImageHolder_0.md):
- [PdfObject Class](Markdown/T_com_mindfusion_pdf_PdfObject_0.md):
- [PdfObjectComparator Class](Markdown/T_com_mindfusion_pdf_PdfObjectComparator.md):
- [PdfObjectTypeEnum Class](Markdown/T_com_mindfusion_pdf_PdfObjectTypeEnum_0.md):
- [PdfPage Class](Markdown/T_com_mindfusion_pdf_PdfPage_0.md):
- [PdfPagesRoot Class](Markdown/T_com_mindfusion_pdf_PdfPagesRoot_0.md):
- [PdfPath Class](Markdown/T_com_mindfusion_pdf_PdfPath_0.md):
- [PdfPattern Class](Markdown/T_com_mindfusion_pdf_PdfPattern_0.md):
- [PdfShading Class](Markdown/T_com_mindfusion_pdf_PdfShading_0.md):
- [PdfSize Class](Markdown/T_com_mindfusion_pdf_PdfSize_0.md):
- [PdfText Class](Markdown/T_com_mindfusion_pdf_PdfText_1.md):
- [PdfWriter Class](Markdown/T_com_mindfusion_pdf_PdfWriter_0.md):
- [tFontInfo Class](Markdown/T_com_mindfusion_pdf_tFontInfo_0.md):
- [Tools Class](Markdown/T_com_mindfusion_pdf_Tools_0.md):
- [UnsupportedDataTypeException Class](Markdown/T_com_mindfusion_pdf_UnsupportedDataTypeException_0.md):
### Namespace com.mindfusion.scripting
- [ByteCode Class](Markdown/T_com_mindfusion_scripting_ByteCode_0.md):
- [Compiler Class](Markdown/T_com_mindfusion_scripting_Compiler_0.md):
- [EvaluateFunctionEventObject Class](Markdown/T_com_mindfusion_scripting_EvaluateFunctionEventObject_0.md): Raised when a function cannot be resolved by the (Markdown/T_com_mindfusion_scripting_EvaluationContext_0.md) to allow clients to evaluate it.
- [EvaluationContext Interface](Markdown/T_com_mindfusion_scripting_EvaluationContext_0.md):
- [MemberInfo Class](Markdown/T_com_mindfusion_scripting_MemberInfo_0.md): Encapsulates the information required to identify a specific member of a particular object.
- [SimpleEvaluationContext Class](Markdown/T_com_mindfusion_scripting_SimpleEvaluationContext_0.md): Provides a basic implementation of the (Markdown/T_com_mindfusion_scripting_EvaluationContext_0.md) interface.
- [SimpleEvaluationContextListener Interface](Markdown/T_com_mindfusion_scripting_SimpleEvaluationContextListener_0.md): Defines events raised by the (Markdown/T_com_mindfusion_scripting_SimpleEvaluationContext_0.md) class.
### Namespace com.mindfusion.svg
- [Config Class](Markdown/T_com_mindfusion_svg_Config_0.md):
- [Globals Class](Markdown/T_com_mindfusion_svg_Globals_0.md):
- [Nodes Class](Markdown/T_com_mindfusion_svg_Nodes_0.md):
- [Pattern Class](Markdown/T_com_mindfusion_svg_Pattern_0.md):
- [SvgContent Class](Markdown/T_com_mindfusion_svg_SvgContent.md): Represents the content of an SVG drawing.
- [SvgDocument Class](Markdown/T_com_mindfusion_svg_SvgDocument_0.md):
- [SvgGraphics2D Class](Markdown/T_com_mindfusion_svg_SvgGraphics2D_0.md):
- [Tools Class](Markdown/T_com_mindfusion_svg_Tools_0.md):