Wednesday, December 18, 2013

Sapphire 0.7 : Diagram Node Shape Language

The keystone feature of Sapphire 0.7 release is the brand new diagram node shape definition language. Use it to construct complex diagram editors with the same ease as forms.

DiagramNodeShapeLanguage-1

The language is composed of six primitives.

TextDefText - Displays static text or content from the model, as specified by an expression. If the expression contains a reference to a single property, the property can be edited in place by double-clicking on the text.

LineDefLine - Displays a vertical or a horizontal line. Typically used as a separator. Line style, weight and color can be set as appropriate.

SpacerDefSpacer - Leaves a blank space of specified size. Frequently in conjunction with a visibility rule.

ImageDefImage - Displays an image. The image can be produced by an expression for a dynamic effect.

ValidationMarkerDefValidation Marker - Displays an image communicating the validation status of the immediate context. The user can click on the image to get the validation details and the related actions.

RectangleDefRectangle - Contains one or more shape in a rectangular space with an optional border and background. The contained shapes are arranged either vertically, horizontally or in a stack, as specified by the rectangle's layout.

ShapeFactoryDefShape Factory - Produces a shape for each entry in a list property using the specified shape templates. The list items can be added, removed and re-arranged through actions exposed by the shape factory. Drag-n-drop is also supported as a means to re-order the list items.

No comments: