示例#1
0
 public static Container getMainPanel(NodeDialogPane dialog) {
   Container panel =
       (Container) ((JTabbedPane) (dialog.getPanel().getComponent(1))).getComponentAt(0);
   if (panel instanceof JScrollPane)
     panel = (Container) ((JScrollPane) panel).getViewport().getView();
   return panel;
 }
  /**
   * Creates new dialog.
   *
   * @param hasLoginPane true, if a login pane is visible, otherwise false
   */
  FileTransferClientDialogPane(final boolean hasLoginPane) {
    super();

    JPanel allPanel = new JPanel(new BorderLayout());

    m_hasLoginPane = hasLoginPane;
    if (hasLoginPane) {
      allPanel.add(m_loginPane, BorderLayout.NORTH);
    }

    // init variable list
    m_listModelVars = new DefaultListModel();
    m_listVars = new JList(m_listModelVars);

    super.addTab("Settings", allPanel);
  }