亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? otherpage.java

?? usbio Ver 2.40 source code!!! 做USB開發的值得
?? JAVA
字號:
package de.thesycon.usbiodemo.usbioapp;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class OtherPage extends PanelPage {

	public String getPageName() { return "Other"; };

	protected UsbIoApp mainFrame;


	protected JButton mGetCurrentFrameNumberButton;
	protected JButton mResetDeviceButton;
	protected JButton mCyclePortButton;
	protected JButton mGetStatusButton;
	protected JButton mSetPowerStateButton;
	protected JButton mGetPowerStateButton;

	protected JLabel mRecipientLabel;
	protected JLabel mIndexLabel;
	protected JLabel mPowerStateLabel;
	protected JComboBox mRecipientCombo;
	protected JComboBox mPowerStateCombo;
	protected JTextField mIndexTF;

	protected JPanel mGetStatusPanel;
	protected JPanel mDevicePowerStatePanel;

	protected GridBagLayout mGetStatusPanelLayout;
	protected GridBagLayout mDevicePowerStatePanelLayout;

	public OtherPage(UsbIoApp Frame) {
		mainFrame = Frame;
	}

	public Vector getControlComponentsVector() {
		Vector ret = new Vector();
		ret.addElement(mGetCurrentFrameNumberButton);
		ret.addElement(mResetDeviceButton);
		ret.addElement(mCyclePortButton);
		ret.addElement(mGetStatusButton);
		ret.addElement(mSetPowerStateButton);
		ret.addElement(mGetPowerStateButton);
		ret.addElement(mRecipientCombo);
		ret.addElement(mPowerStateCombo);
		ret.addElement(mIndexTF);
		return ret;
	}

	public void initGUIelements() {
		mGetStatusPanelLayout = new GridBagLayout();
		mDevicePowerStatePanelLayout = new GridBagLayout();

		mGetStatusPanel = new JPanel(mGetStatusPanelLayout,true);
		mDevicePowerStatePanel = new JPanel(mDevicePowerStatePanelLayout,true);

		mGetStatusPanel.setBorder(BorderFactory.createTitledBorder("Get Status"));
		mDevicePowerStatePanel.setBorder(BorderFactory.createTitledBorder("Device Power State"));

		mGetCurrentFrameNumberButton = new JButton("Get Current Frame Number");
		mGetCurrentFrameNumberButton.addActionListener(new OnGetCurrentFrameNumberButton());
		mResetDeviceButton = new JButton("Reset Device");
		mResetDeviceButton.addActionListener(new OnResetDeviceButton());
		mCyclePortButton = new JButton("Cycle Port");
		mCyclePortButton.addActionListener(new OnCyclePortButton());
		mGetStatusButton = new JButton("Get Status");
		mGetStatusButton.addActionListener(new OnGetStatusButton());
		mSetPowerStateButton = new JButton("Set Power State");
		mSetPowerStateButton.addActionListener(new OnSetPowerStateButton());
		mGetPowerStateButton = new JButton("Get Power State");
		mGetPowerStateButton.addActionListener(new OnGetPowerStateButton());

		mRecipientLabel = new JLabel("Recipient:");
		mIndexLabel = new JLabel("Index:");
		mPowerStateLabel = new JLabel("Power State:");

		mIndexTF = new JTextField("0x00");

		Object[] RecipientData = {"Device","Interface","Endpoint","Other"};
		mRecipientCombo = new JComboBox(RecipientData);

		Object[] PowerStateData = {"DevicePowerD0","DevicePowerD1","DevicePowerD2","DevicePowerD3"};
		mPowerStateCombo = new JComboBox(PowerStateData);

		mGetStatusPanelLayout.setConstraints(mGetStatusButton, makegbc(0, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.CENTER));
		mGetStatusPanel.add(mGetStatusButton);

		mGetStatusPanelLayout.setConstraints(mRecipientLabel, makegbc(1, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.EAST));
		mGetStatusPanel.add(mRecipientLabel);

		mGetStatusPanelLayout.setConstraints(mRecipientCombo, makegbc(2, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.WEST));
		mGetStatusPanel.add(mRecipientCombo);

		mGetStatusPanelLayout.setConstraints(mIndexLabel, makegbc(3, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.EAST));
		mGetStatusPanel.add(mIndexLabel);

		mGetStatusPanelLayout.setConstraints(mIndexTF, makegbc(4, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.WEST));
		mGetStatusPanel.add(mIndexTF);

		mDevicePowerStatePanelLayout.setConstraints(mSetPowerStateButton, makegbc(0, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.CENTER));
		mDevicePowerStatePanel.add(mSetPowerStateButton);

		mDevicePowerStatePanelLayout.setConstraints(mPowerStateLabel, makegbc(1, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.EAST));
		mDevicePowerStatePanel.add(mPowerStateLabel);

		mDevicePowerStatePanelLayout.setConstraints(mPowerStateCombo, makegbc(2, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.WEST));
		mDevicePowerStatePanel.add(mPowerStateCombo);

		mDevicePowerStatePanelLayout.setConstraints(mGetPowerStateButton, makegbc(3, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.CENTER));
		mDevicePowerStatePanel.add(mGetPowerStateButton);

		layout.setConstraints(mGetCurrentFrameNumberButton, makegbc(0, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.CENTER));
		this.add(mGetCurrentFrameNumberButton);

		layout.setConstraints(mResetDeviceButton, makegbc(1, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.CENTER));
		this.add(mResetDeviceButton);

		layout.setConstraints(mCyclePortButton, makegbc(2, 0, 1, 1,100,100,GridBagConstraints.NONE,GridBagConstraints.CENTER));
		this.add(mCyclePortButton);

		layout.setConstraints(mGetStatusPanel, makegbc(0, 1, 3, 1,100,100,GridBagConstraints.BOTH,GridBagConstraints.CENTER));
		this.add(mGetStatusPanel);

		layout.setConstraints(mDevicePowerStatePanel, makegbc(0, 2, 3, 1,100,100,GridBagConstraints.BOTH,GridBagConstraints.CENTER));
		this.add(mDevicePowerStatePanel);
	}

	public class OnCyclePortButton implements ActionListener {
		public void actionPerformed(ActionEvent event) {
			int err;

			err = mainFrame.gUsbIo.cyclePort();
			if (err != 0) {
				// print error message
				mainFrame.printError("",err);
			} else {
				mainFrame.printOutput("Cycle Port was successful.\n");
			}
		}
	}

	public class OnResetDeviceButton implements ActionListener {
		public void actionPerformed(ActionEvent event) {
			int err;

			err = mainFrame.gUsbIo.resetDevice();
			if (err != 0) {
				// print error message
				mainFrame.printError("",err);
			} else {
				mainFrame.printOutput("Reset Device was successful.\n");
			}
		}
	}

	public class OnGetCurrentFrameNumberButton implements ActionListener {
		public void actionPerformed(ActionEvent event) {
			int err;
			int[] frame = new int[1];

			err = mainFrame.gUsbIo.getCurrentFrameNumber(frame);
			if (err != 0) {
				// print error message
				mainFrame.printError("",err);
			} else {
				mainFrame.printOutput("Current Frame Number is 0x" + UsbIoApp.intToString(frame[0]) + ".\n");
			}
		}
	}

	public class OnGetPowerStateButton implements ActionListener {
		public void actionPerformed(ActionEvent event) {
			int err;
			int[] powerstate = new int[1];

			err = mainFrame.gUsbIo.getDevicePowerState(powerstate);
			if (err != 0) {
				// print error message
				mainFrame.printError("",err);
			} else {
				mainFrame.printOutput("Current Power State is D" + powerstate[0] + ".\n");
				mPowerStateCombo.setSelectedIndex(powerstate[0]);
			}
		}
	}

	public class OnSetPowerStateButton implements ActionListener {
		public void actionPerformed(ActionEvent event) {
			int err;
			mainFrame.printOutput("Setting PowerState " + mPowerStateCombo.getSelectedIndex() + ".\n");
			err = mainFrame.gUsbIo.setDevicePowerState(mPowerStateCombo.getSelectedIndex());
			if (err != 0) {
				// print error message
				mainFrame.printError("",err);
			}
		}
	}

	public class OnGetStatusButton implements ActionListener {
		public void actionPerformed(ActionEvent event) {
			int err;
			short[] Status = new short[1];
			int Index = Integer.decode(mIndexTF.getText()).intValue();
			err = mainFrame.gUsbIo.getStatus(Status,mRecipientCombo.getSelectedIndex(),(short)Index);
			if (err != 0) {
				// print error message
				mainFrame.printError("",err);
			} else {
				mainFrame.printOutput("Status: 0x" + UsbIoApp.shortToString(Status[0]) + "\n");
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久久久99| 亚洲欧美日韩综合aⅴ视频| 成人少妇影院yyyy| 亚洲图片欧美视频| 久久精品一区蜜桃臀影院| 色香色香欲天天天影视综合网| 午夜久久福利影院| 国产区在线观看成人精品| 欧美日韩高清在线| 97精品久久久午夜一区二区三区| 午夜一区二区三区视频| 国产精品久线在线观看| 欧美成人三级电影在线| 欧美影视一区二区三区| 懂色av中文一区二区三区| 日本亚洲最大的色成网站www| 亚洲欧美综合色| 亚洲精品第一国产综合野| 欧美成人精品高清在线播放| 色天天综合色天天久久| 成人精品小蝌蚪| 精品写真视频在线观看| 天使萌一区二区三区免费观看| 最好看的中文字幕久久| 久久品道一品道久久精品| 91精品国产综合久久久蜜臀粉嫩| 99久久99久久精品免费看蜜桃| 黄色资源网久久资源365| 日韩主播视频在线| 亚洲小少妇裸体bbw| 亚洲美女淫视频| 中文字幕一区二| 中文在线资源观看网站视频免费不卡 | 欧美性大战久久| 成人午夜在线视频| 国产v日产∨综合v精品视频| 久久国产生活片100| 日韩高清电影一区| 午夜精品久久久久久久99水蜜桃| 亚洲精品视频观看| 亚洲精品一二三| 亚洲色图.com| 亚洲欧美电影一区二区| 最近日韩中文字幕| 成人欧美一区二区三区小说| 国产精品美日韩| 综合自拍亚洲综合图不卡区| 亚洲欧美日韩一区| 日韩一区欧美一区| 亚洲人午夜精品天堂一二香蕉| 一区在线观看免费| 亚洲免费观看高清完整版在线| 亚洲伦理在线免费看| 亚洲影院理伦片| 视频在线观看91| 久久精品久久99精品久久| 激情久久久久久久久久久久久久久久| 精一区二区三区| 国产成a人亚洲| 色综合天天综合网国产成人综合天 | 精一区二区三区| 国产激情视频一区二区在线观看| 国产福利一区在线观看| 成人h精品动漫一区二区三区| av色综合久久天堂av综合| 91色婷婷久久久久合中文| 欧美在线999| 宅男噜噜噜66一区二区66| 日韩精品自拍偷拍| 国产片一区二区三区| 亚洲欧洲日本在线| 亚洲电影一级黄| 国产 欧美在线| 久久免费的精品国产v∧| 麻豆免费精品视频| 精品中文字幕一区二区小辣椒| 国内一区二区在线| 91在线观看下载| 欧美日韩在线观看一区二区 | 久久精品国产99国产精品| 国产成人一区二区精品非洲| 91浏览器打开| 日韩视频免费观看高清完整版在线观看 | 色哟哟一区二区在线观看| 欧美日韩国产中文| 久久久一区二区| 亚洲自拍偷拍av| 精品午夜久久福利影院| 色婷婷狠狠综合| 欧美一卡二卡在线观看| 国产精品国产三级国产有无不卡| 亚洲第一主播视频| 国产不卡高清在线观看视频| 欧美在线免费观看亚洲| 26uuu成人网一区二区三区| 亚洲激情av在线| 韩国av一区二区三区四区| 欧美在线一区二区| 国产午夜精品一区二区| 午夜天堂影视香蕉久久| 成人av在线看| 日韩一二三区视频| 亚洲九九爱视频| 国产成人超碰人人澡人人澡| 欧美日韩黄视频| 偷拍亚洲欧洲综合| 97se亚洲国产综合自在线不卡| 日韩欧美另类在线| 亚洲国产精品综合小说图片区| 国产成人丝袜美腿| 日韩欧美在线一区二区三区| 亚洲精品成人天堂一二三| 国产成人精品免费一区二区| 日韩一级成人av| 三级一区在线视频先锋| 99久久精品免费精品国产| 国产亚洲美州欧州综合国| 美女在线一区二区| 欧美日韩极品在线观看一区| 亚洲欧洲99久久| 成人久久18免费网站麻豆| 精品国产123| 麻豆成人91精品二区三区| 欧美精品少妇一区二区三区| 一区二区在线观看免费| av在线不卡电影| 国产精品视频线看| 国产夫妻精品视频| 久久精品无码一区二区三区| 蜜桃av噜噜一区| 日韩一二三四区| 免费在线视频一区| 91精品国产一区二区三区蜜臀 | 亚洲丝袜另类动漫二区| 高清国产一区二区| 国产欧美精品在线观看| 国产精品一二三四| 国产欧美日本一区二区三区| 国产黄色成人av| 国产视频一区在线观看| 国产丶欧美丶日本不卡视频| 久久日一线二线三线suv| 狠狠色丁香婷婷综合| 精品国产免费视频| 国产精品一卡二| 国产精品无码永久免费888| 成人午夜精品一区二区三区| 国产精品网曝门| 成人av影视在线观看| 亚洲丝袜自拍清纯另类| 色94色欧美sute亚洲线路二| 亚洲欧美激情视频在线观看一区二区三区| 日韩精品一区二区三区在线| 日韩精品成人一区二区三区| 欧美一区二区三区视频免费播放| 秋霞午夜鲁丝一区二区老狼| 日韩欧美国产高清| 国产剧情一区二区三区| 国产精品毛片久久久久久| av成人动漫在线观看| 一区二区在线免费观看| 欧美精品乱码久久久久久按摩| 蜜桃传媒麻豆第一区在线观看| 亚洲精品一区在线观看| 成人教育av在线| 夜夜操天天操亚洲| 91精品国产综合久久精品麻豆| 久国产精品韩国三级视频| 国产日韩欧美精品在线| 色综合天天在线| 日本成人在线看| 久久久久久久久久看片| 91亚洲男人天堂| 天天影视网天天综合色在线播放| 精品国产欧美一区二区| jlzzjlzz亚洲女人18| 亚洲成a天堂v人片| 26uuu亚洲| 91福利在线观看| 久久99精品国产.久久久久久 | 成人综合婷婷国产精品久久蜜臀 | 麻豆91免费看| 国产精品超碰97尤物18| 欧美日韩aaaaa| 国产乱码精品1区2区3区| 亚洲特黄一级片| 欧美成人video| 一本色道久久综合狠狠躁的推荐| 偷窥少妇高潮呻吟av久久免费| 久久综合色天天久久综合图片| 一本一道波多野结衣一区二区| 蜜桃av一区二区三区| 亚洲男人天堂一区| 欧美精品一区二区久久久| 色先锋久久av资源部| 国产精品一区二区久激情瑜伽| 亚洲国产日韩综合久久精品| 久久久久久久网| 51久久夜色精品国产麻豆| 97se亚洲国产综合自在线|