- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing spreadsheet component for Java Swing.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Diagramming for Java Swing, V4.3
Read 991 times

Forum Admin   Offline
YaBB Administrator
*****
Posts: 465
Gender: male
Rock and Roll


   
     
 
Diagramming for Java Swing, V4.3
Nov 2nd, 2016 at 10:38am
 
We have released version 4.3 of JDiagram. It contains the following new features and bug fixes:

Fluent API
Builder classes in com.mindfusion.diagramming.builders package add support for fluent programming style. Static with() and instance init() methods in DiagramItem, DiagramItemStyle and Layout -derived classes return a builder instance that can be used to set-up respective new or existing objects -

Code:
diagram.getNodes().add(
	ShapeNode.with()
		.brush(Color.LIGHT_GRAY)
		.font("Arial", 4)
		.enableStyledText(true)
		.text("Task <i>1</i>")
		.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 <i>2</i>")
		.toolTip("This is the second task");

TreeLayout.with()
	.levelDistance(20)
	.nodeDistance(20)
	.linkStyle(TreeLayoutLinkType.Cascading3)
	.create()
	.arrange(diagram); 



DiagramLink improvements
  • the component no longer keeps a separate segmentCount field, removing a common source of errors. The SegmentCount property now calculates its value from ControlPoints elements. The updateFromPoints(updateGroups, updateSegments) overload has been removed too;
  • SegmentCount setter no longer refuses changing number of segments if auto-routing is enabled or the link is a self-loop;
  • the new Spline element of LinkShape enumeration draws links as interpolating splines that pass through all of their control points:
    ...

Enum types
Old-style enumeration classes with static finals have been replaced by enum types, improving type checking and auto-completion support. This change will not affect your code if only passing enum members to methods from the API. If storing them in fields on the other hand, you must change the field type from int to respective enum type.

The types changed to enum are - Action, Align, Anchoring, AttachToLink, AttachToNode, AutoResize, Behavior, CellFrameStyle, ColumnStyle, CustomDraw, DelKeyAction, DirectionConstraint, EffectPhase, ExpandButtonAction, ExpandButtonPosition, GlassEffectType, Granularity, GraphicsUnit, GridStyle, GroupRotation, HandlesStyle, HatchStyle, HitTestPriority, HyperLinkStyle, ImageAlign, LayeredLayoutLinkType, LinkCrossings, LinkShape, LinkTextStyle, MarkStyle, ModificationStart, MouseInputMode, MultipleGraphsPlacement, NodeHandleType, Orientation, Relationship, RelativeToLink, RerouteLinks, RestrictToBounds, SaveToStringFormat, SelectionStyle, ShadowsStyle, ShowAnchors, SimpleShape, SnapToAnchor, TableConnectionStyle, TickPosition, TreeLayoutBalance, TreeLayoutDirection, TreeLayoutLinkType, TreeLayoutType, TreeViewConnectionStyle.

Type of EnabledHandles and TriggerRerouting properties has been changed to EnumSet.

Fixes
  • fixed a problem where setLicenseKey did not work on non-Oracle implementations of the Java runtime;
  • fixed SvgExporter bug where incorrect offset would be applied to nodes' Image bitmaps;

Installer for the latest version can be downloaded here, or from the clients area on our site.
http://www.mindfusion.eu/JDiagramTrial.zip

Enjoy!
 
 
  WWW
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print