< prev index next >

src/com/sun/interview/wizard/PropertiesQuestionRenderer.java

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


  74             showEmptyQuestion(panel);
  75             return panel;
  76         }
  77 
  78         // add table(s)
  79         addGroup(null, panel, listener);
  80 
  81         // note that empty groups are not returned by the next call
  82         String[] groups = question.getGroups();
  83         if (groups != null)
  84             for (int i = 0; i < groups.length; i++) {
  85                 addGroup(groups[i], panel, listener);
  86             }   // for
  87 
  88         if (panel.getComponentCount() == 0) {
  89             showEmptyQuestion(panel);
  90         }
  91 
  92         valueSaver = new Runnable() {
  93                 public void run() {
  94                     Set keys = tables.keySet();
  95                     Iterator iter = keys.iterator();
  96                     while(iter.hasNext()) {
  97                         JTable table = tables.get(iter.next());
  98                         CellEditor editor = table.getCellEditor();
  99                         if(editor != null) {
 100                             editor.stopCellEditing();
 101                         }
 102                     }
 103                 }
 104             };
 105 
 106         panel.putClientProperty(VALUE_SAVER, valueSaver);
 107 
 108 
 109         // This inserted to handle programmatically fired events
 110         // when user click 'X' button in ConfigEditor
 111         panel.addAncestorListener(new AncestorListener() {
 112             public void ancestorAdded(AncestorEvent e) {
 113 
 114             }
 115             public void ancestorMoved(AncestorEvent e) {




  74             showEmptyQuestion(panel);
  75             return panel;
  76         }
  77 
  78         // add table(s)
  79         addGroup(null, panel, listener);
  80 
  81         // note that empty groups are not returned by the next call
  82         String[] groups = question.getGroups();
  83         if (groups != null)
  84             for (int i = 0; i < groups.length; i++) {
  85                 addGroup(groups[i], panel, listener);
  86             }   // for
  87 
  88         if (panel.getComponentCount() == 0) {
  89             showEmptyQuestion(panel);
  90         }
  91 
  92         valueSaver = new Runnable() {
  93                 public void run() {
  94                     Set<String> keys = tables.keySet();
  95                     Iterator<String> iter = keys.iterator();
  96                     while(iter.hasNext()) {
  97                         JTable table = tables.get(iter.next());
  98                         CellEditor editor = table.getCellEditor();
  99                         if(editor != null) {
 100                             editor.stopCellEditing();
 101                         }
 102                     }
 103                 }
 104             };
 105 
 106         panel.putClientProperty(VALUE_SAVER, valueSaver);
 107 
 108 
 109         // This inserted to handle programmatically fired events
 110         // when user click 'X' button in ConfigEditor
 111         panel.addAncestorListener(new AncestorListener() {
 112             public void ancestorAdded(AncestorEvent e) {
 113 
 114             }
 115             public void ancestorMoved(AncestorEvent e) {


< prev index next >