📄 basicconfpanel.java
字号:
/*
* BasicConfPanel.java
*
* Created on 24 de Novembro de 2005, 18:16
*/
package gui;
/**
*
* @author Helen Peters
*/
public class BasicConfPanel extends javax.swing.JPanel {
/** Creates new form BasicConfPanel */
public BasicConfPanel() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
traceFileNameTextField = new javax.swing.JTextField();
traceFileCheckBox = new javax.swing.JCheckBox();
scenarySizeLenLabel = new javax.swing.JLabel();
scenarySizeXTextField = new javax.swing.JTextField();
metersLabel1 = new javax.swing.JLabel();
xLabel = new javax.swing.JLabel();
scenarySizeYTextField = new javax.swing.JTextField();
metersLabel2 = new javax.swing.JLabel();
batteryComboBox = new javax.swing.JComboBox();
batteryLabel = new javax.swing.JLabel();
routingProtocolLabel = new javax.swing.JLabel();
routingProtocolComboBox = new javax.swing.JComboBox();
ifqLenTextField = new javax.swing.JTextField();
ifqLenLabel = new javax.swing.JLabel();
ifqLabel = new javax.swing.JLabel();
ifqComboBox = new javax.swing.JComboBox();
propagationComboBox = new javax.swing.JComboBox();
propagationLabel = new javax.swing.JLabel();
antennaLabel = new javax.swing.JLabel();
antennaComboBox = new javax.swing.JComboBox();
phyComboBox = new javax.swing.JComboBox();
phyLabel = new javax.swing.JLabel();
linkLabel = new javax.swing.JLabel();
linkComboBox = new javax.swing.JComboBox();
macLayerComboBox = new javax.swing.JComboBox();
macLabel = new javax.swing.JLabel();
channelTypeLabel = new javax.swing.JLabel();
channelTypeTextField = new javax.swing.JTextField();
transportComboBox = new javax.swing.JComboBox();
transportLabel = new javax.swing.JLabel();
simulationTimeLabel = new javax.swing.JLabel();
startTextField = new javax.swing.JTextField();
startLabel = new javax.swing.JLabel();
stopLabel = new javax.swing.JLabel();
stopTextField = new javax.swing.JTextField();
traceLabel = new javax.swing.JLabel();
traceMacRadioButton = new javax.swing.JRadioButton();
traceRouteRadioButton = new javax.swing.JRadioButton();
traceAgentRadioButton = new javax.swing.JRadioButton();
setLayout(null);
setBackground(new java.awt.Color(240, 238, 231));
traceFileNameTextField.setFont(new java.awt.Font("Arial", 0, 11));
traceFileNameTextField.setText("trace.tr");
traceFileNameTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
traceFileNameTextFieldActionPerformed(evt);
}
});
traceFileNameTextField.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
traceFileNameTextFieldFocusLost(evt);
}
});
add(traceFileNameTextField);
traceFileNameTextField.setBounds(210, 500, 270, 19);
traceFileCheckBox.setBackground(new java.awt.Color(240, 238, 231));
traceFileCheckBox.setFont(new java.awt.Font("Arial", 0, 11));
traceFileCheckBox.setSelected(true);
traceFileCheckBox.setText("TRACE FILE NAME:");
traceFileCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
traceFileCheckBox.setFocusable(false);
traceFileCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
traceFileCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
traceFileCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
traceFileCheckBoxActionPerformed(evt);
}
});
add(traceFileCheckBox);
traceFileCheckBox.setBounds(20, 500, 109, 15);
scenarySizeLenLabel.setFont(new java.awt.Font("Arial", 0, 11));
scenarySizeLenLabel.setText("SCENARY SIZE:");
add(scenarySizeLenLabel);
scenarySizeLenLabel.setBounds(20, 460, 78, 14);
scenarySizeXTextField.setFont(new java.awt.Font("Arial", 0, 11));
scenarySizeXTextField.setText("100");
scenarySizeXTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
scenarySizeXTextFieldActionPerformed(evt);
}
});
scenarySizeXTextField.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
scenarySizeXTextFieldFocusLost(evt);
}
});
add(scenarySizeXTextField);
scenarySizeXTextField.setBounds(370, 460, 70, 19);
metersLabel1.setFont(new java.awt.Font("Arial", 0, 11));
metersLabel1.setText("meters");
add(metersLabel1);
metersLabel1.setBounds(290, 460, 33, 20);
xLabel.setFont(new java.awt.Font("Arial", 0, 11));
xLabel.setText("x");
add(xLabel);
xLabel.setBounds(340, 460, 10, 20);
scenarySizeYTextField.setFont(new java.awt.Font("Arial", 0, 11));
scenarySizeYTextField.setText("100");
scenarySizeYTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
scenarySizeYTextFieldActionPerformed(evt);
}
});
scenarySizeYTextField.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
scenarySizeYTextFieldFocusLost(evt);
}
});
add(scenarySizeYTextField);
scenarySizeYTextField.setBounds(210, 460, 70, 19);
metersLabel2.setFont(new java.awt.Font("Arial", 0, 11));
metersLabel2.setText("meters");
add(metersLabel2);
metersLabel2.setBounds(450, 460, 33, 20);
batteryComboBox.setFont(new java.awt.Font("Arial", 0, 11));
batteryComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "EnergyModel/Battery" }));
batteryComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
batteryComboBoxActionPerformed(evt);
}
});
add(batteryComboBox);
batteryComboBox.setBounds(210, 420, 270, 22);
batteryLabel.setFont(new java.awt.Font("Arial", 0, 11));
batteryLabel.setText("BATTERY:");
add(batteryLabel);
batteryLabel.setBounds(20, 420, 51, 14);
routingProtocolLabel.setBackground(java.awt.Color.white);
routingProtocolLabel.setFont(new java.awt.Font("Arial", 0, 11));
routingProtocolLabel.setText("ROUTING PROTOCOL:");
add(routingProtocolLabel);
routingProtocolLabel.setBounds(20, 100, 107, 14);
routingProtocolComboBox.setFont(new java.awt.Font("Arial", 0, 11));
routingProtocolComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AODV", "DSR", "TORA", "LEACH", "DIRECTED DIFFUSION", "DSDV" }));
routingProtocolComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
routingProtocolComboBoxActionPerformed(evt);
}
});
add(routingProtocolComboBox);
routingProtocolComboBox.setBounds(210, 100, 270, 22);
ifqLenTextField.setFont(new java.awt.Font("Arial", 0, 11));
ifqLenTextField.setText("100");
ifqLenTextField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ifqLenTextFieldActionPerformed(evt);
}
});
ifqLenTextField.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
ifqLenTextFieldFocusLost(evt);
}
});
add(ifqLenTextField);
ifqLenTextField.setBounds(210, 380, 270, 19);
ifqLenLabel.setFont(new java.awt.Font("Arial", 0, 11));
ifqLenLabel.setText("IFQ LENGTH:");
add(ifqLenLabel);
ifqLenLabel.setBounds(20, 380, 62, 14);
ifqLabel.setFont(new java.awt.Font("Arial", 0, 11));
ifqLabel.setText("INTERFACE QUEUE (IFQ):");
add(ifqLabel);
ifqLabel.setBounds(20, 340, 122, 14);
ifqComboBox.setFont(new java.awt.Font("Arial", 0, 11));
ifqComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Queue/DropTail/PriQueue", "Queue/RED", "Queue/RED/Pushback", "Queue/RED/RIO", "Queue/DropTail", "Queue/Vq", "Queue/XCP", "Queue/DropTail/XCP" }));
ifqComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ifqComboBoxActionPerformed(evt);
}
});
add(ifqComboBox);
ifqComboBox.setBounds(210, 340, 270, 22);
propagationComboBox.setFont(new java.awt.Font("Arial", 0, 11));
propagationComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Propagation/TwoRayGround", "Propagation/Shadowing", "Propagation/ShadowingVis", "Propagation/FreeSpace" }));
propagationComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
propagationComboBoxActionPerformed(evt);
}
});
add(propagationComboBox);
propagationComboBox.setBounds(210, 300, 270, 22);
propagationLabel.setFont(new java.awt.Font("Arial", 0, 11));
propagationLabel.setText("RADIO PROPAGATION:");
add(propagationLabel);
propagationLabel.setBounds(20, 300, 112, 14);
antennaLabel.setFont(new java.awt.Font("Arial", 0, 11));
antennaLabel.setText("ANTENNA:");
add(antennaLabel);
antennaLabel.setBounds(20, 260, 52, 14);
antennaComboBox.setFont(new java.awt.Font("Arial", 0, 11));
antennaComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Antena/OmniAntenna" }));
antennaComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
antennaComboBoxActionPerformed(evt);
}
});
add(antennaComboBox);
antennaComboBox.setBounds(210, 260, 270, 22);
phyComboBox.setFont(new java.awt.Font("Arial", 0, 11));
phyComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Phy/WirelessPhy - Mica2", "Phy/WirelessPhy - 914MHz Lucent WaveLAN DSSS" }));
phyComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
phyComboBoxActionPerformed(evt);
}
});
add(phyComboBox);
phyComboBox.setBounds(210, 220, 273, 20);
phyLabel.setFont(new java.awt.Font("Arial", 0, 11));
phyLabel.setText("PHYSYCAL LAYER:");
add(phyLabel);
phyLabel.setBounds(20, 220, 98, 14);
linkLabel.setFont(new java.awt.Font("Arial", 0, 11));
linkLabel.setText("LINK:");
add(linkLabel);
linkLabel.setBounds(20, 180, 25, 14);
linkComboBox.setFont(new java.awt.Font("Arial", 0, 11));
linkComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "LL" }));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -