1818import javafx .collections .MapChangeListener ;
1919import javafx .scene .Group ;
2020import javafx .scene .shape .Circle ;
21- import javafx .scene .text .Text ;
2221
2322/**
2423 * This enum represents all properties a Cluster can have.
@@ -32,7 +31,7 @@ enum ClusterPropertyTypes implements PropertyType {
3231 SOURCES ("Sources" ),
3332 STARTRANK ("Start rank" ),
3433 BASEDIST ("Start base" ),
35- SCORE ("Total interestingness score" );
34+ SCORE ("Maximum interestingness score" );
3635
3736 private String description ;
3837 private ClusterPropertyTypes (String description ) {
@@ -60,7 +59,6 @@ public class ClusterDrawable extends Group implements Drawable, Propertyable {
6059 private static final int INTERESTINGNESS_THRESHOLD = 600 ;
6160 private Cluster cluster ;
6261 private Set <String > sources ;
63- private Text label ;
6462 private Pie pie ;
6563 private Map <PropertyType , String > properties ;
6664 private int interestingness ;
@@ -79,7 +77,6 @@ public ClusterDrawable(ColorServer colorServer, Cluster cluster) {
7977 this .interestingness = cluster .getNodes ().stream ()
8078 .mapToInt (e -> e .getInterestingnessScore ())
8179 .max ().getAsInt ();
82- label = new Text (Integer .toString (cluster .getNodes ().size ()));
8380 setOnMouseClicked (e -> AbstractView .setLastClicked (this ));
8481 draw (colorServer );
8582 }
@@ -88,7 +85,7 @@ public ClusterDrawable(ColorServer colorServer, Cluster cluster) {
8885 * Add all properties of a cluster to the property pane.
8986 */
9087 private void initProperties () {
91- properties .put (ClusterPropertyTypes .TITLE , null );
88+ properties .put (ClusterPropertyTypes .TITLE , cluster . getNodes (). size () + " nodes" );
9289 properties .put (ClusterPropertyTypes .ID , cluster .getNodes ().stream ()
9390 .map (e -> e .getId ())
9491 .collect (Collectors .toList ()).toString ());
@@ -107,12 +104,13 @@ private void initProperties() {
107104 */
108105 private void initSingletonProperties () {
109106 EnrichedSequenceNode sn = cluster .getNodes ().iterator ().next ();
107+ String score = properties .remove (ClusterPropertyTypes .SCORE );
110108 properties .put (ClusterPropertyTypes .BASEDIST , Integer .toString (sn .getBaseDistance ()));
111109 properties .put (ClusterPropertyTypes .STARTREF , Integer .toString (sn .getStartRef ()));
112110 properties .put (ClusterPropertyTypes .ENDREF , Integer .toString (sn .getEndRef ()));
113111 properties .put (ClusterPropertyTypes .SEQUENCE , sn .getSequence ());
112+ properties .put (ClusterPropertyTypes .SCORE , score );
114113
115- properties .put (ClusterPropertyTypes .SCORE , Integer .toString (sn .getInterestingnessScore ()));
116114 sn .getScores ().forEach ((k , v ) -> properties .put (k , Integer .toString (v )));
117115 }
118116
@@ -137,7 +135,6 @@ private void draw(ColorServer colorServer) {
137135 if (interestingness > INTERESTINGNESS_THRESHOLD ) {
138136 commonNode .getStyleClass ().add ("interesting-node" );
139137 }
140- getChildren ().add (label );
141138 }
142139
143140 /**
0 commit comments