*/
package jalview.bin;
+import java.util.Locale;
+
import jalview.analysis.AlignmentUtils;
import jalview.api.StructureSelectionManagerProvider;
import jalview.appletgui.AlignFrame;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentOrder;
import jalview.datamodel.ColumnSelection;
-import jalview.datamodel.HiddenColumns;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
int apos = -1;
try
{
- apos = new Integer(position).intValue();
+ apos = Integer.valueOf(position).intValue();
apos--;
} catch (NumberFormatException ex)
{
final int pos = apos;
// use vamsas listener to broadcast to all listeners in scope
if (alignedPosition != null && (alignedPosition.trim().length() == 0
- || alignedPosition.toLowerCase().indexOf("false") > -1))
+ || alignedPosition.toLowerCase(Locale.ROOT).indexOf("false") > -1))
{
java.awt.EventQueue.invokeLater(new Runnable()
{
int from = -1, to = -1;
try
{
- from = new Integer(cl.substring(0, p)).intValue();
+ from = Integer.valueOf(cl.substring(0, p)).intValue();
from--;
} catch (NumberFormatException ex)
{
}
try
{
- to = new Integer(cl.substring(p + 1)).intValue();
+ to = Integer.valueOf(cl.substring(p + 1)).intValue();
to--;
} catch (NumberFormatException ex)
{
int r = -1;
try
{
- r = new Integer(cl).intValue();
+ r = Integer.valueOf(cl).intValue();
r--;
} catch (NumberFormatException ex)
{
- if (cl.toLowerCase().equals("sequence"))
+ if (cl.toLowerCase(Locale.ROOT).equals("sequence"))
{
// we are in the dataset sequence's coordinate frame.
inseqpos = true;
SequenceI rs = sel.getSequenceAt(0);
start = rs.findIndex(start);
end = rs.findIndex(end);
- List<Integer> cs = new ArrayList<Integer>(csel.getSelected());
+ List<Integer> cs = new ArrayList<>(csel.getSelected());
csel.clear();
for (Integer selectedCol : cs)
{
setMouseoverListener(currentAlignFrame, listener);
}
- private Vector<jalview.javascript.JSFunctionExec> javascriptListeners = new Vector<jalview.javascript.JSFunctionExec>();
+ private Vector<jalview.javascript.JSFunctionExec> javascriptListeners = new Vector<>();
/*
* (non-Javadoc)
try
{
StructureSelectionManager.getStructureSelectionManager(me)
- .mouseOverStructure(new Integer(pdbResNum).intValue(),
+ .mouseOverStructure(Integer.valueOf(pdbResNum).intValue(),
chain, pdbfile);
if (debug)
{
{
try
{
- alf.scrollTo(new Integer(topRow).intValue(),
- new Integer(leftHandColumn).intValue());
+ alf.scrollTo(Integer.valueOf(topRow).intValue(),
+ Integer.valueOf(leftHandColumn).intValue());
} catch (Exception ex)
{
{
try
{
- alf.scrollToRow(new Integer(topRow).intValue());
+ alf.scrollToRow(Integer.valueOf(topRow).intValue());
} catch (Exception ex)
{
{
try
{
- alf.scrollToColumn(new Integer(leftHandColumn).intValue());
+ alf.scrollToColumn(Integer.valueOf(leftHandColumn).intValue());
} catch (Exception ex)
{
private boolean alignPdbStructures = false;
/**
- * use an external structure viewer exclusively (no jmols or MCViews will be
+ * use an external structure viewer exclusively (no jmols or mc_views will be
* opened by JalviewLite itself)
*/
public boolean useXtrnalSviewer = false;
String externalsviewer = getParameter("externalstructureviewer");
if (externalsviewer != null)
{
- useXtrnalSviewer = externalsviewer.trim().toLowerCase().equals(TRUE);
+ useXtrnalSviewer = externalsviewer.trim().toLowerCase(Locale.ROOT).equals(TRUE);
}
/**
* if true disable the check for jmol
if (!jmolAvailable)
{
System.out.println(
- "Jmol not available - Using MCview for structures");
+ "Jmol not available - Using mc_view for structures");
}
} catch (java.lang.ClassNotFoundException ex)
{
if (debug)
{
System.err.println(
- "Skipping Jmol check. Will use MCView (probably)");
+ "Skipping Jmol check. Will use mc_view (probably)");
}
}
checkedForJmol = true;
else
{
param = st.nextToken();
- List<SequenceI> tmp = new ArrayList<SequenceI>();
- List<String> tmp2 = new ArrayList<String>();
+ List<SequenceI> tmp = new ArrayList<>();
+ List<String> tmp2 = new ArrayList<>();
while (st.hasMoreTokens())
{
JnetAnnotationMaker.add_annotation(predictions,
alignFrame.viewport.getAlignment(), 0, false);
// false == do not add sequence profile from concise output
- SequenceI repseq = alignFrame.viewport.getAlignment()
- .getSequenceAt(0);
- alignFrame.viewport.getAlignment().setSeqrep(repseq);
- HiddenColumns cs = new HiddenColumns();
- cs.hideInsertionsFor(repseq);
- alignFrame.viewport.getAlignment().setHiddenColumns(cs);
+
+ alignFrame.viewport.getAlignment().setupJPredAlignment();
+
alignFrame.alignPanel.fontChanged();
alignFrame.alignPanel.setScrollValues(0, 0);
result = true;
final String groups, boolean state)
{
final boolean st = state;// !(state==null || state.equals("") ||
- // state.toLowerCase().equals("false"));
+ // state.toLowerCase(Locale.ROOT).equals("false"));
java.awt.EventQueue.invokeLater(new Runnable()
{
@Override
// callInitCallback();
}
- private Hashtable<String, long[]> jshashes = new Hashtable<String, long[]>();
+ private Hashtable<String, long[]> jshashes = new Hashtable<>();
- private Hashtable<String, Hashtable<String, String[]>> jsmessages = new Hashtable<String, Hashtable<String, String[]>>();
+ private Hashtable<String, Hashtable<String, String[]>> jsmessages = new Hashtable<>();
public void setJsMessageSet(String messageclass, String viewId,
String[] colcommands)
Hashtable<String, String[]> msgset = jsmessages.get(messageclass);
if (msgset == null)
{
- msgset = new Hashtable<String, String[]>();
+ msgset = new Hashtable<>();
jsmessages.put(messageclass, msgset);
}
msgset.put(viewId, colcommands);