⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdrscreen.java

📁 这是一个用java和xml编写的流媒体服务器管理软件
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * ==================================================================== * The Vovida Software License, Version 1.0 *  * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: *  * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. *  * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. *  * 3. The names "VOCAL", "Vovida Open Communication Application Library", * and "Vovida Open Communication Application Library (VOCAL)" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact vocal@vovida.org. *  * 4. Products derived from this software may not be called "VOCAL", nor * may "VOCAL" appear in their name, without prior written * permission of Vovida Networks, Inc. *  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. *  * ==================================================================== *  * This software consists of voluntary contributions made by Vovida * Networks, Inc. and many individuals on behalf of Vovida Networks, * Inc.  For more information on Vovida Networks, Inc., please see * <http://www.vovida.org/>. *  *//** * Title:        <p> * Description:  <p> * Copyright:    Copyright (c) <p> * Company:      <p> * @author * @version 1.0 */package vocal.ui;import java.awt.*;import javax.swing.*;import javax.swing.border.*;import java.awt.event.ActionEvent;import vocal.data.CdrData;import vocal.data.InvalidRequestException;import vocal.data.ConfigTree;/** * $RCSfile$ *  * @author $Author$, $Date$ * @version $Revision$ */public class CdrScreen extends FormPanelScreen{  JScrollPane jScrollPane1 = new JScrollPane();  BorderLayout borderLayout2 = new BorderLayout();  CdrData dataManager;  ConfigureServers mainScreen;  ConfigTree configTree1;  Border border1;  TitledBorder titledBorder1;  Border border2;  Border border3;  TitledBorder titledBorder2;  Border border4;  JPanel jPanel3 = new JPanel();  BorderLayout borderLayout1 = new BorderLayout();  JPanel titlePanel = new JPanel();  FlowLayout flowLayout4 = new FlowLayout();  JPanel boxPanel = new JPanel();  LabelFieldPanel billingFieldPanel3 = new LabelFieldPanel();  JPanel billingPanel = new JPanel();  JPanel radiusPanel = new JPanel();  JLabel dirPathLabel = new JLabel();  JLabel lockFileLabel = new JLabel();  JLabel billingLabel = new JLabel();  FlowLayout flowLayout3 = new FlowLayout();  FlowLayout flowLayout2 = new FlowLayout();  JLabel frequencyLabel = new JLabel();  JLabel retriesLabel = new JLabel();  Box box1;  JLabel secretKeyLabel = new JLabel();  JLabel radiusNameLabel = new JLabel();  JLabel rolloverSizeLabel = new JLabel();  JLabel unsentExtLabel = new JLabel();  InternalClipboardField dirPathField = new InternalClipboardField();  InternalClipboardField lockFileField = new InternalClipboardField();  WholeNumberField rollOvPrdField = new WholeNumberField("Rollover Period");  JCheckBox billForRingtimeCheckBox = new JCheckBox();  JLabel rolloverPrdLabel = new JLabel();  WholeNumberField frequencyField = new WholeNumberField("Frequency");  WholeNumberField retriesField = new WholeNumberField("Retries");  InternalClipboardField secretKeyField = new InternalClipboardField();  HostNameField radiusHostField = new HostNameField("Radius Host Name");  LabelFieldPanel radiusFieldPanel2 = new LabelFieldPanel();  WholeNumberField rollOvSizeField = new WholeNumberField("Rollover Size");  InternalClipboardField unsentExtField = new InternalClipboardField();  InternalClipboardField billingFileField = new InternalClipboardField();  Component verticalStrut1;  private JPanel cdrPanel = new JPanel();  private WholeNumberField cdrPortField = new WholeNumberField("Port");  private JLabel cdrNameLabel = new JLabel();  private HostNameField cdrHostField = new HostNameField("Host Name");  private JLabel cdrPortLabel = new JLabel();  private LabelFieldPanel cdrFieldPanel1 = new LabelFieldPanel();  private FlowLayout flowLayout1 = new FlowLayout();  private JLabel groupDescriptionLabel = new JLabel();  private JLabel groupLabel = new JLabel();  private JLabel titleLabel = new JLabel();  /**   *    * @param screen   */  public CdrScreen(ConfigureServers screen)  {    mainScreen = screen;    try    {      jbInit();    }    catch (Exception e)    {      e.printStackTrace();    }  }  /**   *    * @throws Exception   */  private void jbInit() throws Exception  {    flowLayout4.setVgap(20);    border3 = new EtchedBorder(EtchedBorder.RAISED, Color.white,             new Color(142, 142, 142));    titledBorder2 = new TitledBorder(border3, "CDR");    border4 = BorderFactory.createCompoundBorder(titledBorder2,             BorderFactory.createEmptyBorder(5, 20, 5, 20));    box1 = Box.createVerticalBox();    verticalStrut1 = Box.createVerticalStrut(17);    this.setLayout(borderLayout2);    jPanel3.setLayout(borderLayout1);    titlePanel.setLayout(flowLayout4);    billingFieldPanel3.setBorder(BorderFactory.createCompoundBorder(new TitledBorder(BorderFactory.createLineBorder(Color.gray, 1), "Billing"),             BorderFactory.createEmptyBorder(5, 20, 5, 20)));    billingFieldPanel3.setPreferredSize(new Dimension(350, 270));    billingFieldPanel3.setVerticalGap(10);    billingPanel.setLayout(flowLayout2);    radiusPanel.setMaximumSize(new Dimension(500, 135));    radiusPanel.setMinimumSize(new Dimension(350, 135));    radiusPanel.setPreferredSize(new Dimension(350, 135));    radiusPanel.setLayout(flowLayout3);    dirPathLabel.setForeground(Color.black);    dirPathLabel.setText("Directory Path:");    lockFileLabel.setForeground(Color.black);    lockFileLabel.setText("Lock File:");    billingLabel.setForeground(Color.black);    billingLabel.setText("Billing File:");    flowLayout3.setVgap(10);    flowLayout2.setVgap(10);    frequencyLabel.setForeground(Color.black);    frequencyLabel.setText("Frequency (s):");    retriesLabel.setForeground(Color.black);    retriesLabel.setText("Retries:");    secretKeyLabel.setForeground(Color.black);    secretKeyLabel.setText("Secret Key:");    radiusNameLabel.setForeground(Color.black);    radiusNameLabel.setText("Host Name:");    rolloverSizeLabel.setForeground(Color.black);    rolloverSizeLabel.setText("Rollover Size (MB):");    unsentExtLabel.setForeground(Color.black);    unsentExtLabel.setText("Unsent Extension:");    billForRingtimeCheckBox.setHorizontalTextPosition(SwingConstants.LEADING);    billForRingtimeCheckBox.setToolTipText("select to make ringtime duration billable");    billForRingtimeCheckBox.setText("Bill For Ringtime");    rolloverPrdLabel.setForeground(Color.black);    rolloverPrdLabel.setText("Rollover Period (s):");    radiusFieldPanel2.setBorder(BorderFactory.createCompoundBorder(new TitledBorder(BorderFactory.createLineBorder(Color.gray, 1), "Radius Server"),             BorderFactory.createEmptyBorder(5, 20, 5, 20)));    radiusFieldPanel2.setMaximumSize(new Dimension(500, 125));    radiusFieldPanel2.setMinimumSize(new Dimension(350, 125));    radiusFieldPanel2.setPreferredSize(new Dimension(350, 125));    radiusFieldPanel2.setHorizontalGap(60);    radiusFieldPanel2.setVerticalGap(10);    cdrNameLabel.setForeground(Color.black);    cdrNameLabel.setText("Host Name:");    cdrHostField.setMaximumSize(new Dimension(50, 17));    cdrHostField.setPreferredSize(new Dimension(50, 17));    cdrHostField.setToolTipText("IP address of the CDR server");    cdrPortLabel.setForeground(Color.black);    cdrPortLabel.setText("Port:");    cdrFieldPanel1.setMaximumSize(new Dimension(500, 90));    cdrFieldPanel1.setMinimumSize(new Dimension(350, 90));    cdrFieldPanel1.setPreferredSize(new Dimension(340, 90));    cdrFieldPanel1.setHorizontalGap(60);    cdrFieldPanel1.setVerticalGap(10);    cdrPanel.setLayout(flowLayout1);    groupDescriptionLabel.setForeground(Color.black);    groupDescriptionLabel.setText("Group:");    groupLabel.setForeground(Color.black);    groupLabel.setText("Unknown");    cdrPanel.setPreferredSize(new Dimension(350, 90));    titleLabel.setForeground(Color.black);    titleLabel.setText("CDR Server");    cdrPortField.setToolTipText("port number of the CDR server");    radiusHostField.setToolTipText("IP address of the Radius server");    retriesField.setToolTipText("number of times the Radius server will attempt to connect tothe CDR "             + "server");    secretKeyField.setToolTipText("text string used by MD5 Digest security");    frequencyField.setToolTipText("how often the CDR server sends records to the billing system");    dirPathField.setToolTipText("location of stored billing files on CDR server");    lockFileField.setToolTipText("file used for synchronization between CDR servers");    billingFileField.setToolTipText("call detail records are written to this file");    unsentExtField.setToolTipText("extension appended to billing files that are to be sent to the billing "             + "system");    rollOvSizeField.setToolTipText("size at which a billing file is rolled over");    rollOvPrdField.setToolTipText("maximum age of a billing file before it is rolled over");    this.add(jScrollPane1, BorderLayout.CENTER);    jScrollPane1.getViewport().add(jPanel3, null);    jPanel3.add(titlePanel, BorderLayout.NORTH);    titlePanel.add(titleLabel, null);    jPanel3.add(boxPanel, BorderLayout.CENTER);    boxPanel.add(box1, null);    box1.add(cdrPanel, null);    cdrPanel.add(cdrFieldPanel1, null);    cdrFieldPanel1.add(groupDescriptionLabel, null);    cdrFieldPanel1.add(groupLabel, null);    cdrFieldPanel1.add(cdrNameLabel, null);    cdrFieldPanel1.add(cdrHostField, null);    cdrFieldPanel1.add(cdrPortLabel, null);    cdrFieldPanel1.add(cdrPortField, null);    box1.add(radiusPanel, null);    radiusPanel.add(radiusFieldPanel2, null);    radiusFieldPanel2.add(radiusNameLabel, null);    radiusFieldPanel2.add(radiusHostField, null);    radiusFieldPanel2.add(retriesLabel, null);    radiusFieldPanel2.add(retriesField, null);    radiusFieldPanel2.add(secretKeyLabel, null);    radiusFieldPanel2.add(secretKeyField, null);    box1.add(billingPanel, null);    billingPanel.add(billingFieldPanel3, null);    billingFieldPanel3.add(frequencyLabel, null);    billingFieldPanel3.add(frequencyField, null);    billingFieldPanel3.add(dirPathLabel, null);    billingFieldPanel3.add(dirPathField, null);    billingFieldPanel3.add(lockFileLabel, null);    billingFieldPanel3.add(lockFileField, null);    billingFieldPanel3.add(billingLabel, null);    billingFieldPanel3.add(billingFileField, null);    billingFieldPanel3.add(unsentExtLabel, null);    billingFieldPanel3.add(unsentExtField, null);    billingFieldPanel3.add(rolloverSizeLabel, null);    billingFieldPanel3.add(rollOvSizeField, null);    billingFieldPanel3.add(rolloverPrdLabel, null);    billingFieldPanel3.add(rollOvPrdField, null);    billingFieldPanel3.add(billForRingtimeCheckBox, null);    billingFieldPanel3.add(verticalStrut1, null);    configTree1 = mainScreen.getConfigTree();  }  // CDR server Functions  /**   *    */  public String getCdrHostField()  {    return cdrHostField.getText();  }  /**   *    */  public String getCdrPortField()  {    return cdrPortField.getText();  }  /**   *    * @param str   */  public void setCdrHostField(String str)  {    cdrHostField.setText(str);  }  /**   *    * @param str   */  public void setCdrPortField(String str)  {    cdrPortField.setText(str);  }  // Radius Server  /**   *    */  public String getRadiusHostField()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -