*/
package jalview.gui;
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.image.*;
-
-import javax.swing.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SequenceI;
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
import jalview.util.MessageManager;
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import java.awt.image.BufferedImage;
+
+import javax.swing.JColorChooser;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.Scrollable;
+import javax.swing.SwingUtilities;
+import javax.swing.ToolTipManager;
+
/**
* AnnotationPanel displays visible portion of annotation rows below unwrapped
* alignment
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
int index = av.getColumnSelection().columnAt(i);
if (!av.getColumnSelection().isVisible(index))
+ {
continue;
+ }
if (anot[index] == null)
{
anot[index] = new Annotation(label, "", type, 0);
}
- anot[index].secondaryStructure = type;
+
+ anot[index].secondaryStructure = type != 'S' ? type : label
+ .length() == 0 ? ' ' : label.charAt(0);
anot[index].displayCharacter = label;
}
int index = columnSelection.columnAt(i);
// always check for current display state - just in case
if (!viscols.isVisible(index))
+ {
continue;
+ }
String tlabel = null;
if (anot[index] != null)
{ // LML added stem code
}
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;
if (imgWidth < 1)
+ {
return;
+ }
if (image == null || imgWidth != image.getWidth(this)
|| image.getHeight(this) != getHeight())
{
return bounds;
}
else
+ {
return null;
+ }
}
}