Exemplo n.º 1
0
  /** Creates new form SIPHeadersParametersFrame */
  public StackPanel(ConfigurationFrame configurationFrame, ProxyLauncher proxyLauncher) {
    super();
    this.parent = configurationFrame;
    this.proxyLauncher = proxyLauncher;

    listeningPointsList = new ListeningPointsList(proxyLauncher);

    initComponents();

    // Init the components input:
    try {
      Configuration configuration = proxyLauncher.getConfiguration();
      if (configuration == null) return;
      if (configuration.stackName != null) proxyStackNameTextField.setText(configuration.stackName);
      if (configuration.stackIPAddress != null)
        proxyIPAddressTextField.setText(configuration.stackIPAddress);

      if (configuration.outboundProxy != null)
        outboundProxyTextField.setText(configuration.outboundProxy);
      if (configuration.routerPath != null) routerClassTextField.setText(configuration.routerPath);
      if (configuration == null) listeningPointsList.displayList(new Hashtable());
      else listeningPointsList.displayList(configuration.listeningPoints);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Exemplo n.º 2
0
 public void addLPButtonActionPerformed(ActionEvent evt) {
   Point point = parent.getLocation();
   ListeningPointDialog lpd = new ListeningPointDialog(parent, point);
   if (lpd.transportTextField.getText() == null
       || lpd.transportTextField.getText().trim().equals("")) return;
   else {
     if (lpd.portTextField.getText() == null || lpd.portTextField.getText().trim().equals(""))
       return;
   }
   listeningPointsList.addListeningPoint(
       lpd.portTextField.getText(), lpd.transportTextField.getText());
 }
Exemplo n.º 3
0
 public void removeLPButtonActionPerformed(ActionEvent evt) {
   listeningPointsList.removeSelectedListeningPoint();
 }