package jalview.appletgui; import java.awt.event.*; import java.awt.*; import jalview.datamodel.*; public class AnnotationLabels extends Panel implements ActionListener { boolean active = false; AlignmentPanel ap ; boolean resizing = false; int oldY, mouseX; static String ADDNEW = "Add new row"; static String HIDE = "Hide this row"; static String DELETE = "Delete this row"; static String SHOWALL="Show all hidden rows"; int selectedRow = 0; int scrollOffset = 0; public AnnotationLabels(AlignmentPanel ap) { this.ap = ap; setLayout(null); addMouseListener(new MouseAdapter() {public void mousePressed(MouseEvent evt) { doMousePressed(evt); } }); } public void setScrollOffset(int y) { scrollOffset = y; repaint(); } public void actionPerformed(ActionEvent evt) { AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation(); if(evt.getActionCommand().equals(HIDE)) { aa[selectedRow].visible = false; } else if(evt.getActionCommand().equals(SHOWALL)) { for(int i=0; i