<echo message="note: compile and makeApplet optionally compile/obfuscate applet against a different Java version by specifying -Djava118.home=PathtoJDK/lib which is the lib directory in the JDK install that contains rt.jar " />
<echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
<echo message="Useful -D flags: -Dclover.jar to specify path to openclover for testng coverage report" />
+ <echo message="Useful -D flags: -Ddeprecation=true to add -Xlint:deprecation to the java compiler" />
</target>
<taskdef resource="testngtasks" classpath="utils/testnglibs/testng.jar" />
<target name="testng" depends="buildTests">
- <loadfile property="j11modules" srcFile="modules"/>
+ <loadfile property="j11modules" srcFile="modules">
+ <filterchain>
+ <striplinebreaks/>
+ </filterchain>
+ </loadfile>
<echo message="j11libDir is '${j11libDir}'" />
<echo message="j11modules is '${j11modules}'" />
<testng outputDir="${reportDir}" haltOnFailure="false" groups="${testng-groups}" mode="testng"
<pathelement location="${clover.jar}" if:set="clover.jar"/>
<path refid="test.classpath" />
</classpath>
- <jvmarg value="--module-path=${j11libDir}:${java.home}/jmods" if:set="java11"/>
+ <!--
+ <jvmarg value="DASH_DASH_module-path=${j11libDir}:${java.home}/jmods" if:set="java11"/>
+ -->
+ <jvmarg value="--module-path=${j11libDir}" if:set="java11"/>
<jvmarg value="--add-modules=${j11modules}" if:set="java11"/>
<jvmarg value="--add-modules=java.se.ee" if:set="java9"/>
<jvmarg value="--illegal-access=warn" if:set="java9"/>
import java.awt.Color;
import java.awt.Dimension;
-import java.awt.Event;
-import java.awt.Font;
+import java.awt.event.InputEvent;import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
// JBPNote TODO: This class is quite noisy - needs proper log.info/log.debug
MCMatrix objmat = new MCMatrix(3, 3);
objmat.setIdentity();
- if ((evt.getModifiers() & Event.META_MASK) != 0)
+ if ((evt.getModifiersEx() & InputEvent.META_DOWN_MASK) != 0)
{
objmat.rotatez(((mx - omx)));
}
resNumber = Integer.parseInt(str.substring(22, 26).trim());
resNumIns = str.substring(22, 27).trim();
insCode = str.substring(26, 27).charAt(0);
- this.x = (new Float(str.substring(30, 38).trim()).floatValue());
- this.y = (new Float(str.substring(38, 46).trim()).floatValue());
- this.z = (new Float(str.substring(47, 55).trim()).floatValue());
+ this.x = (Float.valueOf(str.substring(30, 38).trim()).floatValue());
+ this.y = (Float.valueOf(str.substring(38, 46).trim()).floatValue());
+ this.z = (Float.valueOf(str.substring(47, 55).trim()).floatValue());
// optional entries - see JAL-730
String tm = str.substring(54, 60).trim();
if (tm.length() > 0)
{
- occupancy = (new Float(tm)).floatValue();
+ occupancy = (Float.valueOf(tm)).floatValue();
}
else
{
tm = str.substring(60, 66).trim();
if (tm.length() > 0)
{
- tfactor = (new Float(tm).floatValue());
+ tfactor = (Float.valueOf(tm).floatValue());
}
else
{
import java.awt.Color;
import java.awt.Dimension;
-import java.awt.Event;
-import java.awt.Font;
+import java.awt.event.InputEvent;import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
// JBPNote TODO: This class is quite noisy - needs proper log.info/log.debug
MCMatrix objmat = new MCMatrix(3, 3);
objmat.setIdentity();
- if ((evt.getModifiers() & Event.META_MASK) != 0)
+ if ((evt.getModifiersEx() & InputEvent.META_DOWN_MASK) != 0)
{
objmat.rotatez(((mx - omx)));
}
n = RegOpt.opt(n, ignoreCase, dontMinQ);
}
n.setParent(this);
- set(new Character(o.c), n, ignoreCase, dontMinQ);
+ set(Character.valueOf(o.c), n, ignoreCase, dontMinQ);
if (ignoreCase)
{
if (o.c != o.altc)
{
- set(new Character(o.altc), n, ignoreCase, dontMinQ);
+ set(Character.valueOf(o.altc), n, ignoreCase, dontMinQ);
}
if (o.c != o.altc2 && o.altc != o.altc2)
{
- set(new Character(o.altc2), n, ignoreCase, dontMinQ);
+ set(Character.valueOf(o.altc2), n, ignoreCase, dontMinQ);
}
}
}
{
return -1;
}
- Pattern n = (Pattern) h.get(new Character(pt.src.charAt(pos)));
+ Pattern n = (Pattern) h.get(Character.valueOf(pt.src.charAt(pos)));
if (n == null)
{
return -1;
if (r.searchFrom(toParse, pos))
{
v.addElement(r.left().substring(pos));
- vi.addElement(new Integer(r.matchFrom() + r.charsMatched()));
+ vi.addElement(Integer.valueOf(r.matchFrom() + r.charsMatched()));
for (int i = 0; i < r.numSubs(); i++)
{
if (r.substring() != null)
{
v.addElement(r.substring(i + offset));
- vi.addElement(new Integer(r.matchFrom(i + offset)
+ vi.addElement(Integer.valueOf(r.matchFrom(i + offset)
+ r.charsMatched(i + offset)));
}
}
float[] rgbValues = new float[4];
for (int i = 0; i < rgbStrings.length; i++)
{
- Float f = new Float(rgbStrings[i]);
+ Float f = Float.valueOf(rgbStrings[i]);
rgbValues[i] = f.floatValue();
}
if (rgbStrings.length == 4)
*/
public static Integer makeModelKey(int model, int subModel)
{
- return new Integer(model * MAX_SUB_MODELS + subModel);
+ return Integer.valueOf(model * MAX_SUB_MODELS + subModel);
}
// invoked by the getResdiue (parseConnectivityReplies in
*/
public ChimeraResidue getResidue(String index)
{
- // Integer index = new Integer(residueIndex);
+ // Integer index = Integer.valueOf(residueIndex);
if (residueMap.containsKey(index))
return residueMap.get(index);
return null;
for (int i = 0; i < alignment.length; i++)
{
- ids[i] = (new Float(alignment[i].getName().substring(8)))
+ ids[i] = (Float.valueOf(alignment[i].getName().substring(8)))
.floatValue();
}
max = Math.max(max, bigtot);
- quality.addElement(new Double(bigtot));
+ quality.addElement(Double.valueOf(bigtot));
}
double newmax = -Double.MAX_VALUE;
tmp = ((max - tmp) * (size - cons2GapCounts[j])) / size;
// System.out.println(tmp+ " " + j);
- quality.setElementAt(new Double(tmp), j);
+ quality.setElementAt(Double.valueOf(tmp), j);
if (tmp > newmax)
{
double score = Double.NaN;
try
{
- score = new Double(sstring).doubleValue();
+ score = Double.valueOf(sstring).doubleValue();
} catch (Exception e)
{
// don't try very hard to parse if regex was wrong.
{
Hashtable sqinfo = new Hashtable();
sqinfo.put("Name", seq.getName());
- sqinfo.put("Start", new Integer(seq.getStart()));
- sqinfo.put("End", new Integer(seq.getEnd()));
+ sqinfo.put("Start", Integer.valueOf(seq.getStart()));
+ sqinfo.put("End", Integer.valueOf(seq.getEnd()));
if (seq.getDescription() != null)
{
sqinfo.put("Description", seq.getDescription());
maxResidue = "{";
}
}
- residueHash.put(MAXCOUNT, new Integer(count));
+ residueHash.put(MAXCOUNT, Integer.valueOf(count));
residueHash.put(MAXRESIDUE, maxResidue);
percentage = ((float) count * 100) / jSize;
- residueHash.put(PID_GAPS, new Float(percentage));
+ residueHash.put(PID_GAPS, Float.valueOf(percentage));
percentage = ((float) count * 100) / nongap;
- residueHash.put(PID_NOGAPS, new Float(percentage));
+ residueHash.put(PID_NOGAPS, Float.valueOf(percentage));
if (result[i] == null)
{
residueHash.put(PAIRPROFILE, pairs);
}
- residueHash.put(MAXCOUNT, new Integer(count));
+ residueHash.put(MAXCOUNT, Integer.valueOf(count));
residueHash.put(MAXRESIDUE, maxResidue);
percentage = ((float) count * 100) / jSize;
- residueHash.put(PID_GAPS, new Float(percentage));
+ residueHash.put(PID_GAPS, Float.valueOf(percentage));
percentage = ((float) count * 100) / nongap;
- residueHash.put(PID_NOGAPS, new Float(percentage));
+ residueHash.put(PID_NOGAPS, Float.valueOf(percentage));
result[bpEnd] = residueHash;
}
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
+import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Arrays;
try
{
new URL(url);
- url = URLEncoder.encode(url);
+ url = URLEncoder.encode(url, "UTF-8");
}
/*
* When we finally deprecate 1.1 compatibility, we can start to use
{
url = viewport.applet.getCodeBase() + url;
}
+ catch (UnsupportedEncodingException ex)
+ {
+ System.err.println(
+ "WARNING = IMPLEMENTATION ERROR - UNSUPPORTED ENCODING EXCEPTION FOR "
+ + url);
+ ex.printStackTrace();
+ }
return url;
}
{
try
{
- widthScale = new Float(param).floatValue();
+ widthScale = Float.valueOf(param).floatValue();
} catch (Exception e)
{
}
{
try
{
- heightScale = new Float(param).floatValue();
+ heightScale = Float.valueOf(param).floatValue();
} catch (Exception e)
{
}
{
try
{
- float f = new Float(thresholdValue.getText()).floatValue();
+ float f = Float.valueOf(thresholdValue.getText()).floatValue();
slider.setValue((int) (f * 1000));
adjustmentValueChanged(null);
} catch (NumberFormatException ex)
.getAlignmentAnnotation();
// DETECT RIGHT MOUSE BUTTON IN AWT
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
PopupMenu popup = new PopupMenu(
}
}
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK
&& activeRow != -1)
{
if (av.getColumnSelection() == null
{
try
{
- float f = new Float(thresholdValue.getText()).floatValue();
+ float f = Float.valueOf(thresholdValue.getText()).floatValue();
slider.setValue((int) (f * SCALE_FACTOR_1K));
adjustmentValueChanged(null);
public void mouseClicked(MouseEvent evt)
{
MyCheckbox check = (MyCheckbox) evt.getSource();
- if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) != 0)
+ if ((evt.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0)
{
this.popupSort(check, fr.getMinMax(), evt.getX(), evt.getY());
}
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Frame;
+import java.awt.GraphicsEnvironment;
import java.awt.Label;
import java.awt.Panel;
-import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
*/
void init()
{
- String fonts[] = Toolkit.getDefaultToolkit().getFontList();
+ // String fonts[] = Toolkit.getDefaultToolkit().getFontList();
+ String fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment()
+ .getAvailableFontFamilyNames();
for (int i = 0; i < fonts.length; i++)
{
fontName.addItem(fonts[i]);
int seq = alignPanel.seqPanel.findSeq(e);
- if ((e.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((e.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
SequenceI sq = av.getAlignment().getSequenceAt(seq);
@Override
public void mouseClicked(MouseEvent evt)
{
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
showPopupMenu(evt);
}
@Override
public void mousePressed(MouseEvent evt)
{
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
if (!Platform.isAMac())
{
@Override
public void mouseDragged(MouseEvent evt)
{
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
if (!Platform.isAMac())
{
min = res;
max = res;
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
rightMouseButtonPressed(evt, res);
}
// For now, ignore the mouseWheel font resizing on Macs
// As the Button2_mask always seems to be true
- if ((evt.getModifiers()
- & InputEvent.BUTTON2_MASK) == InputEvent.BUTTON2_MASK
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON2_DOWN_MASK) == InputEvent.BUTTON2_DOWN_MASK
&& !av.MAC)
{
mouseWheelPressed = true;
}
// DETECT RIGHT MOUSE BUTTON IN AWT
- if ((evt.getModifiers()
- & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
+ if ((evt.getModifiersEx()
+ & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK)
{
List<SequenceFeature> allFeatures = findFeaturesAtColumn(sequence,
sequence.findPosition(column + 1));
int apos = -1;
try
{
- apos = new Integer(position).intValue();
+ apos = Integer.valueOf(position).intValue();
apos--;
} catch (NumberFormatException ex)
{
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)
{
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)
{
seqPos = i + startRes;
}
- sequenceMapping.put(new Integer(seqPos), annotations[i]);
+ sequenceMapping.put(Integer.valueOf(seqPos), annotations[i]);
}
}
{
for (a = sequenceRef.getStart(); a <= sequenceRef.getEnd(); a++)
{
- index = new Integer(a);
+ index = Integer.valueOf(a);
Annotation annot = sequenceMapping.get(index);
if (annot != null)
{
for (int i = 0; i < binary.length; i++)
{
- out += (new Integer(binary[i])).toString();
+ out += (Integer.valueOf(binary[i])).toString();
if (i < (binary.length - 1))
{
void remove(int col)
{
- Integer colInt = new Integer(col);
+ Integer colInt = Integer.valueOf(col);
if (selected.get(col))
{
// clear shifted bits and update List of selected columns
selected.clear(temp);
mask.set(temp - change);
- order.set(i, new Integer(temp - change));
+ order.set(i, Integer.valueOf(temp - change));
}
}
// lastly update the bitfield all at once
Integer colInt;
for (int i = start; i < end; i++)
{
- colInt = new Integer(i);
+ colInt = Integer.valueOf(i);
if (selection.contains(colInt))
{
selection.remove(colInt);
package jalview.ext.htsjdk;
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+
import htsjdk.samtools.util.CloseableIterator;
import htsjdk.variant.variantcontext.VariantContext;
import htsjdk.variant.vcf.VCFFileReader;
import htsjdk.variant.vcf.VCFHeader;
-import java.io.Closeable;
-import java.io.File;
-import java.io.IOException;
-
/**
* A thin wrapper for htsjdk classes to read either plain, or compressed, or
* compressed and indexed VCF files
{
final CloseableIterator<VariantContext> it = reader.iterator();
- return new CloseableIterator<VariantContext>()
+ return new CloseableIterator<>()
{
boolean atEnd = false;
int vend = variant.getEnd();
// todo what is the undeprecated way to get
// the chromosome for the variant?
- if (chrom.equals(variant.getChr()) && (vstart <= end)
+ if (chrom.equals(variant.getContig()) && (vstart <= end)
&& (vend >= start))
{
return variant;
try
{
// recover PDB filename for the model hovered over.
- int mnumber = new Integer(mdlId).intValue() - 1;
+ int mnumber = Integer.valueOf(mdlId).intValue() - 1;
if (_modelFileNameMap != null)
{
int _mp = _modelFileNameMap.length - 1;
newGraphGroups.add(q, null);
}
newGraphGroups.set(newann.graphGroup,
- new Integer(++fgroup));
+ Integer.valueOf(++fgroup));
}
newann.graphGroup = newGraphGroups.get(newann.graphGroup)
.intValue();
newGraphGroups.add(q, null);
}
newGraphGroups.set(newann.graphGroup,
- new Integer(++fgroup));
+ Integer.valueOf(++fgroup));
}
newann.graphGroup = newGraphGroups.get(newann.graphGroup)
.intValue();
public LaunchJvBrowserOnItem(JList listItems)
{
super("Open in Browser");
- this.putValue(MNEMONIC_KEY, new Integer(KeyEvent.VK_O));
+ this.putValue(MNEMONIC_KEY, Integer.valueOf(KeyEvent.VK_O));
this.putValue(Action.LONG_DESCRIPTION, "Open in Browser");
_listItems = listItems;
}
KeyStroke ctrlWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W,
InputEvent.CTRL_DOWN_MASK);
KeyStroke cmdWKey = KeyStroke.getKeyStroke(KeyEvent.VK_W,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask());
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx());
InputMap inputMap = frame
.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
{
getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_Q,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()),
"Quit");
getRootPane().getActionMap().put("Quit", new AbstractAction()
{
progressBarHandlers = new Hashtable<>();
}
- if (progressBars.get(new Long(id)) != null)
+ if (progressBars.get(Long.valueOf(id)) != null)
{
- JPanel panel = progressBars.remove(new Long(id));
- if (progressBarHandlers.contains(new Long(id)))
+ JPanel panel = progressBars.remove(Long.valueOf(id));
+ if (progressBarHandlers.contains(Long.valueOf(id)))
{
- progressBarHandlers.remove(new Long(id));
+ progressBarHandlers.remove(Long.valueOf(id));
}
removeProgressPanel(panel);
}
else
{
- progressBars.put(new Long(id), addProgressPanel(message));
+ progressBars.put(Long.valueOf(id), addProgressPanel(message));
}
}
final IProgressIndicatorHandler handler)
{
if (progressBarHandlers == null
- || !progressBars.containsKey(new Long(id)))
+ || !progressBars.containsKey(Long.valueOf(id)))
{
throw new Error(MessageManager.getString(
"error.call_setprogressbar_before_registering_handler"));
}
- progressBarHandlers.put(new Long(id), handler);
- final JPanel progressPanel = progressBars.get(new Long(id));
+ progressBarHandlers.put(Long.valueOf(id), handler);
+ final JPanel progressPanel = progressBars.get(Long.valueOf(id));
if (handler.canCancel())
{
JButton cancel = new JButton(
name.setText(sf.getType());
description.setText(sf.getDescription());
group.setText(sf.getFeatureGroup());
- start.setValue(new Integer(sf.getBegin()));
- end.setValue(new Integer(sf.getEnd()));
+ start.setValue(Integer.valueOf(sf.getBegin()));
+ end.setValue(Integer.valueOf(sf.getEnd()));
SearchResultsI highlight = new SearchResults();
highlight.addResult(sequences.get(0), sf.getBegin(),
name.setText(featureType);
group.setText(featureGroup);
- start.setValue(new Integer(firstFeature.getBegin()));
- end.setValue(new Integer(firstFeature.getEnd()));
+ start.setValue(Integer.valueOf(firstFeature.getBegin()));
+ end.setValue(Integer.valueOf(firstFeature.getEnd()));
description.setText(firstFeature.getDescription());
updateColourButton(mainPanel, colour,
(oldcol = fcol = getFeatureStyle(featureType)));
data[dataIndex][FILTER_COLUMN] = featureFilter == null
? new FeatureMatcherSet()
: featureFilter;
- data[dataIndex][SHOW_COLUMN] = new Boolean(
+ data[dataIndex][SHOW_COLUMN] = Boolean.valueOf(
af.getViewport().getFeaturesDisplayed().isVisible(type));
dataIndex++;
displayableTypes.remove(type);
data[dataIndex][FILTER_COLUMN] = featureFilter == null
? new FeatureMatcherSet()
: featureFilter;
- data[dataIndex][SHOW_COLUMN] = new Boolean(true);
+ data[dataIndex][SHOW_COLUMN] = Boolean.valueOf(true);
dataIndex++;
displayableTypes.remove(type);
}
// }
//
// JPanel progressPanel;
- // Long lId = new Long(id);
+ // Long lId = Long.valueOf(id);
// GridLayout layout = (GridLayout) statusPanel.getLayout();
// if (progressBars.get(lId) != null)
// {
- // progressPanel = (JPanel) progressBars.get(new Long(id));
+ // progressPanel = (JPanel) progressBars.get(Long.valueOf(id));
// statusPanel.remove(progressPanel);
// progressBars.remove(lId);
// progressPanel = null;
final IProgressIndicatorHandler handler)
{
progressBar.registerHandler(id, handler);
- // if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
+ // if (progressBarHandlers == null || !progressBars.contains(Long.valueOf(id)))
// {
// throw new
// Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
// }
- // progressBarHandlers.put(new Long(id), handler);
- // final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
+ // progressBarHandlers.put(Long.valueOf(id), handler);
+ // final JPanel progressPanel = (JPanel) progressBars.get(Long.valueOf(id));
// if (handler.canCancel())
// {
// JButton cancel = new JButton(
int yDelta = yPos - mouseY;
// Check if this is a rectangle drawing drag
- if ((evt.getModifiers() & InputEvent.BUTTON2_MASK) != 0)
+ if ((evt.getModifiersEx() & InputEvent.BUTTON2_DOWN_MASK) != 0)
{
// rectx2 = evt.getX();
// recty2 = evt.getY();
* Ctrl-W / Cmd-W - close view or window
*/
KeyStroke key_cmdW = KeyStroke.getKeyStroke(KeyEvent.VK_W,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
action = new AbstractAction()
{
@Override
* Ctrl-T / Cmd-T open new view
*/
KeyStroke key_cmdT = KeyStroke.getKeyStroke(KeyEvent.VK_T,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
AbstractAction action = new AbstractAction()
{
@Override
* Ctrl-F / Cmd-F open Finder dialog, 'focused' on the right alignment
*/
KeyStroke key_cmdF = KeyStroke.getKeyStroke(KeyEvent.VK_F,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
AbstractAction action = new AbstractAction()
{
@Override
for (String url : wsUrls)
{
int status = Jws2Discoverer.getDiscoverer().getServerStatusFor(url);
- tdat[r][1] = new Integer(status);
+ tdat[r][1] = Integer.valueOf(status);
tdat[r++][0] = url;
}
if (row.graphGroup > -1)
{
graphGroupSeen.set(row.graphGroup);
- Integer key = new Integer(row.graphGroup);
+ Integer key = Integer.valueOf(row.graphGroup);
if (graphGroup.containsKey(key))
{
graphGroup.put(key, graphGroup.get(key) + "\t" + row.label);
autoAnnotsKey(aa[aai], aa[aai].sequenceRef,
(aa[aai].groupRef == null ? null
: aa[aai].groupRef.getName())),
- new Integer(1));
+ Integer.valueOf(1));
}
}
}
{
displayChar = token;
// foo
- value = new Float(token).floatValue();
+ value = Float.valueOf(token).floatValue();
parsedValue = true;
continue;
} catch (NumberFormatException ex)
float score = Float.NaN;
try
{
- score = new Float(gffColumns[6]).floatValue();
+ score = Float.valueOf(gffColumns[6]).floatValue();
} catch (NumberFormatException ex)
{
sf = new SequenceFeature(ft, desc, startPos, endPos, featureGroup);
{
ascore = symbols.nextToken();
- Float score = new Float(ascore);
+ Float score = Float.valueOf(ascore);
scores.addElement(score);
}
seq_entries.addElement(newseq.toString());
ids.addElement(id);
- Symscores.put(id, new Integer(ids.size() - 1));
+ Symscores.put(id, Integer.valueOf(ids.size() - 1));
}
}
}
{
for (int j = 0; j < width; j++)
{
- float value = new Float(preds[i].getCharAt(j) + "")
+ float value = Float.valueOf(preds[i].getCharAt(j) + "")
.floatValue();
annotations[gapmap[j]] = new Annotation(
preds[i].getCharAt(j) + "", "",
{
for (int j = 0; j < width; j++)
{
- float value = new Float(preds[i].getCharAt(j) + "")
+ float value = Float.valueOf(preds[i].getCharAt(j) + "")
.floatValue();
annotations[gapmap[delMap[j]]] = new Annotation(
preds[i].getCharAt(j) + "", "",
resCode(int v)
{
- val = new Integer(v);
+ val = Integer.valueOf(v);
field = val.toString();
}
};
{
try
{
- bootstrap = (new Integer(nbootstrap.stringMatched(1)))
+ bootstrap = (Integer.valueOf(nbootstrap.stringMatched(1)))
.intValue();
HasBootstrap = true;
} catch (Exception e)
{
try
{
- distance = (new Float(ndist.stringMatched(1))).floatValue();
+ distance = (Float.valueOf(ndist.stringMatched(1))).floatValue();
HasDistances = true;
nodehasdistance = true;
} catch (Exception e)
if (code.toLowerCase().equals("b"))
{
int v = -1;
- Float iv = new Float(value);
+ Float iv = Float.valueOf(value);
v = iv.intValue(); // jalview only does integer bootstraps
// currently
c.setBootstrap(v);
Float val = null;
try
{
- val = new Float(props[p].getContent());
+ val = Float.valueOf(props[p].getContent());
} catch (Exception e)
{
Cache.log.warn("Failed to parse threshold property");
int se_end = se[1 - se[2]] + (se[2] == 0 ? 1 : -1);
for (int p = se[se[2]]; p != se_end; p += se[2] == 0 ? 1 : -1)
{
- posList.add(new Integer(p));
+ posList.add(Integer.valueOf(p));
}
}
}
for (int p = 0, pSize = dseta.getPosCount(); p < pSize; p++)
{
pos = dseta.getPos(p).getI();
- posList.add(new Integer(pos));
+ posList.add(Integer.valueOf(pos));
}
}
}
int se_end = se[1 - se[2]] + (se[2] == 0 ? 1 : -1);
for (int p = se[se[2]]; p != se_end; p += se[2] == 0 ? 1 : -1)
{
- posList.add(new Integer(p));
+ posList.add(Integer.valueOf(p));
}
}
}
for (int p = 0, pSize = dseta.getPosCount(); p < pSize; p++)
{
pos = dseta.getPos(p).getI();
- posList.add(new Integer(pos));
+ posList.add(Integer.valueOf(pos));
}
}
}
for (int s = 0, sSize = range.getSegCount(); s < sSize; s++)
{
se = getSegRange(range.getSeg(s), false);
- posList.addElement(new Integer(se[0]));
- posList.addElement(new Integer(se[1]));
+ posList.addElement(Integer.valueOf(se[0]));
+ posList.addElement(Integer.valueOf(se[1]));
}
}
else if (range.getPosCount() > 0)
for (int p = 0, pSize = range.getPosCount(); p < pSize; p++)
{
pos = range.getPos(p).getI();
- posList.add(new Integer(pos));
- posList.add(new Integer(pos));
+ posList.add(Integer.valueOf(pos));
+ posList.add(Integer.valueOf(pos));
}
}
}
{
try
{
- val = new Boolean(p.getContent());
+ val = Boolean.valueOf(p.getContent());
} catch (Exception e)
{
}
{
try
{
- val = new Float(p.getContent());
+ val = Float.valueOf(p.getContent());
} catch (Exception e)
{
{
try
{
- val = new Integer(p.getContent());
+ val = Integer.valueOf(p.getContent());
} catch (Exception e)
{
}
Integer nindx = (Integer) nodespecs.get(nname);
if (nindx == null)
{
- nindx = new Integer(1);
+ nindx = Integer.valueOf(1);
}
nname = nindx.toString() + " " + nname;
return nname;
String oval = nodespec.substring(0, nodespec.indexOf(' '));
try
{
- occurence = new Integer(oval).intValue();
+ occurence = Integer.valueOf(oval).intValue();
} catch (Exception e)
{
System.err.println("Invalid nodespec '" + nodespec + "'");
// FIXME getDefaultToolkit throws an exception in Headless mode
KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
- | KeyEvent.SHIFT_MASK,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()
+ | KeyEvent.SHIFT_DOWN_MASK,
false);
addMenuActionAndAccelerator(keyStroke, saveAs, al);
closeMenuItem.setText(MessageManager.getString("action.close"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_W,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem selectAllSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.select_all"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem invertSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.invert_sequence_selection"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem remove2LeftMenuItem = new JMenuItem(
MessageManager.getString("action.remove_left"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_L,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem remove2RightMenuItem = new JMenuItem(
MessageManager.getString("action.remove_right"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_R,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem removeGappedColumnMenuItem = new JMenuItem(
MessageManager.getString("action.remove_empty_columns"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem removeAllGapsMenuItem = new JMenuItem(
MessageManager.getString("action.remove_all_gaps"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_E,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
- | KeyEvent.SHIFT_MASK,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()
+ | KeyEvent.SHIFT_DOWN_MASK,
false);
al = new ActionListener()
{
JMenuItem removeRedundancyMenuItem = new JMenuItem(
MessageManager.getString("action.remove_redundancy"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_D,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
undoMenuItem.setEnabled(false);
undoMenuItem.setText(MessageManager.getString("action.undo"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Z,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
redoMenuItem.setEnabled(false);
redoMenuItem.setText(MessageManager.getString("action.redo"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_Y,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem printMenuItem = new JMenuItem(
MessageManager.getString("action.print"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_P,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem findMenuItem = new JMenuItem(
MessageManager.getString("action.find"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_F,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
findMenuItem.setToolTipText(JvSwingUtils.wrapTooltip(true,
MessageManager.getString("label.find_tip")));
al = new ActionListener()
JMenuItem deleteGroups = new JMenuItem(
MessageManager.getString("action.undefine_groups"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_U,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem createGroup = new JMenuItem(
MessageManager.getString("action.create_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem unGroup = new JMenuItem(
MessageManager.getString("action.remove_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
- | KeyEvent.SHIFT_MASK,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()
+ | KeyEvent.SHIFT_DOWN_MASK,
false);
al = new ActionListener()
{
copy.setText(MessageManager.getString("action.copy"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_C,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
cut.setText(MessageManager.getString("action.cut"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_X,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem pasteNew = new JMenuItem(
MessageManager.getString("label.to_new_alignment"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
- | KeyEvent.SHIFT_MASK,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()
+ | KeyEvent.SHIFT_DOWN_MASK,
false);
al = new ActionListener()
{
JMenuItem pasteThis = new JMenuItem(
MessageManager.getString("label.to_this_alignment"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_V,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem invertColSel = new JMenuItem(
MessageManager.getString("action.invert_column_selection"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_I,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()
- | KeyEvent.ALT_MASK,
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()
+ | KeyEvent.ALT_DOWN_MASK,
false);
al = new ActionListener()
{
JMenuItem save = new JMenuItem(MessageManager.getString("action.save"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_S,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
JMenuItem newView = new JMenuItem(
MessageManager.getString("action.new_view"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_T,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false);
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false);
al = new ActionListener()
{
@Override
});
close.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_W,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
selectAll.setText(MessageManager.getString("action.select_all"));
selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_A,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
selectAll.addActionListener(new ActionListener()
{
@Override
save.setText(MessageManager.getString("action.save"));
save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_S,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
save.addActionListener(new ActionListener()
{
@Override
});
copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_C,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
editMenubar.add(jMenu1);
editMenubar.add(editMenu);
selectAll.setText(MessageManager.getString("action.select_all"));
selectAll.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_A,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
selectAll.addActionListener(new ActionListener()
{
@Override
save.setText(MessageManager.getString("action.save"));
save.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_S,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
save.addActionListener(new ActionListener()
{
@Override
});
copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_C,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
pasteMenu.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
java.awt.event.KeyEvent.VK_V,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(), false));
editMenubar.add(jMenu1);
editMenubar.add(editMenu);
textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12));
.setText(MessageManager.getString("label.load_tree_from_file"));
inputLocalFileMenuItem.setAccelerator(
javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(),
+ Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx(),
false));
inputLocalFileMenuItem
.addActionListener(new java.awt.event.ActionListener()
}
else
{
- featureOrder.put(featureType, new Float(
+ featureOrder.put(featureType, Float.valueOf(
fs / jm.getFeatureSettings().getSetting().size()));
}
if (safeBoolean(setting.isDisplay()))
for (int gs = 0; gs < jm.getFeatureSettings().getGroup().size(); gs++)
{
Group grp = jm.getFeatureSettings().getGroup().get(gs);
- fgtable.put(grp.getName(), new Boolean(grp.isDisplay()));
+ fgtable.put(grp.getName(), Boolean.valueOf(grp.isDisplay()));
}
// FeatureRendererSettings frs = new FeatureRendererSettings(renderOrder,
// fgtable, featureColours, jms.getFeatureSettings().hasTransparency() ?
{
if (minval.length() > 0)
{
- min = new Float(minval).floatValue();
+ min = Float.valueOf(minval).floatValue();
}
} catch (Exception e)
{
{
if (maxval.length() > 0)
{
- max = new Float(maxval).floatValue();
+ max = Float.valueOf(maxval).floatValue();
}
} catch (Exception e)
{
{
gcol.nextToken();
tval = gcol.nextToken();
- featureColour.setThreshold(new Float(tval).floatValue());
+ featureColour.setThreshold(Float.valueOf(tval).floatValue());
} catch (Exception e)
{
System.err.println("Couldn't parse threshold value as a float: ("
{
return false;
}
- return (Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMask()
+ return (Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx() // .getMenuShortcutKeyMaskEx()
& e.getModifiersEx()) != 0; // getModifiers()) != 0;
}
return e.isControlDown();
{
featureOrder = new Hashtable<>();
}
- featureOrder.put(type, new Float(position));
+ featureOrder.put(type, Float.valueOf(position));
return position;
}
}
if (newGroupsVisible)
{
- featureGroups.put(group, new Boolean(true));
+ featureGroups.put(group, Boolean.valueOf(true));
return true;
}
return false;
@Override
public void setGroupVisibility(String group, boolean visible)
{
- featureGroups.put(group, new Boolean(visible));
+ featureGroups.put(group, Boolean.valueOf(visible));
}
@Override
for (String gst : toset)
{
Boolean st = featureGroups.get(gst);
- featureGroups.put(gst, new Boolean(visible));
+ featureGroups.put(gst, Boolean.valueOf(visible));
if (st != null)
{
rdrw = rdrw || (visible != st.booleanValue());
// The Score objects contain a set of size one containing the range and
// an ArrayList<float> of size one containing the probabilty
basePairs.put(score.getRanges().first(),
- new Float(score.getScores().get(0)));
+ Float.valueOf(score.getScores().get(0)));
}
for (int i = 0, ri = 0, iEnd = struct.length(); i < iEnd; i++, ri++)
{
_hashCode += getMatrix().hashCode();
}
- _hashCode += new Float(getExp()).hashCode();
- _hashCode += new Boolean(isEchofilter()).hashCode();
+ _hashCode += Float.valueOf(getExp()).hashCode();
+ _hashCode += Boolean.valueOf(isEchofilter()).hashCode();
if (getFilter() != null)
{
_hashCode += getFilter().hashCode();
_hashCode += getOutformat().hashCode();
}
_hashCode += getTopcombon();
- _hashCode += new Boolean(isAsync()).hashCode();
+ _hashCode += Boolean.valueOf(isAsync()).hashCode();
if (getEmail() != null)
{
_hashCode += getEmail().hashCode();
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {
sequence, searchDatabases, taxonId,
- new java.lang.Boolean(onlyActive) });
+ java.lang.Boolean.valueOf(onlyActive) });
if (_resp instanceof java.rmi.RemoteException)
{
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {
accession, ac_version, searchDatabases, taxonId,
- new java.lang.Boolean(onlyActive) });
+ java.lang.Boolean.valueOf(onlyActive) });
if (_resp instanceof java.rmi.RemoteException)
{
cs.removeElement(1);
List<Integer> sel = cs.getSelected();
assertEquals(2, sel.size());
- assertEquals(new Integer(2), sel.get(0));
- assertEquals(new Integer(5), sel.get(1));
+ assertEquals(Integer.valueOf(2), sel.get(0));
+ assertEquals(Integer.valueOf(5), sel.get(1));
// removing an element in the list removes it
cs.removeElement(2);
assertEquals(1, sel.size());
sel = cs.getSelected();
assertEquals(1, sel.size());
- assertEquals(new Integer(5), sel.get(0));
+ assertEquals(Integer.valueOf(5), sel.get(0));
}
/**
12.5f, "group");
sf1.setValue("STRAND", "+");
sf1.setValue("Note", "Testing");
- Integer count = new Integer(7);
+ Integer count = Integer.valueOf(7);
sf1.setValue("Count", count);
SequenceFeature sf2 = new SequenceFeature(sf1);
assertEquals("+", sf1.getValue("STRAND"));
assertNull(sf1.getValue("strand")); // case-sensitive
assertEquals(".", sf1.getValue("unknown", "."));
- Integer i = new Integer(27);
+ Integer i = Integer.valueOf(27);
assertSame(i, sf1.getValue("Unknown", i));
}
import jalview.io.FileLoader;
import jalview.util.MessageManager;
-import java.awt.Event;
-import java.awt.EventQueue;
+import java.awt.event.InputEvent;import java.awt.EventQueue;
import java.awt.event.MouseEvent;
import java.lang.reflect.InvocationTargetException;
/*
* mouse at top left of unwrapped panel
*/
- MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+ MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
0, 0, 0, false, 0);
MousePos pos = testee.findMousePosition(evt);
assertEquals(pos.column, 0);
* mouse at top left of wrapped panel; there is a gap of charHeight
* above the alignment
*/
- MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+ MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
0, 0, 0, false, 0);
MousePos pos = testee.findMousePosition(evt);
assertEquals(pos.column, 0);
* cursor at bottom of gap above
*/
y = charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor over top of first sequence
*/
y = charHeight;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* cursor at bottom of first sequence
*/
y = 2 * charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* cursor at top of second sequence
*/
y = 2 * charHeight;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 1);
* cursor at bottom of second sequence
*/
y = 3 * charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 1);
* cursor at bottom of last sequence
*/
y = charHeight * (1 + alignmentHeight) - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* method reports index of nearest sequence above
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor still in the gap above annotations, now at the bottom of it
*/
y += SeqCanvas.SEQS_ANNOTATION_GAP - 1; // 3-1 = 2
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor at the top of the n'th annotation
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor at the bottom of the n'th annotation
*/
y += annotationRows[n].height - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor in gap between wrapped widths
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at bottom of gap between wrapped widths
*/
y += charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at top of first sequence, second wrapped width
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* mouse at top left of wrapped panel; there is a gap of charHeight
* above the alignment
*/
- MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+ MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
0, 0, 0, false, 0);
MousePos pos = testee.findMousePosition(evt);
assertEquals(pos.column, 0);
* two charHeights including scale panel
*/
y = 2 * charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor over top of first sequence
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* cursor at bottom of first sequence
*/
y += charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* cursor at top of second sequence
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 1);
* cursor at bottom of second sequence
*/
y += charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 1);
* (scale + gap + sequences)
*/
y = charHeight * (2 + alignmentHeight) - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor below sequences, in 3-pixel gap above annotations
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* method reports index of nearest sequence above
*/
y += SeqCanvas.SEQS_ANNOTATION_GAP - 1; // 3-1 = 2
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor at the top of the n'th annotation
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor at the bottom of the n'th annotation
*/
y += annotationRows[n].height - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor in gap between wrapped widths
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at bottom of gap between wrapped widths
*/
y += charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at top of scale, second wrapped width
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at bottom of scale, second wrapped width
*/
y += charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at top of first sequence, second wrapped width
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* mouse at top left of wrapped panel; there is a gap of charHeight
* above the alignment
*/
- MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y,
+ MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y,
0, 0, 0, false, 0);
MousePos pos = testee.findMousePosition(evt);
assertEquals(pos.column, 0);
* cursor over top of first sequence
*/
y = charHeight;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
* cursor at bottom of last sequence
*/
y = charHeight * (1 + alignmentHeight) - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, alignmentHeight - 1);
* cursor below sequences, at top of charHeight gap between widths
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor below sequences, at top of charHeight gap between widths
*/
y += charHeight - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, -1);
* cursor at the top of the first sequence, second width
*/
y += 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, y, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, y, 0, 0, 0,
false, 0);
pos = testee.findMousePosition(evt);
assertEquals(pos.seqIndex, 0);
/*
* mouse at top left of unwrapped panel
*/
- MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+ MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
0, 0, 0, false, 0);
assertEquals(testee.findColumn(evt), 0);
* not quite one charWidth across
*/
x = charWidth-1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
0, 0, 0, false, 0);
assertEquals(testee.findColumn(evt), 0);
* one charWidth across
*/
x = charWidth;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), 1);
* two charWidths across
*/
x = 2 * charWidth;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), 2);
* limited to last column of seqcanvas
*/
x = 20000;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
SeqCanvas seqCanvas = alignFrame.alignPanel.getSeqPanel().seqCanvas;
int w = seqCanvas.getWidth();
alignFrame.getViewport().hideColumns(4, 9);
x = 5 * charWidth + 2;
// x is in 6th visible column, absolute column 12, or 11 base 0
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), 11);
}
/*
* mouse at top left of wrapped panel, no West (left) scale
*/
- MouseEvent evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+ MouseEvent evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
0, 0, 0, false, 0);
assertEquals(testee.findColumn(evt), 0);
* not quite one charWidth across
*/
x = charWidth-1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0,
0, 0, 0, false, 0);
assertEquals(testee.findColumn(evt), 0);
* one charWidth across
*/
x = charWidth;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), 1);
int labelWidth = (int) PA.getValue(seqCanvas, "labelWidthWest");
assertTrue(labelWidth > 0);
x = labelWidth - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), -1);
x = labelWidth;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), 0);
int residuesWide = av.getRanges().getViewportWidth();
assertTrue(residuesWide > 0);
x = labelWidth + charWidth * residuesWide - 1;
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), residuesWide - 1);
assertTrue(residuesWide2 > 0);
assertTrue(residuesWide2 < residuesWide); // available width reduced
x += 1; // just over left edge of scale right
- evt = new MouseEvent(testee, Event.MOUSE_MOVE, 0L, 0, x, 0, 0, 0, 0,
+ evt = new MouseEvent(testee, MouseEvent.MOUSE_MOVED, 0L, 0, x, 0, 0, 0, 0,
false, 0);
assertEquals(testee.findColumn(evt), -1);
assertEquals("Threshold line not identical.",
aa_original[i].threshold, aa_new[i].threshold);
// graphGroup may differ, but pattern should be the same
- Integer o_ggrp = new Integer(aa_original[i].graphGroup + 2);
- Integer n_ggrp = new Integer(aa_new[i].graphGroup + 2);
+ Integer o_ggrp = Integer.valueOf(aa_original[i].graphGroup + 2);
+ Integer n_ggrp = Integer.valueOf(aa_new[i].graphGroup + 2);
BitSet orig_g = orig_groups.get(o_ggrp);
BitSet new_g = new_groups.get(n_ggrp);
if (orig_g == null)
--- /dev/null
+#!/usr/bin/env bash
+
+TYPES="Boolean|Character|Double|Float|Long|Integer" find src test -type f -name "*.java" -exec perl -p -i -e 's/\bnew\s+(java\.lang\.)?($ENV{TYPES})\(/${1}${2}.valueOf(/;' {} +
+
+find src test -type f -name "*.java" -exec perl -p -i -e 's/(InputEvent|KeyEvent)\s*\.\s*([A-Z0-9]+)_MASK\b/${1}.${2}_DOWN_MASK/g;' {} +
+
+find src test -type f -name "*.java" -exec perl -p -i -e 's/\b(e|evt)\.getModifiers\b/${1}.getModifiersEx/g;' {} +
+
+find src test -type f -name "*.java" -exec perl -p -i -e 's/\.getMenuShortcutKeyMask\b/\.getMenuShortcutKeyMaskEx/g;' {} +
+
+#
+find src test -type f -name "*.java" -exec perl -p -i -e 'if ( s/^\s*import\s+java\.awt\.Event\s*;\s*$/import java.awt.event.InputEvent;/ ) { $event = 1 }; if ($event == 1) { s/\b(java\.awt\.)?Event\s*\.\s*([A-Z0-9]+)_MASK\b/InputEvent.${2}_DOWN_MASK/g; s/\b(java\.awt\.)?Event\s*\.\s*(MOUSE_MOVE)/MouseEvent.MOUSE_MOVED/g }' {} +