mirror of
https://github.com/nasa/trick.git
synced 2025-02-06 19:09:20 +00:00
#647 update depricated code
This commit is contained in:
parent
8a4c8e3dd9
commit
a6274680a5
@ -251,7 +251,7 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
|||||||
@Override
|
@Override
|
||||||
public Object getSessionState(Component component) {
|
public Object getSessionState(Component component) {
|
||||||
if (component instanceof JToggleButton) {
|
if (component instanceof JToggleButton) {
|
||||||
return new Boolean(((JToggleButton)component).isSelected());
|
return ((JToggleButton) component).isSelected();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -363,8 +363,8 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
|||||||
@Override
|
@Override
|
||||||
protected void startup() {
|
protected void startup() {
|
||||||
String defaultValue = Boolean.toString(false);
|
String defaultValue = Boolean.toString(false);
|
||||||
boolean savedExitProperty = new Boolean(trickProperties.getProperty(
|
boolean savedExitProperty = Boolean.valueOf(trickProperties.getProperty(
|
||||||
"confirmExit", defaultValue)).booleanValue();
|
"confirmExit", defaultValue));
|
||||||
if (( savedExitProperty == true ) && (getExitListeners().length==0)) {
|
if (( savedExitProperty == true ) && (getExitListeners().length==0)) {
|
||||||
// initialize gets called again if you reconnect, so don't add another exitlistener
|
// initialize gets called again if you reconnect, so don't add another exitlistener
|
||||||
addExitListener(exitListener);
|
addExitListener(exitListener);
|
||||||
|
@ -284,7 +284,7 @@ public class UIUtils {
|
|||||||
public static boolean isRightMouseClick(MouseEvent e) {
|
public static boolean isRightMouseClick(MouseEvent e) {
|
||||||
boolean rval = false;
|
boolean rval = false;
|
||||||
|
|
||||||
if( (e.getModifiers()&MouseEvent.BUTTON3_MASK)==MouseEvent.BUTTON3_MASK ) {
|
if( (e.getModifiersEx()&MouseEvent.BUTTON3_DOWN_MASK)==MouseEvent.BUTTON3_DOWN_MASK ) {
|
||||||
rval = true;
|
rval = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ public class FontChooser extends JDialog implements ActionListener, ListSelectio
|
|||||||
currentFont = font;
|
currentFont = font;
|
||||||
if (font != null) {
|
if (font != null) {
|
||||||
fontList.setSelectedValue(font.getName(), true);
|
fontList.setSelectedValue(font.getName(), true);
|
||||||
sizeList.setSelectedValue(new Integer(font.getSize()), true);
|
sizeList.setSelectedValue(font.getSize(), true);
|
||||||
if (font.getStyle() == Font.PLAIN) {
|
if (font.getStyle() == Font.PLAIN) {
|
||||||
boldBox.setSelected(false);
|
boldBox.setSelected(false);
|
||||||
italicBox.setSelected(false);
|
italicBox.setSelected(false);
|
||||||
|
@ -64,7 +64,7 @@ public abstract class CommonProduct {
|
|||||||
* @param tstart The start time of the related data.
|
* @param tstart The start time of the related data.
|
||||||
*/
|
*/
|
||||||
public void setTStart(double tstart) {
|
public void setTStart(double tstart) {
|
||||||
this.tstart = new Double(tstart);
|
this.tstart = tstart;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,7 +74,7 @@ public abstract class CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setTStart(String tstartStr) {
|
public void setTStart(String tstartStr) {
|
||||||
try {
|
try {
|
||||||
tstart = new Double(tstartStr);
|
tstart = Double.valueOf(tstartStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
tstart = null;
|
tstart = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -97,7 +97,7 @@ public abstract class CommonProduct {
|
|||||||
* @param tstop The stop time of the related data.
|
* @param tstop The stop time of the related data.
|
||||||
*/
|
*/
|
||||||
public void setTStop(double tstop) {
|
public void setTStop(double tstop) {
|
||||||
this.tstop = new Double(tstop);
|
this.tstop = tstop;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,7 +107,7 @@ public abstract class CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setTStop(String tstopStr) {
|
public void setTStop(String tstopStr) {
|
||||||
try {
|
try {
|
||||||
tstop = new Double(tstopStr);
|
tstop = Double.valueOf(tstopStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
tstop = null;
|
tstop = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -130,7 +130,7 @@ public abstract class CommonProduct {
|
|||||||
* @param freq The frequency of the related data.
|
* @param freq The frequency of the related data.
|
||||||
*/
|
*/
|
||||||
public void setFrequency(double freq) {
|
public void setFrequency(double freq) {
|
||||||
frequency = new Double(freq);
|
frequency = freq;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -140,7 +140,7 @@ public abstract class CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setFrequency(String freqStr) {
|
public void setFrequency(String freqStr) {
|
||||||
try {
|
try {
|
||||||
frequency = new Double(freqStr);
|
frequency = Double.valueOf(freqStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
frequency = null;
|
frequency = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
|
@ -45,8 +45,8 @@ public class ProductPage extends CommonProduct {
|
|||||||
//========================================
|
//========================================
|
||||||
|
|
||||||
private List<ProductPlot> plotList;
|
private List<ProductPlot> plotList;
|
||||||
private Integer hcells = new Integer(0); // default to 0
|
private Integer hcells = 0; // default to 0
|
||||||
private Integer vcells = new Integer(0); // default to 0
|
private Integer vcells = 0; // default to 0
|
||||||
|
|
||||||
//========================================
|
//========================================
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -69,7 +69,7 @@ public class ProductPage extends CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setHcells(String hcellsStr) {
|
public void setHcells(String hcellsStr) {
|
||||||
try {
|
try {
|
||||||
hcells = new Integer(hcellsStr);
|
hcells = Integer.valueOf(hcellsStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
hcells = null;
|
hcells = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -83,7 +83,7 @@ public class ProductPage extends CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setVcells(String vcellsStr) {
|
public void setVcells(String vcellsStr) {
|
||||||
try {
|
try {
|
||||||
vcells = new Integer(vcellsStr);
|
vcells = Integer.valueOf(vcellsStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
vcells = null;
|
vcells = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
|
@ -346,7 +346,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
* @param xmin The minimum value for X variable.
|
* @param xmin The minimum value for X variable.
|
||||||
*/
|
*/
|
||||||
public void setXMin(double xmin) {
|
public void setXMin(double xmin) {
|
||||||
this.xmin = new Double(xmin);
|
this.xmin = xmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -356,7 +356,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setXMin(String xminStr) {
|
public void setXMin(String xminStr) {
|
||||||
try {
|
try {
|
||||||
xmin = new Double(xminStr);
|
xmin = Double.valueOf(xminStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
xmin = null;
|
xmin = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -379,7 +379,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
* @param xmax The maximum value for X variable.
|
* @param xmax The maximum value for X variable.
|
||||||
*/
|
*/
|
||||||
public void setXMax(double xmax) {
|
public void setXMax(double xmax) {
|
||||||
this.xmax = new Double(xmax);
|
this.xmax = xmax;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -389,7 +389,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setXMax(String xmaxStr) {
|
public void setXMax(String xmaxStr) {
|
||||||
try {
|
try {
|
||||||
xmax = new Double(xmaxStr);
|
xmax = Double.valueOf(xmaxStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
xmax = null;
|
xmax = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -403,7 +403,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
* @param ymin The minimum value for Y variable.
|
* @param ymin The minimum value for Y variable.
|
||||||
*/
|
*/
|
||||||
public void setYMin(double ymin) {
|
public void setYMin(double ymin) {
|
||||||
this.ymin = new Double(ymin);
|
this.ymin = ymin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -413,7 +413,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setYMin(String yminStr) {
|
public void setYMin(String yminStr) {
|
||||||
try {
|
try {
|
||||||
ymin = new Double(yminStr);
|
ymin = Double.valueOf(yminStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
ymin = null;
|
ymin = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -435,7 +435,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
* @param ymax The maximum value for Y variable.
|
* @param ymax The maximum value for Y variable.
|
||||||
*/
|
*/
|
||||||
public void setYMax(double ymax) {
|
public void setYMax(double ymax) {
|
||||||
this.ymax = new Double(ymax);
|
this.ymax = ymax;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -445,7 +445,7 @@ public class ProductPlot extends CommonProduct {
|
|||||||
*/
|
*/
|
||||||
public void setYMax(String ymaxStr) {
|
public void setYMax(String ymaxStr) {
|
||||||
try {
|
try {
|
||||||
ymax = new Double(ymaxStr);
|
ymax = Double.valueOf(ymaxStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
ymax = null;
|
ymax = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
|
@ -515,7 +515,7 @@ public class ProductVar {
|
|||||||
* @param bias The var bias.
|
* @param bias The var bias.
|
||||||
*/
|
*/
|
||||||
public void setBias(double bias) {
|
public void setBias(double bias) {
|
||||||
this.bias = new Double(bias);
|
this.bias = bias;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -525,7 +525,7 @@ public class ProductVar {
|
|||||||
*/
|
*/
|
||||||
public void setBias(String biasStr) {
|
public void setBias(String biasStr) {
|
||||||
try {
|
try {
|
||||||
bias = new Double(biasStr);
|
bias = Double.valueOf(biasStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
bias = null;
|
bias = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -539,7 +539,7 @@ public class ProductVar {
|
|||||||
* @param scale The var scale.
|
* @param scale The var scale.
|
||||||
*/
|
*/
|
||||||
public void setScale(double scale) {
|
public void setScale(double scale) {
|
||||||
this.scale = new Double(scale);
|
this.scale = scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -549,7 +549,7 @@ public class ProductVar {
|
|||||||
*/
|
*/
|
||||||
public void setScale(String scaleStr) {
|
public void setScale(String scaleStr) {
|
||||||
try {
|
try {
|
||||||
scale = new Double(scaleStr);
|
scale = Double.valueOf(scaleStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
scale = null;
|
scale = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
@ -563,7 +563,7 @@ public class ProductVar {
|
|||||||
* @param max The var max.
|
* @param max The var max.
|
||||||
*/
|
*/
|
||||||
public void setMax(double max) {
|
public void setMax(double max) {
|
||||||
this.max = new Double(max);
|
this.max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -573,7 +573,7 @@ public class ProductVar {
|
|||||||
*/
|
*/
|
||||||
public void setMax(String maxStr) {
|
public void setMax(String maxStr) {
|
||||||
try {
|
try {
|
||||||
max = new Double(maxStr);
|
max = Double.valueOf(maxStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
max = null;
|
max = null;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
|
@ -319,7 +319,7 @@ public class MonteMonitorApplication extends RunTimeTrickApplication {
|
|||||||
protected JComponent createMainPanel() {
|
protected JComponent createMainPanel() {
|
||||||
return new JXPanel(new BorderLayout()) {
|
return new JXPanel(new BorderLayout()) {
|
||||||
|
|
||||||
Integer noRunNumber = new Integer(-1);
|
Integer noRunNumber = -1;
|
||||||
|
|
||||||
{
|
{
|
||||||
progressBar = new JProgressBar() {{
|
progressBar = new JProgressBar() {{
|
||||||
@ -583,12 +583,12 @@ public class MonteMonitorApplication extends RunTimeTrickApplication {
|
|||||||
}
|
}
|
||||||
slave.name = data[dataIndex++];
|
slave.name = data[dataIndex++];
|
||||||
if (data[dataIndex++].equals("BAD_REF")) {
|
if (data[dataIndex++].equals("BAD_REF")) {
|
||||||
slave.currentRun = new Integer(-1);
|
slave.currentRun = -1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
slave.currentRun = new Integer(data[dataIndex - 1]);
|
slave.currentRun = Integer.valueOf(data[dataIndex - 1]);
|
||||||
}
|
}
|
||||||
slave.numResults = new Integer(data[dataIndex++]);
|
slave.numResults = Integer.valueOf(data[dataIndex++]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = slaves.size() - 1; i >= 0; --i) {
|
for (int i = slaves.size() - 1; i >= 0; --i) {
|
||||||
|
@ -56,10 +56,10 @@ public class Slave {
|
|||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
/** current run number */
|
/** current run number */
|
||||||
public Integer currentRun = new Integer(-1);
|
public Integer currentRun = -1;
|
||||||
|
|
||||||
/** number or results returned */
|
/** number or results returned */
|
||||||
public Integer numResults = new Integer(0);
|
public Integer numResults = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constructs a new Slave whose initial state is UNKNOWN
|
* constructs a new Slave whose initial state is UNKNOWN
|
||||||
|
@ -355,7 +355,7 @@ public class MtvView extends FrameView {
|
|||||||
if (eventname.length > 1) {
|
if (eventname.length > 1) {
|
||||||
// put grouped events on their own tab
|
// put grouped events on their own tab
|
||||||
if (!tabmap.containsKey(eventname[0])) {
|
if (!tabmap.containsKey(eventname[0])) {
|
||||||
tabmap.put(eventname[0], new Integer(tabcount));
|
tabmap.put(eventname[0], tabcount);
|
||||||
tabs[tabcount] = new Tab();
|
tabs[tabcount] = new Tab();
|
||||||
tabs[tabcount].panel = new JPanel();
|
tabs[tabcount].panel = new JPanel();
|
||||||
tabs[tabcount].panel.setName(eventname[0]);
|
tabs[tabcount].panel.setName(eventname[0]);
|
||||||
|
@ -33,8 +33,8 @@ public class DoubleComboBox extends JXPanel {
|
|||||||
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
|
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
minimumBox.addItem(new Integer(i));
|
minimumBox.addItem(i);
|
||||||
maximumBox.addItem(new Integer(i));
|
maximumBox.addItem(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
minimumBox.setSelectedIndex(0);
|
minimumBox.setSelectedIndex(0);
|
||||||
@ -43,12 +43,12 @@ public class DoubleComboBox extends JXPanel {
|
|||||||
minimumBox.addActionListener(new ActionListener() {
|
minimumBox.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
int min = ((Integer)minimumBox.getSelectedItem());
|
int min = (int)minimumBox.getSelectedItem();
|
||||||
for (int i = ((Integer)maximumBox.getItemAt(0)); i < min; ++i) {
|
for (int i = ((Integer)maximumBox.getItemAt(0)); i < min; ++i) {
|
||||||
maximumBox.removeItemAt(0);
|
maximumBox.removeItemAt(0);
|
||||||
}
|
}
|
||||||
for (int i = ((Integer)maximumBox.getItemAt(0)); i > min; ) {
|
for (int i = ((Integer)maximumBox.getItemAt(0)); i > min; ) {
|
||||||
maximumBox.insertItemAt(new Integer(--i), 0);
|
maximumBox.insertItemAt(--i, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -56,12 +56,12 @@ public class DoubleComboBox extends JXPanel {
|
|||||||
maximumBox.addActionListener(new ActionListener() {
|
maximumBox.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
int max = ((Integer)maximumBox.getSelectedItem());
|
int max = (int)maximumBox.getSelectedItem();
|
||||||
for (int i = ((Integer)minimumBox.getItemAt(minimumBox.getItemCount() - 1)); i > max; --i) {
|
for (int i = ((Integer)minimumBox.getItemAt(minimumBox.getItemCount() - 1)); i > max; --i) {
|
||||||
minimumBox.removeItemAt(minimumBox.getItemCount() - 1);
|
minimumBox.removeItemAt(minimumBox.getItemCount() - 1);
|
||||||
}
|
}
|
||||||
for (int i = ((Integer)minimumBox.getItemAt(minimumBox.getItemCount() - 1)); i < max; ) {
|
for (int i = ((Integer)minimumBox.getItemAt(minimumBox.getItemCount() - 1)); i < max; ) {
|
||||||
minimumBox.addItem(new Integer(++i));
|
minimumBox.addItem(++i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -239,7 +239,7 @@ public class StripChartManager {
|
|||||||
* updates the log by adding the most recent value
|
* updates the log by adding the most recent value
|
||||||
*/
|
*/
|
||||||
public void update() {
|
public void update() {
|
||||||
values.add(new Double(variable.getValue().toVariableServer()));
|
values.add(Double.valueOf(variable.getValue().toVariableServer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user