< prev index next >
src/com/sun/javatest/exec/NewReportDialog.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
*** 139,151 ****
interviewParams = p;
}
// ---------------------------------------------------------------------------
! void setLastState(Map h) {
! String rd = (String) (h.get(REPORT_DIR));
! String filter = (String) (h.get(FILTER));
if (dirField == null)
initGUI();
dirField.setText(rd);
--- 139,151 ----
interviewParams = p;
}
// ---------------------------------------------------------------------------
! void setLastState(Map<String, String> h) {
! String rd = (h.get(REPORT_DIR));
! String filter = (h.get(FILTER));
if (dirField == null)
initGUI();
dirField.setText(rd);
*** 899,911 ****
private ArrayList<CustomReport> getActiveCustomReports() {
ArrayList<CustomReport> customReps = new ArrayList<>();
if (customBoxes != null && customBoxes.size() > 0) {
! Iterator it = customBoxes.keySet().iterator();
while (it.hasNext()) {
! JCheckBox box = (JCheckBox)(it.next());
if (box.isSelected()) {
customReps.add(customBoxes.get(box));
}
}
}
--- 899,911 ----
private ArrayList<CustomReport> getActiveCustomReports() {
ArrayList<CustomReport> customReps = new ArrayList<>();
if (customBoxes != null && customBoxes.size() > 0) {
! Iterator<JCheckBox> it = customBoxes.keySet().iterator();
while (it.hasNext()) {
! JCheckBox box = (it.next());
if (box.isSelected()) {
customReps.add(customBoxes.get(box));
}
}
}
*** 1094,1106 ****
tabs.setSelectedIndex(tabs.getTabCount()-1);
return;
}
// validate custom reports
! Iterator it = getActiveCustomReports().iterator();
while (it.hasNext()) {
! CustomReport cr = (CustomReport) it.next();
String error = cr.validateOptions();
if (error != null) {
for (int i = 0; i < listModel.getSize(); i++ ) {
JCheckBox cb = listModel.elementAt(i);
if (cb.getName().equals(cr.getReportId())) {
--- 1094,1106 ----
tabs.setSelectedIndex(tabs.getTabCount()-1);
return;
}
// validate custom reports
! Iterator<CustomReport> it = getActiveCustomReports().iterator();
while (it.hasNext()) {
! CustomReport cr = it.next();
String error = cr.validateOptions();
if (error != null) {
for (int i = 0; i < listModel.getSize(); i++ ) {
JCheckBox cb = listModel.elementAt(i);
if (cb.getName().equals(cr.getReportId())) {
*** 1365,1375 ****
/**
* @param lst JList of checkboxes
* @param p parent Panel
* @param cardLayout The CardLayout for options
*/
! SelectListener(JList lst, JPanel p, CardLayout cardLayout ) {
list = lst;
listModel = list.getModel();
lastSelected = listModel.getElementAt(0);
panel = p;
cards = cardLayout;
--- 1365,1375 ----
/**
* @param lst JList of checkboxes
* @param p parent Panel
* @param cardLayout The CardLayout for options
*/
! SelectListener(JList<?> lst, JPanel p, CardLayout cardLayout ) {
list = lst;
listModel = list.getModel();
lastSelected = listModel.getElementAt(0);
panel = p;
cards = cardLayout;
*** 1475,1486 ****
private void setOkBtn(JButton okBtn) {
this.okBtn = okBtn;
}
Object lastSelected;
! JList list;
! ListModel listModel;
JPanel panel;
CardLayout cards;
JButton okBtn = null; // should be disable iff all check boxes are off
double emptyCBW = new JCheckBox("").getPreferredSize().getWidth() + 2;
}
--- 1475,1486 ----
private void setOkBtn(JButton okBtn) {
this.okBtn = okBtn;
}
Object lastSelected;
! JList<?> list;
! ListModel<?> listModel;
JPanel panel;
CardLayout cards;
JButton okBtn = null; // should be disable iff all check boxes are off
double emptyCBW = new JCheckBox("").getPreferredSize().getWidth() + 2;
}
< prev index next >