Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming for Java Swing, V4.6 (Read 391 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 596
Joined: Apr 6th, 2003
Diagramming for Java Swing, V4.6
Jul 8th, 2021 at 11:07am
Print Post  
We have released version 4.6 of JDiagram. It contains the following new features and improvements:

Scrollable containers
Set the Scrollable property of ContainerNode to let users scroll the container's contents. The node then displays scrollbars at right and bottom edges that can be used to scroll interactively. The ScrollX and ScrollY properties let you determine current scroll position or change it programmatically. Note that in order to let container's content overflow and become scrollable, you must either disable AutoGrow, or allow users reduce container size by changing HandlesStyle and EnabledHandles properties from their default MoveOnly / Move values.

Container improvements
  • ContainerNode containment is no longer implemented via a Group object. Child nodes are now stored in a dedicated Children list, and a node's container is returned by the Container property.
  • Enable the AutoDeleteChildren property to automatically delete child nodes when a container is deleted.
  • Drag-and-drop operations from NodeListView and ShapeListBox automatically add the newly created node to a container if one is found at the drop position.
  • Call the resizeToFitChildren method to resize a container, making it big enough to contain its child nodes.
  • The KeepInsideParent constraint of child nodes now also prevents them from overlapping the container's caption bar.
  • The AutoGrow property lets you prevent ContainerNode from growing when adding child nodes to it.

Text rendering improvements
  • If WrapAtCharacter is disabled, long words that do not fit on a single line are now rendered clipped by default instead of stopping rendering at their position.
  • WrapOverflowingSingleWordLines property of TextFormat enables wrapping of long words that would not fit on a single line, while other text lines keep wrapping only at word boundaries.

Lasso zoom tool
The control now supports several ways to zoom using lasso tool:
  • Set the Behavior property to Zoom to always draw zoom lasso.
  • Set the Zoom flag for one of the keys in ModifierKeyActions to let users draw zoom-lasso with respective modifier key pressed and the left mouse button.
  • Assign Zoom value to RightButtonActions or MiddleButtonActions property to zoom using respective mouse button.

Modifier keys
The ModifierKeyActions property of DiagramView lets you bind modifier keys to diagram actions defined in ModifierKeyAction enum to execute when dragging with left mouse button with respective key pressed:
  • None: disables the modifier.
  • Pan: pans the view.
  • Select: draws selection lasso.
  • OverrideBehavior: draws a new item instead of grabbing adjustment handle.
  • Magnify: shows magnifier.
  • ExtendSelection: adds to selection without deselecting items outside of lasso.
  • Zoom: draws zoom lasso.

Button bindings
RightButtonActions and MiddleButtonActions properties of DiagramView let you map mouse buttons to members of the MouseButtonAction enum (Pan, Cancel, Select, Draw, Magnify, Zoom) specifying how mouse click or drag operations affect the diagram.

Miscellaneous
  • The initializeLasso event lets you customize appearance of selection lasso before it shows on screen.
  • New bringIntoView overload lets you scroll to specified rectangular area.
  • New zoomToRect overload lets you zoom to a rectangular area while keeping it centered in the viewport.
  • ImageAlign supports new FitLeft, FitTop, FitRight and FitBottom alignment styles, which resize Image to fit node's boundaries and align it to respective border.
  • Layout classes now process DiagramLinks connected to TreeViewItems.
  • Fixed background drawing glitch when the diagram is smaller than current viewport and grows due to AutoResize.

API changes
  • Container's child nodes are no longer accessible via SubordinateGroup; use the container's Children list instead.
  • A node's container is no longer accessible via MasterGroup; use the Container property instead.
  • Java Applet classes removed.

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

Updated JAR is also available at the Maven Central Repository:
https://search.maven.org/artifact/eu.mindfusion/diagramming

Enjoy!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint