Hi,
I have two boxes on the flowchart that are attached to another bigger box.
I have set the autoroute on the flowchart to true. and routingoption to during create and modify.
Also, the create lines orthogonally property is set.
So, when I run the application, the applet comes up with these three boxes.
Now I drag a line to connect the two smaller boxes. There should be at least 3 control points created.
Now, if I move the bigger box, the smaller boxes also move with him, but the arrow position is not retained.
Once I release the mouse after repositioning, the arrow is redrawn.
Is there a way I can make the arrow retain state during the drag of the master box?
private void initialize() {
flowChart.setSelectionOnTop(false);
flowChart.setArrowStyle(ArrowStyle.Cascading);
flowChart.setRouteArrows(true);
flowChart.getRoutingOptions().setTriggerRerouting(
RerouteArrows.WhileCreating | RerouteArrows.WhenModified);
}
private void routeTest() {
flowChart = new FlowChart();
initialize();
this.getContentPane().add(flowChart);
Box one = new Box(flowChart);
one.setBounds(5, 5, 10, 10);
Box two = new Box(flowChart);
two.setBounds(20, 20, 10, 10);
Box three = new Box(flowChart);
three.setBounds(2, 2, 50, 50);
flowChart.add(three);
flowChart.add(two);
flowChart.add(one);
one.attachTo(three, AttachToNode.TopCenter);
two.attachTo(three, AttachToNode.TopCenter);
}
private FlowChart flowChart;
Thanks,
Praveen