DroidDiagram Programmer's Guide
Grid Class
Remarks See Also
 






Represents a lane grid.

Namespace: com.mindfusion.diagramming.lanes
Package: com.mindfusion.diagramming.lanes

 Syntax

Java  Copy Code

public class Grid implements Externalizable

 Remarks

The Grid class lets you define a background grid or table that can be used in Swimlane diagrams or Gantt charts. To activate the grid, set the EnableLanes property of the Diagram class to true.

Grids can include varying number of lanes, divided into child rows and columns whose intersections form cells. The grid can be resized by setting the ColumnCount and RowCount properties or by adding headers to the ColumnHeaders and RowHeaders collections. A column or row can be divided into child elements by adding to the SubHeaders collection of a Header, 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 lane hierarchy, or a group of cells for parent rows and columns. Cells or cell groups can be accessed via the get method, that lets you index cells either by their integer positions, or by their Header objects.

If the AllowResizeHeaders property of the Grid class is enabled, users can resize the grid columns and rows as desired. The LaneColumnResizeCursor and LaneRowResizeCursor properties of the DiagramView class specify the mouse cursor shown when resizing the lane column header or the lane row header. The CellBoundsChanged event is raised when lane cell bounds are resized.

The position of the grid and grid headers within the diagram document is defined by TopMargin and LeftMargin, which specify the grid offset relative to Bounds. HookHeaders 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 using the RowHeadersWidths and ColumnHeadersHeights properties.

The appearance of the lanes grid can be customized further in the AlignCells property which specifies whether cells are aligned to each other, the HeadersOnTop property which specifies whether headers should appear on top of the z-order, and the TopLeftAreaStyle specifying the appearance of the grid's top left corner.

The Grid class provides many miscellaneous methods that can be used to find grid elements, for determining their bounds and for hit-testing.

 Inheritance Hierarchy

java.lang.Object
    com.mindfusion.diagramming.lanes.Grid

 See Also

Grid Members
com.mindfusion.diagramming.lanes Namespace