\r
public AnnotationPanel(AlignmentPanel ap)\r
{\r
+ ToolTipManager.sharedInstance().registerComponent(this);\r
+ ToolTipManager.sharedInstance().setInitialDelay(0);\r
+ ToolTipManager.sharedInstance().setDismissDelay(10000);\r
this.ap = ap;\r
av = ap.av;\r
this.setLayout(null);\r
addMouseListener(this);\r
addMouseMotionListener(this);\r
- adjustPanelHeight();\r
-\r
ap.annotationScroller.getVerticalScrollBar().addAdjustmentListener(this);\r
}\r
\r
\r
public void mousePressed(MouseEvent evt)\r
{\r
+ int height = 0;\r
+ activeRow = -1;\r
+ AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
+\r
+ for (int i = 0; i < aa.length; i++)\r
+ {\r
+ height += aa[i].height;\r
+\r
+ if (evt.getY() < height)\r
+ {\r
+ if (aa[i].editable)\r
+ activeRow = i;\r
+ else\r
+ activeRes = null;\r
+\r
+ break;\r
+ }\r
+ }\r
+\r
+\r
if (SwingUtilities.isRightMouseButton(evt))\r
{\r
if (activeRes == null)\r
return;\r
}\r
\r
+\r
JPopupMenu pop = new JPopupMenu("Structure type");\r
JMenuItem item = new JMenuItem(HELIX);\r
item.addActionListener(this);\r
return;\r
}\r
\r
- AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
\r
if (aa == null)\r
{\r
return;\r
}\r
\r
- int height = 0;\r
- activeRow = -1;\r
-\r
- for (int i = 0; i < aa.length; i++)\r
- {\r
- height += aa[i].height;\r
-\r
- if (evt.getY() < height)\r
- {\r
- if (!aa[i].editable)\r
- {\r
- activeRes = null;\r
-\r
- continue;\r
- }\r
-\r
- activeRow = i;\r
-\r
- break;\r
- }\r
- }\r
\r
int res = (evt.getX() / av.getCharWidth()) + av.getStartRes();\r
\r
\r
public void mouseMoved(MouseEvent evt)\r
{\r
- ToolTipManager.sharedInstance().registerComponent(this);\r
-\r
AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();\r
\r
if (aa == null)\r
this.npoint = npoint;\r
this.av = av;\r
ToolTipManager.sharedInstance().registerComponent(this);\r
+ ToolTipManager.sharedInstance().setInitialDelay(0);\r
+ ToolTipManager.sharedInstance().setDismissDelay(10000);\r
PaintRefresher.Register(this, av.alignment);\r
\r
- //\r
prefsize = getPreferredSize();\r
orig = new float[npoint][3];\r
\r