git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-838 move two callers off Comparison.PID and deprecate it
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationPanel.java
diff --git
a/src/jalview/gui/AnnotationPanel.java
b/src/jalview/gui/AnnotationPanel.java
index
0b2f6cc
..
84f3e6c
100755
(executable)
--- a/
src/jalview/gui/AnnotationPanel.java
+++ b/
src/jalview/gui/AnnotationPanel.java
@@
-55,7
+55,6
@@
import java.util.List;
import javax.swing.JColorChooser;
import javax.swing.JMenuItem;
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.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.Scrollable;
@@
-300,7
+299,7
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
else if (action.equals(LABEL))
{
String exMesg = collectAnnotVals(anot, LABEL);
else if (action.equals(LABEL))
{
String exMesg = collectAnnotVals(anot, LABEL);
- String label = JOptionPane.showInputDialog(this,
+ String label = JvOptionPane.showInputDialog(this,
MessageManager.getString("label.enter_label"), exMesg);
if (label == null)
MessageManager.getString("label.enter_label"), exMesg);
if (label == null)
@@
-380,7
+379,7
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
aa[activeRow].hasIcons = true;
}
aa[activeRow].hasIcons = true;
}
- String label = JOptionPane.showInputDialog(MessageManager
+ String label = JvOptionPane.showInputDialog(MessageManager
.getString("label.enter_label_for_the_structure"), symbol);
if (label == null)
.getString("label.enter_label_for_the_structure"), symbol);
if (label == null)
@@
-458,8
+457,8
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
String tlabel = null;
if (anots[index] != null)
{ // LML added stem code
String tlabel = null;
if (anots[index] != null)
{ // LML added stem code
- if (type.equals(HELIX) || type.equals(SHEET)
- || type.equals(STEM) || type.equals(LABEL))
+ if (type.equals(HELIX) || type.equals(SHEET) || type.equals(STEM)
+ || type.equals(LABEL))
{
tlabel = anots[index].description;
if (tlabel == null || tlabel.length() < 1)
{
tlabel = anots[index].description;
if (tlabel == null || tlabel.length() < 1)
@@
-708,7
+707,8
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
return;
}
return;
}
- int column = (evt.getX() / av.getCharWidth()) + av.getStartRes();
+ int column = (evt.getX() / av.getCharWidth())
+ + av.getRanges().getStartRes();
if (av.hasHiddenColumns())
{
if (av.hasHiddenColumns())
{
@@
-814,8
+814,7
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
{
text.append(", ")
.append(MessageManager.getString("label.sequence"))
{
text.append(", ")
.append(MessageManager.getString("label.sequence"))
- .append(" ")
- .append(seqIndex + 1);
+ .append(" ").append(seqIndex + 1);
char residue = seqref.getCharAt(column);
if (!Comparison.isGap(residue))
{
char residue = seqref.getCharAt(column);
if (!Comparison.isGap(residue))
{
@@
-906,7
+905,8
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
return;
}
}
return;
}
}
- imgWidth = (av.endRes - av.startRes + 1) * av.getCharWidth();
+ imgWidth = (av.getRanges().getEndRes() - av.getRanges().getStartRes() + 1)
+ * av.getCharWidth();
if (imgWidth < 1)
{
return;
if (imgWidth < 1)
{
return;
@@
-947,7
+947,8
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
imageFresh = true;
}
imageFresh = true;
}
- drawComponent(gg, av.startRes, av.endRes + 1);
+ drawComponent(gg, av.getRanges().getStartRes(), av.getRanges()
+ .getEndRes() + 1);
imageFresh = false;
g.drawImage(image, 0, 0, this);
}
imageFresh = false;
g.drawImage(image, 0, 0, this);
}
@@
-977,8
+978,8
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
gg.copyArea(0, 0, imgWidth, getHeight(),
-horizontal * av.getCharWidth(), 0);
long mtime = System.currentTimeMillis();
gg.copyArea(0, 0, imgWidth, getHeight(),
-horizontal * av.getCharWidth(), 0);
long mtime = System.currentTimeMillis();
- int sr = av.startRes;
- int er = av.endRes + 1;
+ int sr = av.getRanges().getStartRes();
+ int er = av.getRanges().getEndRes() + 1;
int transX = 0;
if (horizontal > 0) // scrollbar pulled right, image to the left
int transX = 0;
if (horizontal > 0) // scrollbar pulled right, image to the left