📄 aclpanel.java
字号:
envDateTextField.setFont(new java.awt.Font("Dialog", 0, 11));
envDateTextField.setToolTipText("");
envDateTextField.setDisabledTextColor(Color.black);
envDateTextField.addMouseListener(
new java.awt.event.MouseAdapter() {
public void mouseClicked(MouseEvent e) {
envDateTextField_mouseClicked(e);
}
});
envDateTextField.setEnabled(false);
defaultEnvelopeButton.setBackground(Color.white);
defaultEnvelopeButton.setFont(new java.awt.Font("Dialog", 0, 12));
defaultEnvelopeButton.setIcon(envelopeIcon);
defaultEnvelopeButton.setText("set Default Envelope");
defaultEnvelopeButton.addActionListener(
new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
defaultEnvelopeButton_actionPerformed(e);
}
});
fromButton.addActionListener(
new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
fromButton_actionPerformed(e);
}
});
fromButton.setMargin(new Insets(0, 0, 0, 0));
fromButton.setToolTipText("Edit/View From");
fromButton.setIcon(zoomIcon);
fromButton.setPreferredSize(new Dimension(23, 20));
fromButton.setMinimumSize(new Dimension(23, 20));
fromButton.setMaximumSize(new Dimension(23, 20));
fromButton.setFont(new java.awt.Font("Dialog", 0, 12));
fromButton.setBackground(Color.white);
envFromTextField.setFont(new java.awt.Font("Dialog", 0, 11));
envFromTextField.setDisabledTextColor(Color.black);
envFromTextField.addMouseListener(
new java.awt.event.MouseAdapter() {
public void mouseClicked(MouseEvent e) {
envFromTextField_mouseClicked(e);
}
});
envFromTextField.setEnabled(false);
envDateButton.setBackground(Color.white);
envDateButton.setFont(new java.awt.Font("Dialog", 0, 12));
envDateButton.setMaximumSize(new Dimension(23, 20));
envDateButton.setMinimumSize(new Dimension(23, 20));
envDateButton.setPreferredSize(new Dimension(23, 20));
envDateButton.setToolTipText("Edit/View Date");
envDateButton.setIcon(dateIcon);
envDateButton.addActionListener(
new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
envDateButton_actionPerformed(e);
}
});
contentZoomButton.setBorder(null);
contentZoomButton.setMaximumSize(new Dimension(23, 20));
contentZoomButton.setMinimumSize(new Dimension(23, 20));
contentZoomButton.setToolTipText("Zoom Content Of ACLMessage");
contentZoomButton.setIcon(zoomIcon);
contentZoomButton.addActionListener(
new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
contentZoomButton_actionPerformed(e);
}
});
contentTextArea.setText("");
contentTextArea.setAutoscrolls(true);
contentTextArea.setFont(new java.awt.Font("Dialog", 0, 11));
aclTab.add(senderLabel, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(senderTextField, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(receiverLabel, new GridBagConstraints(0, 2, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replytoLabel, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replytoList, new GridBagConstraints(2, 3, 3, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(languageLabel, new GridBagConstraints(0, 6, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(encodingLabel, new GridBagConstraints(0, 7, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(ontologyjLabel, new GridBagConstraints(0, 8, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(protocolLabel, new GridBagConstraints(0, 9, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(inreplytoLabel, new GridBagConstraints(0, 11, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replywithLabel, new GridBagConstraints(0, 12, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replybyLabel, new GridBagConstraints(0, 13, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(userpropLabel, new GridBagConstraints(0, 14, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(userpropList, new GridBagConstraints(2, 14, 3, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(encodingTextField, new GridBagConstraints(2, 7, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(ontologyTextField, new GridBagConstraints(2, 8, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(protocolComboBox, new GridBagConstraints(2, 9, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replywithTextField, new GridBagConstraints(2, 12, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replybyTextField, new GridBagConstraints(2, 13, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(convidLabel, new GridBagConstraints(0, 10, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(inreplytoTextField, new GridBagConstraints(2, 11, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(conversationTextField, new GridBagConstraints(2, 10, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(receiverList, new GridBagConstraints(2, 2, 3, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(languageTextField, new GridBagConstraints(2, 6, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(performativesComboBox, new GridBagConstraints(2, 0, 3, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(performativeLabel, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(senderButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(replyByButton, new GridBagConstraints(3, 13, 1, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(contentLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(contentZoomButton, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0
, GridBagConstraints.NORTH, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
aclTab.add(contentTextArea, new GridBagConstraints(0, 5, 4, 1, 2.0, 2.0
, GridBagConstraints.SOUTH, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(toLabel, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(commentsLabel, new GridBagConstraints(0, 2, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(aclRepreLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(payLoadLabel, new GridBagConstraints(0, 4, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envDateLabel, new GridBagConstraints(0, 6, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
//envelopeTab.add(encryptedLabel, new GridBagConstraints(0, 7, 2, 1, 0.0, 0.0
// , GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(intReceiversLabel, new GridBagConstraints(0, 7, 2, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envACLReprTextField, new GridBagConstraints(2, 3, 2, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(jLabel1, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envPayloadLengthTextField, new GridBagConstraints(2, 4, 2, 1, 1.0, 0.0
, GridBagConstraints.NORTH, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envPayloadEncodingTextField, new GridBagConstraints(2, 5, 2, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(fromLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envToList, new GridBagConstraints(2, 1, 2, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envDateTextField, new GridBagConstraints(2, 6, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
//envelopeTab.add(envEncryptedList, new GridBagConstraints(2, 7, 2, 1, 1.0, 1.0
// , GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envIntendedReceiversList, new GridBagConstraints(2, 7, 2, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(defaultEnvelopeButton, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0));
envelopeTab.add(envFromTextField, new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(fromButton, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(envDateButton, new GridBagConstraints(3, 6, 1, 1, 0.0, 0.0
, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
envelopeTab.add(commentsScrollPane, new GridBagConstraints(2, 2, 2, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
commentsScrollPane.getViewport().add(envCommentsTextArea, null);
this.add(theTabbedPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0
, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
theTabbedPane.addTab("message", this.messageIcon, aclTab, "<html><h1>Message Tab</h1>" +
"This tab represents an ACL message compliant to the <p>" +
"<b>FIPA 2000</b> <p>FIPA ACL Message Structure Specification <p>" +
"(fipa000061) specifications. <p>" +
"All parameters are couples of <p>" +
"<em>keyword: value</em> </html>");
theTabbedPane.addTab("envelope", this.envelopeIcon, envelopeTab, "<html><h1>Envelope Tab</h1>" +
" This tab represents an envelope <p>" +
"attached to the ACLMessage. <p>" +
"The envelope is used by the <p>" +
"<b><it>ACC</it></b> for inter-platform messaging.</html>");
}
private class ACLFileFilter extends javax.swing.filechooser.FileFilter {
public ACLFileFilter() { }
/**
* The description of this filter. For example: "JPG and GIF Images"
*
* @return The Description value
* @see FileView#getName
*/
public String getDescription() {
return "ACLMessage files (*.acl)";
}
public boolean accept(File pathName) {
if (pathName.isDirectory()) {
return true;
}
else if (pathName.isFile() &&
(pathName.getName().endsWith(".acl"))) {
return true;
}
else {
return false;
}
}
private String extensions[] = {".acl"};
}
GridBagLayout gridBagLayout1 = new GridBagLayout();
JLabel senderLabel = new JLabel();
JLabel receiverLabel = new JLabel();
JLabel replytoLabel = new JLabel();
JLabel contentLabel = new JLabel();
JLabel languageLabel = new JLabel();
JLabel encodingLabel = new JLabel();
JLabel ontologyjLabel = new JLabel();
JLabel protocolLabel = new JLabel();
JLabel inreplytoLabel = new JLabel();
JLabel replywithLabel = new JLabel();
JLabel replybyLabel = new JLabel();
JLabel userpropLabel = new JLabel();
JLabel convidLabel = new JLabel();
JLabel performativeLabel = new JLabel();
JButton senderButton = new JButton();
JButton replyByButton = new JButton();
JLabel toLabel = new JLabel();
JLabel fromLabel = new JLabel();
JLabel commentsLabel = new JLabel();
JLabel aclRepreLabel = new JLabel();
JLabel payLoadLabel = new JLabel();
JLabel envDateLabel = new JLabel();
JLabel intReceiversLabel = new JLabel();
JLabel jLabel1 = new JLabel();
JTextField envDateTextField = new JTextField();
JButton defaultEnvelopeButton = new JButton();
JButton fromButton = new JButton();
JButton envDateButton = new JButton();
JButton contentZoomButton = new JButton();
ACLTextArea contentTextArea = new ACLTextArea();
private ACLTextField envACLReprTextField = new ACLTextField();
private ACLTextField envPayloadLengthTextField = new ACLTextField();
private ACLTextField envPayloadEncodingTextField = new ACLTextField();
private JTextField envFromTextField = new JTextField();
private boolean editable = true;
private JTextField senderTextField = new JTextField();
private ACLPropertyList userpropList = new ACLPropertyList();
private ACLTextField conversationTextField = new ACLTextField();
private ACLTextField languageTextField = new ACLTextField();
private ACLTextField encodingTextField = new ACLTextField();
private ACLTextField ontologyTextField = new ACLTextField();
private ACLComboBox protocolComboBox = new ACLComboBox();
private ACLTextField inreplytoTextField = new ACLTextField();
private ACLTextField replywithTextField = new ACLTextField();
private JTextField replybyTextField = new JTextField();
private ACLComboBox performativesComboBox = new ACLComboBox();
private ACLMessage itsMsg = new ACLMessage(ACLMessage.INFORM);
private Vector editsVector = new Vector();
private JPanel aclTab = new JPanel();
private GridBagLayout gridBagLayout2 = new GridBagLayout();
private JTabbedPane theTabbedPane = new JTabbedPane();
private JPanel envelopeTab = new JPanel();
private GridBagLayout gridBagLayout3 = new GridBagLayout();
private JScrollPane commentsScrollPane = new JScrollPane();
private EnvCommentsTextArea envCommentsTextArea = new EnvCommentsTextArea();
private ImageIcon zoomIcon =
new ImageIcon(this.getClass().getResource("images/zoom.gif"));
private ImageIcon dateIcon =
new ImageIcon(this.getClass().getResource("images/date.gif"));
private ImageIcon envelopeIcon =
new ImageIcon(this.getClass().getResource("images/envelope.gif"));
private ImageIcon messageIcon =
new ImageIcon(this.getClass().getResource("images/message.gif"));
private ACLAIDList envToList;
private ACLAIDList envIntendedReceiversList;
private Agent agent;
private ACLAIDList receiverList;
private ACLAIDList replytoList;
private File currentDir;
private Envelope itsEnvelope;
}
// ***EOF***
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -