📄 packetpanel.java
字号:
package view;
//Copyright (C) 2008 Harald Unander, Wang Wenjuan
//
// This file is part of WlanTV.
//
// WlanTV is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// WlanTV is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with WlanTV. If not, see <http://www.gnu.org/licenses/>..
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import main.WlanTvProperties;
@SuppressWarnings("serial")
public class PacketPanel extends JPanel {
public ResultTextArea resultTextArea;
public SniffTextArea sniffTextArea;
public TransTextArea transTextArea;
public JScrollPane transScrollArea;
public PacketPanel() {
sniffTextArea = new SniffTextArea();
sniffTextArea.setBorder(BorderFactory.createTitledBorder("Sniffed"));
resultTextArea = new ResultTextArea();
resultTextArea.setBorder(BorderFactory.createTitledBorder("Calculated"));
transTextArea = new TransTextArea();
transTextArea.setBorder(BorderFactory.createTitledBorder("Transaction"));
setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
// JScrollPane sp1 = new JScrollPane(sniffTextArea);
add(sniffTextArea);
// JScrollPane sp2 = new JScrollPane(resultTextArea);
add(resultTextArea);
transScrollArea = new JScrollPane(transTextArea);
add(transScrollArea);
}
public class ResultTextArea extends JTextArea {
public ResultTextArea() {
setTabSize(7);
setEditable(false);
setCaretPosition(0);
}
}
public class SniffTextArea extends JTextArea {
WlanTvProperties pilotProp;
public SniffTextArea() {
setTabSize(7);
setEditable(false);
setCaretPosition(0);
}
}
public class TransTextArea extends JTextArea {
public TransTextArea() {
setTabSize(7);
setEditable(false);
setCaretPosition(0);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -