// Please do not edit code in between the comments "//<Begin_...>" and "//<End_...>
// Any changes made within the comments will be lost ,if regenerated.
// Kindly refer to tcats_edit_source_files.html file under help/source_generation directory for details
package com.versa.VXChassisDemo;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.Date;
import com.adventnet.nms.util.NmsClientUtil;
import javax.swing.table.*;
import com.adventnet.nms.topodb.TopoAPI;
//import com.adventnet.nms.topodb.*;
//import com.adventnet.nms.topodb.ManagedObject;
import java.util.Properties;
import java.util.Vector;
import java.rmi.*;
import com.versa.ems.*;
public class Adsl48LineEdit extends JFrame implements com.adventnet.apiutils.ParameterChangeListener
{
//<Begin_Variable_Declarations>
private boolean initialized = false;
private java.applet.Applet applet = null;
private boolean running=false;
javax.swing.JPanel Top = null;
com.adventnet.beans.images.ImageLabel ImageLabel1 = null;
javax.swing.JLabel JLabel11 = null;
javax.swing.JPanel JPanel1 = null;
javax.swing.JLabel JLabel2 = null;
javax.swing.JLabel JLabel3 = null;
javax.swing.JLabel JLabel4 = null;
javax.swing.JLabel JLabel5 = null;
javax.swing.JLabel JLabel1 = null;
javax.swing.JLabel JLabel6 = null;
javax.swing.JLabel JLabel7 = null;
javax.swing.JLabel JLabel8 = null;
javax.swing.JLabel JLabel9 = null;
javax.swing.JLabel JLabel10 = null;
javax.swing.JTextField JTextField1 = null;
javax.swing.JTextField JTextField6 = null;
javax.swing.JTextField JTextField2 = null;
javax.swing.JTextField JTextField3 = null;
javax.swing.JTextField JTextField4 = null;
javax.swing.JTextField JTextField5 = null;
javax.swing.JTextField JTextField7 = null;
javax.swing.JTextField JTextField8 = null;
javax.swing.JTextField JTextField9 = null;
javax.swing.JTextField JTextField10 = null;
javax.swing.JPanel JPanel2 = null;
javax.swing.JButton AddBtn = null;
javax.swing.JButton CloseBtn = null;
private com.adventnet.apiutils.ParameterObject po= null;
//<End_Variable_Declarations>
private String host = "";
private String port = "";
private String community = "";
private DefaultTableModel LineTm;
private Adsl48LineTable LineTable;
public Adsl48AlarmEdit(java.applet.Applet applet, String host, String port, String community,
DefaultTableModel LineTm, Adsl48LineTable LineTable)
{
this.applet = applet;
this.host = host;
this.port = port;
this.community = community;
this.LineTm = LineTm;
this.LineTable = LineTable;
pack();
NmsClientUtil.centerWindow(this);
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
private void close()
{
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setVisible(false);
}
public void setVisible(boolean bl)
{
//<Begin_setVisible_boolean>
if(bl)
{
init();
start();
}
else
{
stop();
}
super.setVisible(bl);
//<End_setVisible_boolean>
}
public void stop()
{
//<Begin_stop>
if(!running)
return;
running=false;
//<End_stop>
}
public void start()
{
//<Begin_start>
if(running)
return;
running=true;
//<End_start>
}
public void init()
{
//<Begin_init>
if (initialized) return;
this.setSize(getPreferredSize().width+894,getPreferredSize().height+469);
setTitle("AdslLineAdd");
Container container = getContentPane();
container.setLayout(new BorderLayout());
try
{
initVariables();
setUpGUI(container);
setUpProperties();
setUpConnections();
}
catch(Exception ex)
{
showStatus("Error in init method",ex);
}
// let us set the initialized variable to true so
// we dont initialize again even if init is called
initialized = true;
//<End_init>
}
public String getParameter(String input)
{
//<Begin_getParameter_String>
if (po != null)
{
if(po.getParameter(input) != null)
{
return (String)po.getParameter(input);
}
}
String value = null;
if ( applet != null)
{
value = applet.getParameter(input);
}
else
{
value = (String)com.adventnet.apiutils.Utility.getParameter(input);
}
if(value == null)
{
if (input.equals("MS_HOST")) value = "localhost";
if (input.equals("ManagedObjectName")) value = "y";
if (input.equals("URLPREFIX")) value = "F:/working/VxchassisDemo/VXChassisDemo/xml";
if (input.equals("CLIENT_CLASS_NAME")) value = "com.adventnet.management.transport.TcpClientTransportImpl";
if (input.equals("CLIENT_SERVER")) value = "TCP";
if (input.equals("MS_MODE")) value = "3";
if (input.equals("HOST")) value = "localhost";
if (input.equals("PORT")) value = "161";
if (input.equals("MS_PORT")) value = "9001";
}
return value;
//<End_getParameter_String>
}
public void setUpProperties()
{
//<Begin_setUpProperties>
//<UserCode_Begin_Bean_components>
//<UserCode_End_Bean_components>
try
{
ImageLabel1.setImageName("./images/versabar.jpg");
}
catch(Exception ex)
{
showStatus("Exception while setting properties for bean "+ImageLabel1,ex);
}
//<UserCode_Begin_Bean_ImageLabel1>
//<UserCode_End_Bean_ImageLabel1>
try
{
JLabel11.setHorizontalAlignment(2);
JLabel11.setFont(new Font("SansSerif",0,12));
JLabel11.setForeground(new Color(-16777216));
JLabel11.setHorizontalTextPosition(4);
JLabel11.setText(NmsClientUtil.GetString("Adsl48LineEdit"));
}
catch(Exception ex)
{
showStatus("Exception while setting properties for bean "+JLabel11,ex);
}
//<UserCode_Begin_Bean_JLabel11>
//<UserCode_End_Bean_JLabel11>
try
{
JPanel1.setBorder(new javax.swing.border.EtchedBorder(0));
}
catch(Exception ex)
{
showStatus("Exception while setting properties for bean "+JPanel1,ex);
}
//<UserCode_Begin_Bean_JPanel1>
//<UserCode_End_Bean_JPanel1>
try
{
JLabel2.setHorizontalAlignment(2);
JLabel2.setFont(new Font("SansSerif",0,12));
JLabel2.setForeground(new Color(-16777216));
JLabel2.setHorizontalTextPosition(4);
JLabel2.setText(NmsClientUtil.GetString("AtucChanConfFastMaxTxRate(kps)"));
}
catch(Exception ex)
{
showStatus("Exception while setting properties for bean "+JLabel2,ex);
}
//<UserCode_Begin_Bean_JLabel2>
//<UserCode_End_Bean_JLabel2>
try
{
JLabel3.setHorizontalAlignment(2);
JLabel3.setFont(new Font("SansSerif",0,12));
JLabel3.setForeground(new Color(-16777216));
JLabel3.setHorizontalTextPosition(4);
JLabel3.setText(NmsClientUtil.GetString("AtucChanConfInterleaveMaxTxRate(kps)"));
}
catch(Exception ex)
{
showStatus("Exception while setting properties for bean "+JLabel3,ex);
}
//<UserCode_Begin_Bean_JLabel3>
//<UserCode_End_Bean_JLabel3>
try
{
JLabel4.setHorizontalAlignment(2);