+
+ /**
+ * types of feature ordering: Sort by score : average score - or total score -
+ * over all features in region Sort by feature label text: (or if null -
+ * feature type text) - numerical or alphabetical Sort by feature density:
+ * based on counts - ignoring individual text or scores for each feature
+ */
+ public static final String FEATURE_SCORE = "average_score";
+
+ public static final String FEATURE_LABEL = "text";
+
+ public static final String FEATURE_DENSITY = "density";
+
+ static AlignmentSorter instance;
+
+ public static AlignmentSorter getInstance()
+ {
+
+ // BH 2019.05.08 need to isolate static fields in JavaScript
+
+ AlignmentSorter i = instance;
+ @SuppressWarnings("unused")
+ ThreadGroup g = null;
+ if (Platform.isJS())
+ {
+ g = Thread.currentThread().getThreadGroup();
+ /**
+ * @j2sNative i = g._jalviewAlignmentSorterInstance;
+ *
+ */
+ }
+ if (i == null)
+ {
+ i = new AlignmentSorter();
+
+ if (Platform.isJS())
+ {
+ /**
+ * @j2sNative g._jalviewAlignmentSorterInstance = i;
+ *
+ */
+ }
+ else
+ {
+ instance = i;
+ }
+ }
+ return i;
+ }
+