📄 linkprotocolbluetoothpanframe.java
字号:
jLabel1.setBounds(66, 38, 420, 18); /*StringBuffer strEnabled = null, strMediaPresented = null,strStatus =null; if(!ProtocolBluetoothPanInstance.Enabled.IsNull()) { if(ProtocolBluetoothPanInstance.Enabled.GetValue() == true) strEnabled = new StringBuffer("Enabled"); else strEnabled = new StringBuffer("Disabled"); } else strEnabled = new StringBuffer("NULL"); if(!ProtocolBluetoothPanInstance.MediaPresent.IsNull()) { if(ProtocolBluetoothPanInstance.MediaPresent.GetValue() == true) strMediaPresented = new StringBuffer("Media Presented"); else strMediaPresented = new StringBuffer("Media not Presented"); } else strMediaPresented = new StringBuffer("NULL"); if(!ProtocolBluetoothPanInstance.State.IsNull()) { //strStatus = new StringBuffer(new Integer(ProtocolBluetoothPanInstance.Status.GetValue()).toString()); //strStatus = LinkProtocolTableModel.getProtocolStatus(ProtocolBluetoothPanInstance.Status.GetValue()); strStatus = new StringBuffer(ProtocolBluetoothPanInstance.State.GetValue().toString()); } else strStatus = new StringBuffer("NULL"); */ jLabel1.setText(ProtocolBluetoothPanInstance.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); if(!ProtocolBluetoothPanInstance.MacAddress.IsNull()) { String macAddr = LinkProtocolTableModel.getHexString(ProtocolBluetoothPanInstance.MacAddress.GetValue(0)) + "-" + LinkProtocolTableModel.getHexString(ProtocolBluetoothPanInstance.MacAddress.GetValue(1)) + "-" + LinkProtocolTableModel.getHexString(ProtocolBluetoothPanInstance.MacAddress.GetValue(2)) + "-" + LinkProtocolTableModel.getHexString(ProtocolBluetoothPanInstance.MacAddress.GetValue(3)) +"-" + LinkProtocolTableModel.getHexString(ProtocolBluetoothPanInstance.MacAddress.GetValue(4)) +"-" + LinkProtocolTableModel.getHexString(ProtocolBluetoothPanInstance.MacAddress.GetValue(5)); jLabel4.setText(macAddr); } else { jLabel4.setText("(null)"); } } 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(!ProtocolBluetoothPanInstance.IpAddress.IsNull()) jLabel6.setText(ProtocolBluetoothPanInstance.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(ProtocolBluetoothPanInstance.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(ProtocolBluetoothPanInstance.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(ProtocolBluetoothPanInstance.DataRateTx.GetValue())); } return jLabel12; }}class ProtocolBluetoothPanTableModel extends LinkProtocolTableModel{ public ProtocolBluetoothPanTableModel(ProtocolBluetoothPanInstance myInstance) throws IntelMobileException { super(myInstance); Init(myInstance); } private void Init(ProtocolBluetoothPanInstance 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; if ( !myInstance.BluetoothAddress.IsNull() ) { tempdata[i][0] = "BluetoothAddress"; for (int j = 0; j < myInstance.BluetoothAddress.GetSize(); j++) { tempdata[i][1] = getHexString(myInstance.BluetoothAddress.GetValue(j)); tempdata[i++][2] = ""; } } if(!myInstance.ServiceClasses.IsNull()) { tempdata[i][0] = "ServiceClasses"; String macadress = ""; for(int j=0; j<myInstance.ServiceClasses.GetSize(); j++) { macadress += myInstance.ServiceClasses.GetValue(j); if(j != myInstance.ServiceClasses.GetSize()-1) { macadress += "&&"; } } tempdata[i][1] = macadress; tempdata[i++][2] = ""; } if(!myInstance.LocalName.IsNull()) { tempdata[i][0] = "LocalName"; tempdata[i][1] = myInstance.LocalName.IsNull() ? "" : String.valueOf(myInstance.LocalName.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.MajorDeviceClass.IsNull()) { tempdata[i][0] = "MajorDeviceClass"; tempdata[i][1] = myInstance.MajorDeviceClass.IsNull() ? "" : String.valueOf(myInstance.MajorDeviceClass.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.AuthenticationRequired.IsNull()) { tempdata[i][0] = "AuthenticationRequired"; tempdata[i][1] = myInstance.AuthenticationRequired.IsNull() ? "" : String.valueOf(myInstance.AuthenticationRequired.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.Connectable.IsNull()) { tempdata[i][0] = "Connectable"; tempdata[i][1] = myInstance.Connectable.IsNull() ? "" : String.valueOf(myInstance.Connectable.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.ConnectionScanInterval.IsNull()) { tempdata[i][0] = "ConnectionScanInterval"; tempdata[i][1] = myInstance.ConnectionScanInterval.IsNull() ? "" : String.valueOf(myInstance.ConnectionScanInterval.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.ConnectionScanWindow.IsNull()) { tempdata[i][0] = "ConnectionScanWindow"; tempdata[i][1] = myInstance.ConnectionScanWindow.IsNull() ? "" : String.valueOf(myInstance.ConnectionScanWindow.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.ConnectionTimeOut.IsNull()) { tempdata[i][0] = "ConnectionTimeOut"; tempdata[i][1] = myInstance.ConnectionTimeOut.IsNull() ? "" : String.valueOf(myInstance.ConnectionTimeOut.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.ConnectionAcceptTimeOut.IsNull()) { tempdata[i][0] = "ConnectionAcceptTimeOut"; tempdata[i][1] = myInstance.ConnectionAcceptTimeOut.IsNull() ? "" : String.valueOf(myInstance.ConnectionAcceptTimeOut.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.Discoverable.IsNull()) { tempdata[i][0] = "Discoverable"; tempdata[i][1] = myInstance.Discoverable.IsNull() ? "" : String.valueOf(myInstance.Discoverable.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.DiscoveryScanInterval.IsNull()) { tempdata[i][0] = "DiscoveryScanInterval"; tempdata[i][1] = myInstance.DiscoveryScanInterval.IsNull() ? "" : String.valueOf(myInstance.DiscoveryScanInterval.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.DiscoveryScanWindow.IsNull()) { tempdata[i][0] = "DiscoveryScanWindow"; tempdata[i][1] = myInstance.DiscoveryScanWindow.IsNull() ? "" : String.valueOf(myInstance.DiscoveryScanWindow.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.EncryptionRequired.IsNull()) { tempdata[i][0] = "EncryptionRequired"; tempdata[i][1] = myInstance.EncryptionRequired.IsNull() ? "" : String.valueOf(myInstance.EncryptionRequired.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.HciVersion.IsNull()) { tempdata[i][0] = "HciVersion"; tempdata[i][1] = myInstance.HciVersion.IsNull() ? "" : String.valueOf(myInstance.HciVersion.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.HciRevision.IsNull()) { tempdata[i][0] = "HciRevision"; tempdata[i][1] = myInstance.HciRevision.IsNull() ? "" : String.valueOf(myInstance.HciRevision.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.LmpVersion.IsNull()) { tempdata[i][0] = "LmpVersion"; tempdata[i][1] = myInstance.LmpVersion.IsNull() ? "" : String.valueOf(myInstance.LmpVersion.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.LmpSubVersion.IsNull()) { tempdata[i][0] = "LmpSubVersion"; tempdata[i][1] = myInstance.LmpSubVersion.IsNull() ? "" : String.valueOf(myInstance.LmpSubVersion.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.ManufacturerId.IsNull()) { tempdata[i][0] = "ManufacturerId"; tempdata[i][1] = myInstance.ManufacturerId.IsNull() ? "" : String.valueOf(myInstance.ManufacturerId.GetValue()); tempdata[i++][2] = ""; } if(!myInstance.IacCount.IsNull()) { tempdata[i][0] = "IacCount"; tempdata[i][1] = myInstance.IacCount.IsNull() ? "" : String.valueOf(myInstance.IacCount.GetValue()); tempdata[i++][2] = ""; } data = tempdata; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -