import fr.orsay.lri.varna.models.rna.ModeleBase;
import fr.orsay.lri.varna.models.rna.RNA;
-public class AppVarna extends JInternalFrame implements SelectionListener,
- SecondaryStructureListener, InterfaceVARNASelectionListener,
- VamsasSource
+public class AppVarna extends JInternalFrame
+ implements SelectionListener, SecondaryStructureListener,
+ InterfaceVARNASelectionListener, VamsasSource
{
private static final byte[] PAIRS = new byte[] { '(', ')', '[', ']', '{',
'}', '<', '>' };
{
this(ap);
- String sname = aa.sequenceRef == null ? "secondary structure (alignment)"
+ String sname = aa.sequenceRef == null
+ ? "secondary structure (alignment)"
: seq.getName() + " structure";
String theTitle = sname
- + (aa.sequenceRef == null ? " trimmed to " + seq.getName() : "");
+ + (aa.sequenceRef == null ? " trimmed to " + seq.getName()
+ : "");
theTitle = MessageManager.formatMessage("label.varna_params",
- new String[] { theTitle });
+ new String[]
+ { theTitle });
setTitle(theTitle);
String gappedTitle = sname + " (with gaps)";
addModel(gappedModel, gappedTitle);
String trimmedTitle = "trimmed " + sname;
- RnaModel trimmedModel = new RnaModel(trimmedTitle, aa, seq, null, false);
+ RnaModel trimmedModel = new RnaModel(trimmedTitle, aa, seq, null,
+ false);
addModel(trimmedModel, trimmedTitle);
vab.setSelectedIndex(0);
}
end = shift.shift(end);
}
selectionHighlighter.highlightRegion(rna, start, end);
- selectionHighlighter.getLastHighlight().setOutlineColor(
- seqsel.getOutlineColour());
+ selectionHighlighter.getLastHighlight()
+ .setOutlineColor(seqsel.getOutlineColour());
// TODO - translate column markings to positions on structure if present.
vab.updateSelectedRNA(rna);
}
}
@Override
- public void onSelectionChanged(BaseList arg0, BaseList arg1, BaseList arg2)
+ public void onSelectionChanged(BaseList arg0, BaseList arg1,
+ BaseList arg2)
{
// TODO translate selected regions in VARNA to a selection on the
// alignpanel.
{
if (!model.ann.isValidStruc())
{
- throw new IllegalArgumentException("Invalid RNA structure annotation");
+ throw new IllegalArgumentException(
+ "Invalid RNA structure annotation");
}
/*
ShiftList offset = new ShiftList();
int ofstart = -1;
int sleng = seq.getLength();
- char[] seqChars = seq.getSequence();
for (int i = 0; i < sleng; i++)
{
- if (Comparison.isGap(seqChars[i]))
+ if (Comparison.isGap(seq.getCharAt(i)))
{
if (ofstart == -1)
{
{
if (!model.ann.isValidStruc())
{
- throw new IllegalArgumentException("Invalid RNA structure annotation");
+ throw new IllegalArgumentException(
+ "Invalid RNA structure annotation");
}
try