Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Version 4.6.2 beta (Read 664 times)
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Version 4.6.2 beta
Aug 11th, 2022 at 11:45am
Print Post  
JDiagram version 4.6.2 contains the following new features and improvements:

Multiple labels per node
The NodeLabel class allows multiple captions to be displayed for a single DiagramNode of any type. Node labels provide a set of properties allowing full customization of their display and positioning. Label position is defined by specifying a pin point and offset from it, set through setCornerPosition, setEdgePosition, setCenterPosition methods. In addition, the HorizontalAlign and VerticalAlign properties of NodeLabel specify on which side of pin point to draw the label's caption.

For example, following code adds extra labels to top-left and bottom-right corners of a ShapeNode:

Code
Select All
ShapeNode node = diagram.getFactory().createShapeNode(10, 50, 40, 30);
node.setText("text"); // centered main text

NodeLabel lb1 = node.addLabel("label 1");
lb1.setCornerPosition(0, 0, 0);
lb1.setHorizontalAlign(Align.Near);
lb1.setVerticalAlign(Align.Near);
lb1.setBrush(new SolidBrush(Color.red));
lb1.setTextColor(Color.white);

NodeLabel lb2 = node.addLabel("label 2");
lb2.setCornerPosition(2, 0, 0);
lb2.setHorizontalAlign(Align.Far);
lb2.setVerticalAlign(Align.Far);
lb2.setBrush(new SolidBrush(Color.yellow));
lb2.setTextColor(Color.red); 


Miscellaneous
  • The MoveLabels behavior lets user move link and node labels interactively.
  • HorizontalOffset and VerticalOffset now work for link labels positioned using setLinkLengthPosition method.
  • ExcelExporter exports pen width of links.
  • ExcelExporter sets more precise positions of link end points.
  • Improved ZoomControl rendering quality.
  • More precise vertical centering of text in table captions and cells.
  • DashStyle.DashDotDot serialization fix.

If anyone is interested in trying the beta version, please download this archive containing updated JAR file:
https://mindfusion.eu/_beta/jdiag462.zip

Any comments, questions and general feedback are welcome.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint