2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.datamodel.Alignment;
24 import jalview.datamodel.AlignmentAnnotation;
25 import jalview.datamodel.Annotation;
26 import jalview.datamodel.Sequence;
27 import jalview.datamodel.SequenceGroup;
28 import jalview.datamodel.SequenceI;
29 import jalview.io.FormatAdapter;
30 import jalview.util.MessageManager;
32 import java.awt.Color;
33 import java.awt.Dimension;
35 import java.awt.FontMetrics;
36 import java.awt.Graphics;
37 import java.awt.Graphics2D;
38 import java.awt.Image;
39 import java.awt.MediaTracker;
40 import java.awt.RenderingHints;
41 import java.awt.Toolkit;
42 import java.awt.datatransfer.StringSelection;
43 import java.awt.event.ActionEvent;
44 import java.awt.event.ActionListener;
45 import java.awt.event.MouseEvent;
46 import java.awt.event.MouseListener;
47 import java.awt.event.MouseMotionListener;
48 import java.awt.geom.AffineTransform;
49 import java.awt.image.BufferedImage;
50 import java.util.ArrayList;
51 import java.util.Arrays;
52 import java.util.regex.Pattern;
54 import javax.swing.JCheckBoxMenuItem;
55 import javax.swing.JMenuItem;
56 import javax.swing.JPanel;
57 import javax.swing.JPopupMenu;
58 import javax.swing.SwingUtilities;
59 import javax.swing.ToolTipManager;
67 public class AnnotationLabels extends JPanel implements MouseListener,
68 MouseMotionListener, ActionListener
70 private static final Pattern LEFT_ANGLE_BRACKET_PATTERN = Pattern.compile("<");
72 String TOGGLE_LABELSCALE = MessageManager.getString("label.scale_label_to_column");
74 String ADDNEW = MessageManager.getString("label.add_new_row");
76 String EDITNAME = MessageManager.getString("label.edit_label_description");
78 String HIDE = MessageManager.getString("label.hide_row");
80 String DELETE = MessageManager.getString("label.delete_row");
82 String SHOWALL = MessageManager.getString("label.show_all_hidden_rows");
84 String OUTPUT_TEXT = MessageManager.getString("label.export_annotation");
86 String COPYCONS_SEQ = MessageManager.getString("label.copy_consensus_sequence");
88 boolean resizePanel = false;
96 boolean resizing = false;
104 private int scrollOffset = 0;
106 Font font = new Font("Arial", Font.PLAIN, 11);
108 private boolean hasHiddenRows;
111 * Creates a new AnnotationLabels object.
116 public AnnotationLabels(AlignmentPanel ap)
120 ToolTipManager.sharedInstance().registerComponent(this);
122 java.net.URL url = getClass().getResource("/images/idwidth.gif");
127 temp = java.awt.Toolkit.getDefaultToolkit().createImage(url);
132 MediaTracker mt = new MediaTracker(this);
133 mt.addImage(temp, 0);
135 } catch (Exception ex)
139 BufferedImage bi = new BufferedImage(temp.getHeight(this),
140 temp.getWidth(this), BufferedImage.TYPE_INT_RGB);
141 Graphics2D g = (Graphics2D) bi.getGraphics();
142 g.rotate(Math.toRadians(90));
143 g.drawImage(temp, 0, -bi.getWidth(this), this);
146 addMouseListener(this);
147 addMouseMotionListener(this);
148 addMouseWheelListener(ap.getAnnotationPanel());
151 public AnnotationLabels(AlignViewport av)
162 public void setScrollOffset(int y)
169 * sets selectedRow to -2 if no annotation preset, -1 if no visible row is at
173 * coordinate position to search for a row
175 void getSelectedRow(int y)
178 AlignmentAnnotation[] aa = ap.av.getAlignment()
179 .getAlignmentAnnotation();
183 for (int i = 0; i < aa.length; i++)
191 height += aa[i].height;
209 public void actionPerformed(ActionEvent evt)
211 AlignmentAnnotation[] aa = ap.av.getAlignment()
212 .getAlignmentAnnotation();
214 if (evt.getActionCommand().equals(ADDNEW))
216 AlignmentAnnotation newAnnotation = new AlignmentAnnotation(null,
217 null, new Annotation[ap.av.getAlignment().getWidth()]);
219 if (!editLabelDescription(newAnnotation))
224 ap.av.getAlignment().addAnnotation(newAnnotation);
225 ap.av.getAlignment().setAnnotationIndex(newAnnotation, 0);
227 else if (evt.getActionCommand().equals(EDITNAME))
229 editLabelDescription(aa[selectedRow]);
232 else if (evt.getActionCommand().equals(HIDE))
234 aa[selectedRow].visible = false;
236 else if (evt.getActionCommand().equals(DELETE))
238 ap.av.getAlignment().deleteAnnotation(aa[selectedRow]);
240 else if (evt.getActionCommand().equals(SHOWALL))
242 for (int i = 0; i < aa.length; i++)
244 if (!aa[i].visible && aa[i].annotations != null)
246 aa[i].visible = true;
250 else if (evt.getActionCommand().equals(OUTPUT_TEXT))
252 new AnnotationExporter().exportAnnotations(ap,
253 new AlignmentAnnotation[]
254 { aa[selectedRow] });
256 else if (evt.getActionCommand().equals(COPYCONS_SEQ))
258 SequenceI cons = null;
259 if (aa[selectedRow].groupRef != null)
261 cons = aa[selectedRow].groupRef.getConsensusSeq();
265 cons = av.getConsensusSeq();
269 copy_annotseqtoclipboard(cons);
273 else if (evt.getActionCommand().equals(TOGGLE_LABELSCALE))
275 aa[selectedRow].scaleColLabel = !aa[selectedRow].scaleColLabel;
285 protected void refresh()
287 ap.validateAnnotationDimensions(false);
298 boolean editLabelDescription(AlignmentAnnotation annotation)
300 EditNameDialog dialog = new EditNameDialog(annotation.label,
301 annotation.description, " Annotation Name ",
302 "Annotation Description ", "Edit Annotation Name/Description",
310 annotation.label = dialog.getName();
312 String text = dialog.getDescription();
313 if (text != null && text.length() == 0)
317 annotation.description = text;
328 public void mousePressed(MouseEvent evt)
330 getSelectedRow(evt.getY() - getScrollOffset());
340 public void mouseReleased(MouseEvent evt)
342 int start = selectedRow;
343 getSelectedRow(evt.getY() - getScrollOffset());
344 int end = selectedRow;
348 // Swap these annotations
349 AlignmentAnnotation startAA = ap.av.getAlignment()
350 .getAlignmentAnnotation()[start];
353 end = ap.av.getAlignment().getAlignmentAnnotation().length - 1;
355 AlignmentAnnotation endAA = ap.av.getAlignment()
356 .getAlignmentAnnotation()[end];
358 ap.av.getAlignment().getAlignmentAnnotation()[end] = startAA;
359 ap.av.getAlignment().getAlignmentAnnotation()[start] = endAA;
365 ap.getAnnotationPanel().repaint();
374 public void mouseEntered(MouseEvent evt)
389 public void mouseExited(MouseEvent evt)
391 if (dragEvent == null)
404 public void mouseDragged(MouseEvent evt)
410 Dimension d = ap.annotationScroller.getPreferredSize();
411 int dif = evt.getY() - oldY;
413 dif /= ap.av.getCharHeight();
414 dif *= ap.av.getCharHeight();
416 if ((d.height - dif) > 20)
418 ap.annotationScroller.setPreferredSize(new Dimension(d.width,
420 d = ap.annotationSpaceFillerHolder.getPreferredSize();
421 ap.annotationSpaceFillerHolder.setPreferredSize(new Dimension(
422 d.width, d.height - dif));
423 ap.paintAlignment(true);
440 public void mouseMoved(MouseEvent evt)
442 resizePanel = evt.getY() < 10;
444 getSelectedRow(evt.getY() - getScrollOffset());
447 && ap.av.getAlignment().getAlignmentAnnotation().length > selectedRow)
449 AlignmentAnnotation aa = ap.av.getAlignment()
450 .getAlignmentAnnotation()[selectedRow];
452 StringBuffer desc = new StringBuffer();
453 if (aa.description != null
454 && !aa.description.equals("New description"))
456 // TODO: we could refactor and merge this code with the code in
457 // jalview.gui.SeqPanel.mouseMoved(..) that formats sequence feature
459 desc.append(aa.getDescription(true).trim());
460 // check to see if the description is an html fragment.
461 if (desc.length() < 6
462 || (desc.substring(0, 6).toLowerCase().indexOf("<html>") < 0))
464 // clean the description ready for embedding in html
465 desc = new StringBuffer(LEFT_ANGLE_BRACKET_PATTERN.matcher(desc)
466 .replaceAll("<"));
467 desc.insert(0, "<html>");
471 // remove terminating html if any
472 int i = desc.substring(desc.length() - 7).toLowerCase()
473 .lastIndexOf("</html>");
476 desc.setLength(desc.length() - 7 + i);
481 desc.append("<br/>");
483 // if (aa.hasProperties())
485 // desc.append("<table>");
486 // for (String prop : aa.getProperties())
488 // desc.append("<tr><td>" + prop + "</td><td>"
489 // + aa.getProperty(prop) + "</td><tr>");
491 // desc.append("</table>");
496 // begin the tooltip's html fragment
497 desc.append("<html>");
500 // TODO: limit precision of score to avoid noise from imprecise
502 // (64.7 becomes 64.7+/some tiny value).
503 desc.append(" Score: " + aa.score);
506 if (desc.length() > 6)
508 desc.append("</html>");
509 this.setToolTipText(desc.toString());
513 this.setToolTipText(null);
524 public void mouseClicked(MouseEvent evt)
526 final AlignmentAnnotation[] aa = ap.av.getAlignment()
527 .getAlignmentAnnotation();
528 if (SwingUtilities.isLeftMouseButton(evt))
530 if (selectedRow > -1 && selectedRow < aa.length)
532 if (aa[selectedRow].groupRef != null)
534 if (evt.getClickCount() >= 2)
536 // todo: make the ap scroll to the selection - not necessary, first
537 // click highlights/scrolls, second selects
538 ap.getSeqPanel().ap.getIdPanel().highlightSearchResults(null);
539 ap.av.setSelectionGroup(// new SequenceGroup(
540 aa[selectedRow].groupRef); // );
541 ap.paintAlignment(false);
542 PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
543 ap.av.sendSelection();
547 ap.getSeqPanel().ap.getIdPanel()
548 .highlightSearchResults(aa[selectedRow].groupRef
549 .getSequences(null));
553 else if (aa[selectedRow].sequenceRef != null)
555 if (evt.getClickCount() == 1)
557 ap.getSeqPanel().ap.getIdPanel().highlightSearchResults(Arrays
558 .asList(new SequenceI[]
559 { aa[selectedRow].sequenceRef }));
561 else if (evt.getClickCount() >= 2)
563 ap.getSeqPanel().ap.getIdPanel().highlightSearchResults(null);
564 SequenceGroup sg = ap.av.getSelectionGroup();
567 // we make a copy rather than edit the current selection if no modifiers pressed
568 // see Enhancement JAL-1557
569 if (!(evt.isControlDown() || evt.isShiftDown()))
571 sg = new SequenceGroup(sg);
573 sg.addSequence(aa[selectedRow].sequenceRef, false);
575 if (evt.isControlDown())
577 sg.addOrRemove(aa[selectedRow].sequenceRef, true);
579 // notionally, we should also add intermediate sequences from last added sequence ?
580 sg.addSequence(aa[selectedRow].sequenceRef, true);
584 sg = new SequenceGroup();
586 sg.setEndRes(ap.av.getAlignment().getWidth()-1);
587 sg.addSequence(aa[selectedRow].sequenceRef, false);
589 ap.av.setSelectionGroup(sg);
590 ap.av.sendSelection();
591 ap.paintAlignment(false);
592 PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
598 if (!SwingUtilities.isRightMouseButton(evt))
603 JPopupMenu pop = new JPopupMenu(
604 MessageManager.getString("label.annotations"));
605 JMenuItem item = new JMenuItem(ADDNEW);
606 item.addActionListener(this);
611 { // let the user make everything visible again
612 item = new JMenuItem(SHOWALL);
613 item.addActionListener(this);
616 pop.show(this, evt.getX(), evt.getY());
619 item = new JMenuItem(EDITNAME);
620 item.addActionListener(this);
622 item = new JMenuItem(HIDE);
623 item.addActionListener(this);
625 // JAL-1264 hide all sequence-specific annotations of this type
626 final String label = aa[selectedRow].label;
627 if (selectedRow < aa.length)
629 if (aa[selectedRow].sequenceRef != null)
631 JMenuItem hideType = new JMenuItem();
632 String text = MessageManager.getString("label.hide_all") + " " + label;
633 hideType.setText(text);
634 hideType.addActionListener(new ActionListener()
637 public void actionPerformed(ActionEvent e)
639 for (AlignmentAnnotation ann : ap.av.getAlignment()
640 .getAlignmentAnnotation())
642 if (ann.sequenceRef != null && ann.label != null
643 && ann.label.equals(label))
654 item = new JMenuItem(DELETE);
655 item.addActionListener(this);
659 item = new JMenuItem(SHOWALL);
660 item.addActionListener(this);
663 item = new JMenuItem(OUTPUT_TEXT);
664 item.addActionListener(this);
666 // TODO: annotation object should be typed for autocalculated/derived
668 if (selectedRow < aa.length)
670 if (!aa[selectedRow].autoCalculated)
672 if (aa[selectedRow].graph == AlignmentAnnotation.NO_GRAPH)
674 // display formatting settings for this row.
676 // av and sequencegroup need to implement same interface for
677 item = new JCheckBoxMenuItem(TOGGLE_LABELSCALE,
678 aa[selectedRow].scaleColLabel);
679 item.addActionListener(this);
683 else if (label.indexOf("Consensus") > -1)
686 // av and sequencegroup need to implement same interface for
687 final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
688 MessageManager.getString("label.ignore_gaps_consensus"),
689 (aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef
690 .getIgnoreGapsConsensus() : ap.av
691 .isIgnoreGapsConsensus());
692 final AlignmentAnnotation aaa = aa[selectedRow];
693 cbmi.addActionListener(new ActionListener()
695 public void actionPerformed(ActionEvent e)
697 if (aaa.groupRef != null)
699 // TODO: pass on reference to ap so the view can be updated.
700 aaa.groupRef.setIgnoreGapsConsensus(cbmi.getState());
701 ap.getAnnotationPanel().paint(ap.getAnnotationPanel().getGraphics());
705 ap.av.setIgnoreGapsConsensus(cbmi.getState(), ap);
710 // av and sequencegroup need to implement same interface for
711 if (aaa.groupRef != null)
713 final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
714 MessageManager.getString("label.show_group_histogram"),
715 aa[selectedRow].groupRef.isShowConsensusHistogram());
716 chist.addActionListener(new ActionListener()
718 public void actionPerformed(ActionEvent e)
720 // TODO: pass on reference
726 aaa.groupRef.setShowConsensusHistogram(chist.getState());
728 // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
732 final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
733 MessageManager.getString("label.show_group_logo"),
734 aa[selectedRow].groupRef.isShowSequenceLogo());
735 cprofl.addActionListener(new ActionListener()
737 public void actionPerformed(ActionEvent e)
739 // TODO: pass on reference
745 aaa.groupRef.setshowSequenceLogo(cprofl.getState());
747 // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
751 final JCheckBoxMenuItem cproflnorm = new JCheckBoxMenuItem(
752 MessageManager.getString("label.normalise_group_logo"),
753 aa[selectedRow].groupRef.isNormaliseSequenceLogo());
754 cproflnorm.addActionListener(new ActionListener()
756 public void actionPerformed(ActionEvent e)
759 // TODO: pass on reference
765 aaa.groupRef.setNormaliseSequenceLogo(cproflnorm.getState());
766 // automatically enable logo display if we're clicked
767 aaa.groupRef.setshowSequenceLogo(true);
769 // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
776 final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
777 MessageManager.getString("label.show_histogram"), av.isShowConsensusHistogram());
778 chist.addActionListener(new ActionListener()
780 public void actionPerformed(ActionEvent e)
782 // TODO: pass on reference
788 av.setShowConsensusHistogram(chist.getState());
789 ap.alignFrame.setMenusForViewport();
791 // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
795 final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
796 MessageManager.getString("label.show_logo"), av.isShowSequenceLogo());
797 cprof.addActionListener(new ActionListener()
799 public void actionPerformed(ActionEvent e)
801 // TODO: pass on reference
807 av.setShowSequenceLogo(cprof.getState());
808 ap.alignFrame.setMenusForViewport();
810 // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
814 final JCheckBoxMenuItem cprofnorm = new JCheckBoxMenuItem(
815 MessageManager.getString("label.normalise_logo"), av.isNormaliseSequenceLogo());
816 cprofnorm.addActionListener(new ActionListener()
818 public void actionPerformed(ActionEvent e)
820 // TODO: pass on reference
826 av.setShowSequenceLogo(true);
827 av.setNormaliseSequenceLogo(cprofnorm.getState());
828 ap.alignFrame.setMenusForViewport();
830 // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
835 final JMenuItem consclipbrd = new JMenuItem(COPYCONS_SEQ);
836 consclipbrd.addActionListener(this);
837 pop.add(consclipbrd);
840 pop.show(this, evt.getX(), evt.getY());
844 * do a single sequence copy to jalview and the system clipboard
847 * sequence to be copied to clipboard
849 protected void copy_annotseqtoclipboard(SequenceI sq)
851 SequenceI[] seqs = new SequenceI[]
853 String[] omitHidden = null;
854 SequenceI[] dseqs = new SequenceI[]
855 { sq.getDatasetSequence() };
856 if (dseqs[0] == null)
858 dseqs[0] = new Sequence(sq);
859 dseqs[0].setSequence(jalview.analysis.AlignSeq.extractGaps(
860 jalview.util.Comparison.GapChars, sq.getSequenceAsString()));
862 sq.setDatasetSequence(dseqs[0]);
864 Alignment ds = new Alignment(dseqs);
865 if (av.hasHiddenColumns())
867 omitHidden = av.getColumnSelection().getVisibleSequenceStrings(0,
868 sq.getLength(), seqs);
871 String output = new FormatAdapter().formatSequences("Fasta", seqs,
874 Toolkit.getDefaultToolkit().getSystemClipboard()
875 .setContents(new StringSelection(output), Desktop.instance);
877 ArrayList<int[]> hiddenColumns = null;
878 if (av.hasHiddenColumns())
880 hiddenColumns = new ArrayList<int[]>();
881 for (int[] region : av.getColumnSelection().getHiddenColumns())
883 hiddenColumns.add(new int[]
884 { region[0], region[1] });
888 Desktop.jalviewClipboard = new Object[]
889 { seqs, ds, // what is the dataset of a consensus sequence ? need to flag
890 // sequence as special.
900 public void paintComponent(Graphics g)
903 int width = getWidth();
906 width = ap.calculateIdWidth().width + 4;
909 Graphics2D g2 = (Graphics2D) g;
912 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
913 RenderingHints.VALUE_ANTIALIAS_ON);
916 drawComponent(g2, true, width);
921 * Draw the full set of annotation Labels for the alignment at the given
925 * Graphics2D instance (needed for font scaling)
927 * Width for scaling labels
930 public void drawComponent(Graphics g, int width)
932 drawComponent(g, false, width);
935 private final boolean debugRedraw = false;
938 * Draw the full set of annotation Labels for the alignment at the given
942 * Graphics2D instance (needed for font scaling)
944 * - true indicates that only current visible area needs to be
947 * Width for scaling labels
949 public void drawComponent(Graphics g, boolean clip, int width)
951 if (av.getFont().getSize() < 10)
957 g.setFont(av.getFont());
960 FontMetrics fm = g.getFontMetrics(g.getFont());
961 g.setColor(Color.white);
962 g.fillRect(0, 0, getWidth(), getHeight());
964 g.translate(0, getScrollOffset());
965 g.setColor(Color.black);
967 AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation();
968 int fontHeight = g.getFont().getSize();
973 Font baseFont = g.getFont();
974 FontMetrics baseMetrics = fm;
975 int ofontH = fontHeight;
978 int[] visr = (ap != null && ap.getAnnotationPanel() != null) ? ap.getAnnotationPanel()
979 .getVisibleVRange() : null;
980 if (clip && visr != null)
985 boolean visible = true, before = false, after = false;
988 hasHiddenRows = false;
990 for (int i = 0; i < aa.length; i++)
995 hasHiddenRows = true;
1008 System.out.println("before vis: " + i);
1012 // don't draw what isn't visible
1015 if (olY > visHeight)
1022 System.out.println("Scroll offset: " + sOffset
1023 + " after vis: " + i);
1027 // don't draw what isn't visible
1031 g.setColor(Color.black);
1033 offset = -aa[i].height / 2;
1037 offset += fm.getHeight() / 2;
1038 offset -= fm.getDescent();
1042 offset += fm.getDescent();
1045 x = width - fm.stringWidth(aa[i].label) - 3;
1047 if (aa[i].graphGroup > -1)
1050 // TODO: JAL-1291 revise rendering model so the graphGroup map is
1051 // computed efficiently for all visible labels
1052 for (int gg = 0; gg < aa.length; gg++)
1054 if (aa[gg].graphGroup == aa[i].graphGroup)
1059 if (groupSize * (fontHeight + 8) < aa[i].height)
1061 graphExtras = (aa[i].height - (groupSize * (fontHeight + 8))) / 2;
1065 // scale font to fit
1066 float h = aa[i].height / (float) groupSize, s;
1073 fontHeight = -8 + (int) h;
1074 s = ((float) fontHeight) / (float) ofontH;
1075 Font f = baseFont.deriveFont(AffineTransform
1076 .getScaleInstance(s, s));
1078 fm = g.getFontMetrics();
1079 graphExtras = (aa[i].height - (groupSize * (fontHeight + 8))) / 2;
1084 for (int gg = 0; gg < aa.length; gg++)
1086 if (aa[gg].graphGroup == aa[i].graphGroup)
1088 x = width - fm.stringWidth(aa[gg].label) - 3;
1089 g.drawString(aa[gg].label, x, y - graphExtras);
1091 if (aa[gg]._linecolour != null)
1094 g.setColor(aa[gg]._linecolour);
1095 g.drawLine(x, y - graphExtras + 3,
1096 x + fm.stringWidth(aa[gg].label), y - graphExtras
1100 g.setColor(Color.black);
1101 graphExtras += fontHeight + 8;
1105 g.setFont(baseFont);
1107 fontHeight = ofontH;
1111 g.drawString(aa[i].label, x, y + offset);
1118 g.drawImage(image, 2, 0 - getScrollOffset(), this);
1120 else if (dragEvent != null && aa != null)
1122 g.setColor(Color.lightGray);
1123 g.drawString(aa[selectedRow].label, dragEvent.getX(),
1124 dragEvent.getY() - getScrollOffset());
1127 if (!av.getWrapAlignment() && ((aa == null) || (aa.length < 1)))
1129 g.drawString(MessageManager.getString("label.right_click"), 2, 8);
1130 g.drawString(MessageManager.getString("label.to_add_annotation"), 2,
1135 public int getScrollOffset()
1137 return scrollOffset;