public String getIMAddress() { return imAddressTextField.getText(); }
public String getIMPort() { return imPortTextField.getText(); }
public String getRegistrarAddress() { return registrarAddressTextField.getText(); }
public String getRegistrarPort() { return registrarPortTextField.getText(); }
public String getOutboundProxyAddress() { return outboundProxyAddressTextField.getText(); }
public String getOutboundProxyPort() { return outboundProxyPortTextField.getText(); }
public String getRouterPath() { return defaultRouterTextField.getText(); }
public void submitButtonActionPerformed(ActionEvent evt) { String text = ""; IMUserAgent imUA = imGUI.getInstantMessagingUserAgent(); IMRegisterProcessing imRegisterProcessing = imUA.getIMRegisterProcessing(); if (!imRegisterProcessing.isRegistered()) { String temp = outboundProxyAddressTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.outboundProxyAddress=" + temp + "\n"; temp = outboundProxyPortTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.outboundProxyPort=" + temp + "\n"; temp = registrarAddressTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.registrarAddress=" + temp + "\n"; temp = registrarPortTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.registrarPort=" + temp + "\n"; temp = imAddressTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.imAddress=" + temp + "\n"; temp = imPortTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.imPort=" + temp + "\n"; temp = imProtocolTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.imProtocol=" + temp + "\n"; temp = outputFileTextField.getText(); if (temp != null && !temp.trim().equals("")) { text += "examples.im.outputFile=" + temp + "\n"; DebugIM.setDebugFile(temp); } else DebugIM.setDebugFile(null); temp = buddiesFileTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.buddiesFile=" + temp + "\n"; temp = authenticationFileTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.authenticationFile=" + temp + "\n"; temp = defaultRouterTextField.getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.defaultRouter=" + temp + "\n"; temp = imGUI.getLocalSipURLTextField().getText(); if (temp != null && !temp.trim().equals("")) text += "examples.im.localSipURL=" + temp + "\n"; String propertiesFile = imGUI.getPropertiesFile(); if (propertiesFile == null) DebugIM.println( "DebugIM, unable to write the " + "properties, specify a properties file when you start the client"); else { IMUtilities.writeFile(propertiesFile, text); imGUI.restart(); } this.setVisible(false); } else { new AlertInstantMessaging( "You must sign out from the registrar before changing something!!!", JOptionPane.ERROR_MESSAGE); } }
public void unblockProperties() { outboundProxyAddressTextField.setEditable(true); outboundProxyAddressTextField.setBackground(Color.white); outboundProxyPortTextField.setEditable(true); outboundProxyPortTextField.setBackground(Color.white); registrarAddressTextField.setEditable(true); registrarAddressTextField.setBackground(Color.white); registrarPortTextField.setEditable(true); registrarPortTextField.setBackground(Color.white); imAddressTextField.setEditable(true); imAddressTextField.setBackground(Color.white); imPortTextField.setEditable(true); imPortTextField.setBackground(Color.white); imProtocolTextField.setEditable(true); imProtocolTextField.setBackground(Color.white); outputFileTextField.setEditable(true); outputFileTextField.setBackground(Color.white); buddiesFileTextField.setEditable(true); buddiesFileTextField.setBackground(Color.white); authenticationFileTextField.setEditable(true); authenticationFileTextField.setBackground(Color.white); defaultRouterTextField.setEditable(true); defaultRouterTextField.setBackground(Color.white); }
public String getOutputFile() { return outputFileTextField.getText(); }
public String getIMProtocol() { return imProtocolTextField.getText(); }