📄 linkprotocolwwanframe.java
字号:
public void run() { try { ProtocolGprsClass myProtocolGprsClass = new ProtocolGprsClass(); ProtocolGprsInstance myProtocolGprsInstance = (ProtocolGprsInstance)(myProtocolGprsClass.GetInstance(protocolWwanInstance.GetKey())); ProtocolGprsFrame myProtocolGprsFrame = new ProtocolGprsFrame(myProtocolGprsInstance); myProtocolGprsFrame.setLocationRelativeTo(null); myProtocolGprsFrame.show(); } catch (IntelMobileException ex) { ex.printStackTrace(); } jButton2.setEnabled(true); } }.start(); } }); } return jButton2; } /** * This method initializes jLabel1 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel1() throws IntelMobileException { if(jLabel1 == null) { jLabel1 = new javax.swing.JLabel(); jLabel1.setBounds(66, 38, 420, 18); /*StringBuffer strEnabled = null, strMediaPresented = null,strStatus =null; if(!protocolWwanInstance.Enabled.IsNull()) { if(protocolWwanInstance.Enabled.GetValue() == true) strEnabled = new StringBuffer("Enabled"); else strEnabled = new StringBuffer("Disabled"); } else strEnabled = new StringBuffer("NULL"); if(!protocolWwanInstance.MediaPresent.IsNull()) { if(protocolWwanInstance.MediaPresent.GetValue() == true) strMediaPresented = new StringBuffer("Media Presented"); else strMediaPresented = new StringBuffer("Media not Presented"); } else strMediaPresented = new StringBuffer("NULL"); if(!protocolWwanInstance.State.IsNull()) { //strStatus = new StringBuffer(new Integer(protocolWwanInstance.Status.GetValue()).toString()); //strStatus = LinkProtocolTableModel.getProtocolStatus(protocolWwanInstance.Status.GetValue()); strStatus = new StringBuffer(protocolWwanInstance.State.GetValue().toString()); } else strStatus = new StringBuffer("NULL"); */ jLabel1.setText(protocolWwanInstance.State.GetValue().toString()); } return jLabel1; } /** * This method initializes jLabel2 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel2() { if(jLabel2 == null) { jLabel2 = new javax.swing.JLabel(); jLabel2.setBounds(14, 37, 45, 18); jLabel2.setText("State"); } return jLabel2; } /** * This method initializes jLabel3 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel3() { if(jLabel3 == null) { jLabel3 = new javax.swing.JLabel(); jLabel3.setBounds(31, 26, 96, 18); jLabel3.setText("Mac Address:"); } return jLabel3; } /** * This method initializes jLabel4 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel4() throws IntelMobileException { if(jLabel4 == null) { jLabel4 = new javax.swing.JLabel(); jLabel4.setBounds(151, 28, 309, 18); String macAddr = LinkProtocolTableModel.getHexString(protocolWwanInstance.MacAddress.GetValue(0)) + "-" + LinkProtocolTableModel.getHexString(protocolWwanInstance.MacAddress.GetValue(1)) + "-" + LinkProtocolTableModel.getHexString(protocolWwanInstance.MacAddress.GetValue(2)) + "-" + LinkProtocolTableModel.getHexString(protocolWwanInstance.MacAddress.GetValue(3)) +"-" + LinkProtocolTableModel.getHexString(protocolWwanInstance.MacAddress.GetValue(4)) +"-" + LinkProtocolTableModel.getHexString(protocolWwanInstance.MacAddress.GetValue(5)); jLabel4.setText(macAddr); } return jLabel4; } /** * This method initializes jLabel5 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel5() { if(jLabel5 == null) { jLabel5 = new javax.swing.JLabel(); jLabel5.setBounds(33, 59, 96, 18); jLabel5.setText("IP Address:"); } return jLabel5; } /** * This method initializes jLabel6 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel6() throws IntelMobileException { if(jLabel6 == null) { jLabel6 = new javax.swing.JLabel(); jLabel6.setBounds(151, 59, 311, 18); if(!protocolWwanInstance.IpAddress.IsNull()) jLabel6.setText(protocolWwanInstance.IpAddress.GetValue()); else jLabel6.setText("(null)"); } return jLabel6; } /** * This method initializes jLabel7 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel7() { if(jLabel7 == null) { jLabel7 = new javax.swing.JLabel(); jLabel7.setBounds(33, 94, 165, 18); jLabel7.setText("Max Link Speed(bps):"); } return jLabel7; } /** * This method initializes jLabel8 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel8() throws IntelMobileException { if(jLabel8 == null) { jLabel8 = new javax.swing.JLabel(); jLabel8.setBounds(200, 94, 200, 18); jLabel8.setText(com.intel.mobile.base.UInt64Property.toUnsignedString(protocolWwanInstance.MaxLinkSpeed.GetValue())); } return jLabel8; } /** * This method initializes jLabel9 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel9() { if(jLabel9 == null) { jLabel9 = new javax.swing.JLabel(); jLabel9.setBounds(33, 148, 210, 18); jLabel9.setText("Current Receive Data Rate(bps):"); } return jLabel9; } /** * This method initializes jLabel10 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel10() { if(jLabel10 == null) { jLabel10 = new javax.swing.JLabel(); jLabel10.setBounds(33, 179, 210, 18); jLabel10.setText("Current Transmit Data Rate(bps):"); } return jLabel10; } /** * This method initializes jLabel11 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel11() throws IntelMobileException { if(jLabel11 == null) { jLabel11 = new javax.swing.JLabel(); jLabel11.setBounds(250, 149, 200, 18); jLabel11.setText(com.intel.mobile.base.UInt64Property.toUnsignedString(protocolWwanInstance.DataRateRx.GetValue())); } return jLabel11; } /** * This method initializes jLabel12 * * @return javax.swing.JLabel */ private javax.swing.JLabel getJLabel12() throws IntelMobileException { if(jLabel12 == null) { jLabel12 = new javax.swing.JLabel(); jLabel12.setBounds(250, 179, 200, 18); jLabel12.setText(com.intel.mobile.base.UInt64Property.toUnsignedString(protocolWwanInstance.DataRateTx.GetValue())); } return jLabel12; }}class ProtocolWwanTableModel extends LinkProtocolTableModel{ public ProtocolWwanTableModel(ProtocolWwanInstance myInstance) throws IntelMobileException { super(myInstance); Init(myInstance); } private void Init(ProtocolWwanInstance myInstance) throws IntelMobileException { Object[][] tempdata = new Object[800][3]; for (int i = 0; i < this.data.length; i++) { tempdata[i][0] = data[i][0]; tempdata[i][1] = data[i][1]; tempdata[i][2] = data[i][2]; } int i = this.index; tempdata[i][0] = "EncryptionModes"; if ( !myInstance.EncryptionModes.IsNull() ) { for (int j = 0; j < myInstance.EncryptionModes.GetSize(); j++) { tempdata[i][1] = String.valueOf(myInstance.EncryptionModes.GetValue(j)); tempdata[i++][2] = ""; } } tempdata[i][0] = "EncryptionMode"; if ( !myInstance.EncryptionMode.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.EncryptionMode.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Encrypted"; if ( !myInstance.Encrypted.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Encrypted.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "DeviceLocked"; if ( !myInstance.DeviceLocked.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.DeviceLocked.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "SimLoaded"; if ( !myInstance.SimLoaded.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.SimLoaded.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "SimBlocked"; if ( !myInstance.SimBlocked.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.SimBlocked.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "SimLocked"; if ( !myInstance.SimLocked.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.SimLocked.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "SimPinInitialized"; if ( !myInstance.SimPinInitialized.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.SimPinInitialized.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "SimCountdown"; if ( !myInstance.SimCountdown.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.SimCountdown.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Rssi"; if ( !myInstance.Rssi.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Rssi.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "PowerMode"; if ( !myInstance.PowerMode.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.PowerMode.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "NamActivated"; if ( !myInstance.NamActivated.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.NamActivated.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Channel"; if ( !myInstance.Channel.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Channel.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "ChannelState"; if ( !myInstance.ChannelState.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.ChannelState.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "RoamingState"; if ( !myInstance.RoamingState.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.RoamingState.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "DataTxBytes"; if ( !myInstance.DataTxBytes.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.DataTxBytes.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "DataRxBytes"; if ( !myInstance.DataRxBytes.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.DataRxBytes.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "ServiceIndication"; if ( !myInstance.ServiceIndication.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.ServiceIndication.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "CallState"; if ( !myInstance.CallState.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.CallState.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "CallerId"; if ( !myInstance.CallerId.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.CallerId.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Band"; if ( !myInstance.Band.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Band.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "EmergencyMode"; if ( !myInstance.EmergencyMode.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.EmergencyMode.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "PhoneNumber"; if ( !myInstance.PhoneNumber.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.PhoneNumber.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "MobileDirectoryNumber"; if ( !myInstance.MobileDirectoryNumber.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.MobileDirectoryNumber.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Imsi"; if ( !myInstance.Imsi.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Imsi.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "CallCategory"; if ( !myInstance.CallCategory.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.CallCategory.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Temperature"; if ( !myInstance.Temperature.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Temperature.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "LinkQuality"; if ( !myInstance.LinkQuality.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.LinkQuality.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "SystemTime"; if ( !myInstance.SystemTime.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.SystemTime.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Esn"; if ( !myInstance.Esn.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Esn.GetValue()); } tempdata[i++][2] = ""; tempdata[i][0] = "Operator"; if ( !myInstance.Operator.IsNull() ) { tempdata[i][1] = String.valueOf(myInstance.Operator.GetValue()); } tempdata[i++][2] = ""; data = tempdata; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -