+ };
+ JvOptionPane.newOptionDialog(alignPanel.alignFrame)
+ .setResponseHandler(1, action).showInternalDialog(bigpanel,
+ title, JvOptionPane.YES_NO_CANCEL_OPTION,
+ JvOptionPane.PLAIN_MESSAGE, null, options,
+ MessageManager.getString("action.ok"));
+ }
+
+ /**
+ * Restore initial settings on Cancel
+ */
+ protected void restoreInitialSettings()
+ {
+ if (sg == null)
+ {
+ ap.av.setTextColour(original1);
+ ap.av.setTextColour2(original2);
+ ap.av.setThresholdTextColour(originalThreshold);
+ }
+ else
+ {
+ sg.textColour = original1;
+ sg.textColour2 = original2;
+ sg.thresholdTextColour = originalThreshold;
+ }
+
+ /*
+ * if 'Apply To All Groups' was in force, there will be
+ * group-specific settings to restore as well
+ */
+ for (SequenceGroup group : this.groupColour1.keySet())
+ {
+ group.textColour = groupColour1.get(group);
+ group.textColour2 = groupColour2.get(group);
+ group.thresholdTextColour = groupThreshold.get(group);
+ }
+
+ ap.paintAlignment(false, false);
+ }
+
+ /**
+ * Save settings on entry, for restore on Cancel
+ */
+ protected void saveInitialSettings()
+ {
+ groupColour1 = new HashMap<>();
+ groupColour2 = new HashMap<>();
+ groupThreshold = new HashMap<>();
+
+ if (sg == null)
+ {
+ /*
+ * alignment scope
+ */
+ original1 = ap.av.getTextColour();
+ original2 = ap.av.getTextColour2();
+ originalThreshold = ap.av.getThresholdTextColour();
+ if (ap.av.getColourAppliesToAllGroups()
+ && ap.av.getAlignment().getGroups() != null)