return currentViewSize;
return -2;
  static int displayViewSizeDialog(int currentViewSize) {    JPanel bufferEventsPanel = new JPanel();    JRadioButton allButton = new JRadioButton("All");    JRadioButton sizeButton = new JRadioButton("Buffer Size");    JTextField sizeTF = new JTextField(8);    Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.CSMARTConsole");    if (currentViewSize == -1) {      allButton.setSelected(true);      sizeButton.setSelected(false);      sizeTF.setText(String.valueOf(DEFAULT_VIEW_SIZE));    } else {      allButton.setSelected(false);      sizeButton.setSelected(true);      sizeTF.setText(String.valueOf(currentViewSize));    }    ButtonGroup bufferButtonGroup = new ButtonGroup();    bufferButtonGroup.add(allButton);    bufferButtonGroup.add(sizeButton);    bufferEventsPanel.add(allButton);    bufferEventsPanel.add(sizeButton);    bufferEventsPanel.add(sizeTF);    int result = JOptionPane.showConfirmDialog(null,                                    bufferEventsPanel,                                    "Node View",                                    JOptionPane.OK_CANCEL_OPTION,                                    JOptionPane.QUESTION_MESSAGE,                                    null);    if (result == JOptionPane.CANCEL_OPTION)      return currentViewSize; // no change    int newViewSize = 0;    if (allButton.isSelected()) {      newViewSize = -1;    } else {      try {        newViewSize = Integer.parseInt(sizeTF.getText());      } catch (NumberFormatException e) {        if(log.isErrorEnabled()) {          log.error("Exception setting view size", e);        }        return currentViewSize;      }    }    return newViewSize;  }