@@ -357,7 +357,7 @@ public void handle(MouseEvent mouseEvent) {
357
357
}
358
358
359
359
calculated = true ;
360
- } else if (calculate && calculated && !articulationPoint ) {
360
+ } else if (calculate && calculated && !articulationPoint & ! mst ) {
361
361
362
362
for (NodeFX n : circles ) {
363
363
n .isSelected = false ;
@@ -1217,6 +1217,8 @@ public MST() {
1217
1217
for (NodeFX x : circles ) {
1218
1218
x .node .previous = x .node ;
1219
1219
}
1220
+
1221
+ //<editor-fold defaultstate="collapsed" desc="Detail Information">
1220
1222
String init = "Intially : \n " ;
1221
1223
for (NodeFX x : circles ){
1222
1224
final String s = "Node : " + x .node .name + " , Parent: " + x .node .previous .name + "\n " ;
@@ -1234,7 +1236,7 @@ public MST() {
1234
1236
});
1235
1237
fdss .onFinishedProperty ();
1236
1238
st .getChildren ().add (fdss );
1237
-
1239
+ //</editor-fold>
1238
1240
Collections .sort (mstEdges , new Comparator <Edge >() {
1239
1241
public int compare (Edge o1 , Edge o2 ) {
1240
1242
if (o1 .weight == o2 .weight ) {
@@ -1250,6 +1252,7 @@ public int compare(Edge o1, Edge o2) {
1250
1252
ft1 .setToValue (Color .DARKORANGE );
1251
1253
st .getChildren ().add (ft1 );
1252
1254
1255
+ //<editor-fold defaultstate="collapsed" desc="Detail Information">
1253
1256
final String se = "Selected Edge:- (" + e .source .name .trim () + "--" + e .target .name .trim ()+") Weight: " + String .valueOf (e .weight ) +" \n " ;
1254
1257
FadeTransition fdx = new FadeTransition (Duration .millis (10 ), textFlow );
1255
1258
fdx .setOnFinished (evx -> {
@@ -1273,12 +1276,13 @@ public int compare(Edge o1, Edge o2) {
1273
1276
});
1274
1277
fdx3 .onFinishedProperty ();
1275
1278
st .getChildren ().add (fdx3 );
1279
+ //</editor-fold>
1276
1280
1277
1281
if (findParent (e .source .previous ) != findParent (e .target .previous )) {
1278
1282
unionNode (e .source , e .target );
1279
1283
mstValue += e .weight ;
1280
1284
1281
-
1285
+ //<editor-fold defaultstate="collapsed" desc="Detail Information">
1282
1286
final String sa = "\t ---->Unioned\n " ;
1283
1287
final String sa1 = "\t \t ->Node :" + e .source .name .trim () + " Parent: " + findParent (e .source .previous ).name .trim () + "\n " ;
1284
1288
final String sa2 = "\t \t ->Node :" + e .target .name .trim () + " Parent: " + findParent (e .target .previous ).name .trim () + "\n " ;
@@ -1313,15 +1317,17 @@ public int compare(Edge o1, Edge o2) {
1313
1317
ft3 = new FillTransition (Duration .millis (time ), e .target .circle );
1314
1318
ft3 .setToValue (Color .AQUA );
1315
1319
st .getChildren ().add (ft3 );
1320
+ //</editor-fold>
1316
1321
}else {
1322
+ //<editor-fold defaultstate="collapsed" desc="Detail Info">
1317
1323
final String sa = "\t ---->Cycle Detected\n " ;
1318
1324
FadeTransition fdx7 = new FadeTransition (Duration .millis (10 ), textFlow );
1319
1325
fdx7 .setOnFinished (evx -> {
1320
1326
textFlow .appendText (sa );
1321
1327
});
1322
1328
fdx7 .onFinishedProperty ();
1323
1329
st .getChildren ().add (fdx7 );
1324
-
1330
+ //</editor-fold>
1325
1331
StrokeTransition ft2 = new StrokeTransition (Duration .millis (time ), e .line );
1326
1332
ft2 .setToValue (Color .DARKRED );
1327
1333
st .getChildren ().add (ft2 );
0 commit comments