< prev index next >

src/com/sun/javatest/exec/MultiSelectPanel.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


  74     void setParameters(Parameters p) {
  75         this.params = p;
  76 
  77         TestResultTable newTrt = null;
  78         if (p.getWorkDirectory() != null) {
  79             newTrt = p.getWorkDirectory().getTestResultTable();
  80         }
  81     }
  82 
  83     void dispose() {
  84         // stop counter thread
  85         summPanel.dispose();
  86     }
  87      */
  88 
  89     protected void initGUI() {
  90         setName("multiselect");
  91         setLayout(new GridBagLayout());
  92         setMinimumSize(new Dimension(150, 100));
  93 
  94         listModel = new DefaultListModel();
  95         nodeList = uif.createList("ms.nlist", listModel);
  96         GridBagConstraints gbc = new GridBagConstraints();
  97         gbc.weightx= 1.0;
  98         gbc.gridy = 0;
  99         gbc.gridx = 0;
 100         gbc.anchor = GridBagConstraints.CENTER;
 101 
 102         // add inline help
 103         gbc.fill = GridBagConstraints.HORIZONTAL;
 104         add(uif.createMessageArea("ms.help"), gbc);
 105 
 106         gbc.weighty = 9.0;
 107         gbc.gridy = 1;
 108         gbc.fill = GridBagConstraints.BOTH;
 109         nodeList.setBorder(BorderFactory.createCompoundBorder(
 110             BorderFactory.createEmptyBorder(10, 5, 5, 5),
 111             uif.createTitledBorder("ms.nlist"))
 112         );
 113 
 114         nodeList.setCellRenderer(RenderingUtilities.createTRTNodeRenderer());


 150     /**
 151      * Call when the target node or tree data have changed.  This is called
 152      * internally to force updates when filters have changed.
 153      */
 154     protected void updateGUI() {
 155         listModel.removeAllElements();
 156 
 157         if (nodes == null)
 158             return;
 159 
 160         for (int i = 0; i < nodes.length; i++)
 161             listModel.addElement(nodes[i]);
 162     }
 163 
 164     protected void finalize() throws Throwable {
 165         super.finalize();
 166     }
 167 
 168     private TestTreeModel ttm;
 169     private TreePanelModel tpm;
 170     private JList nodeList;
 171     private DefaultListModel listModel;
 172     private Object[] nodes;
 173 
 174     private UIFactory uif;
 175 
 176     private volatile boolean needToUpdateGUIWhenShown;
 177 
 178     private static boolean debug = Debug.getBoolean(MultiSelectPanel.class);
 179 }


  74     void setParameters(Parameters p) {
  75         this.params = p;
  76 
  77         TestResultTable newTrt = null;
  78         if (p.getWorkDirectory() != null) {
  79             newTrt = p.getWorkDirectory().getTestResultTable();
  80         }
  81     }
  82 
  83     void dispose() {
  84         // stop counter thread
  85         summPanel.dispose();
  86     }
  87      */
  88 
  89     protected void initGUI() {
  90         setName("multiselect");
  91         setLayout(new GridBagLayout());
  92         setMinimumSize(new Dimension(150, 100));
  93 
  94         listModel = new DefaultListModel<>();
  95         nodeList = uif.createList("ms.nlist", listModel);
  96         GridBagConstraints gbc = new GridBagConstraints();
  97         gbc.weightx= 1.0;
  98         gbc.gridy = 0;
  99         gbc.gridx = 0;
 100         gbc.anchor = GridBagConstraints.CENTER;
 101 
 102         // add inline help
 103         gbc.fill = GridBagConstraints.HORIZONTAL;
 104         add(uif.createMessageArea("ms.help"), gbc);
 105 
 106         gbc.weighty = 9.0;
 107         gbc.gridy = 1;
 108         gbc.fill = GridBagConstraints.BOTH;
 109         nodeList.setBorder(BorderFactory.createCompoundBorder(
 110             BorderFactory.createEmptyBorder(10, 5, 5, 5),
 111             uif.createTitledBorder("ms.nlist"))
 112         );
 113 
 114         nodeList.setCellRenderer(RenderingUtilities.createTRTNodeRenderer());


 150     /**
 151      * Call when the target node or tree data have changed.  This is called
 152      * internally to force updates when filters have changed.
 153      */
 154     protected void updateGUI() {
 155         listModel.removeAllElements();
 156 
 157         if (nodes == null)
 158             return;
 159 
 160         for (int i = 0; i < nodes.length; i++)
 161             listModel.addElement(nodes[i]);
 162     }
 163 
 164     protected void finalize() throws Throwable {
 165         super.finalize();
 166     }
 167 
 168     private TestTreeModel ttm;
 169     private TreePanelModel tpm;
 170     private JList<?> nodeList;
 171     private DefaultListModel<Object> listModel;
 172     private Object[] nodes;
 173 
 174     private UIFactory uif;
 175 
 176     private volatile boolean needToUpdateGUIWhenShown;
 177 
 178     private static boolean debug = Debug.getBoolean(MultiSelectPanel.class);
 179 }
< prev index next >