*/
protected boolean sliderDragging = false;
- protected JComboBox<String> threshold = new JComboBox<String>();
+ protected JComboBox<String> threshold = new JComboBox<>();
protected JComboBox<String> annotations;
@Override
public void mouseReleased(MouseEvent evt)
{
- if (sliderDragging)
- {
- sliderDragging = false;
- valueChanged(true);
- }
- ap.paintAlignment(true);
+ sliderDragReleased();
}
});
}
*/
public Vector<String> getAnnotationItems(boolean isSeqAssociated)
{
- annotationLabels = new HashMap<AlignmentAnnotation, String>();
+ annotationLabels = new HashMap<>();
- Vector<String> list = new Vector<String>();
+ Vector<String> list = new Vector<>();
int index = 1;
int[] anmap = new int[av.getAlignment()
.getAlignmentAnnotation().length];
public void cancel_actionPerformed()
{
reset();
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
try
{
frame.setClosed(true);
this.currentAnnotation = annotation;
}
+ /**
+ * update associated view model and trigger any necessary repaints.
+ *
+ * @param updateAllAnnotation
+ */
protected abstract void valueChanged(boolean updateAllAnnotation);
protected abstract void updateView();
{
this.annotations = anns;
}
+
+ protected void sliderDragReleased()
+ {
+ if (sliderDragging)
+ {
+ sliderDragging = false;
+ valueChanged(true);
+ }
+ }
}