3 The file is used to create, update Protocol of MSA/MBD file
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.packaging
.module
.ui
;
18 import java
.awt
.Dimension
;
19 import java
.awt
.event
.ActionEvent
;
21 import javax
.swing
.JButton
;
22 import javax
.swing
.JComboBox
;
23 import javax
.swing
.JLabel
;
24 import javax
.swing
.JPanel
;
25 import javax
.swing
.JRadioButton
;
26 import javax
.swing
.JTextField
;
28 import org
.tianocore
.ProtocolNotifyUsage
;
29 import org
.tianocore
.ProtocolUsage
;
30 import org
.tianocore
.ProtocolsDocument
;
31 import org
.tianocore
.common
.DataValidation
;
32 import org
.tianocore
.common
.Log
;
33 import org
.tianocore
.common
.Tools
;
34 import org
.tianocore
.packaging
.common
.ui
.IDefaultMutableTreeNode
;
35 import org
.tianocore
.packaging
.common
.ui
.IInternalFrame
;
36 import org
.tianocore
.packaging
.common
.ui
.StarLabel
;
39 The class is used to create, update Protocol of MSA/MBD file
40 It extends IInternalFrame
42 @since ModuleEditor 1.0
45 public class ModuleProtocols
extends IInternalFrame
{
48 /// Define class Serial Version UID
50 private static final long serialVersionUID
= -9084913640747858848L;
53 //Define class members
55 private ProtocolsDocument
.Protocols protocols
= null;
57 private int location
= -1;
59 private JPanel jContentPane
= null;
61 private JLabel jLabelC_Name
= null;
63 private JTextField jTextFieldC_Name
= null;
65 private JLabel jLabelGuid
= null;
67 private JTextField jTextFieldGuid
= null;
69 private JLabel jLabelFeatureFlag
= null;
71 private JTextField jTextFieldFeatureFlag
= null;
73 private JButton jButtonOk
= null;
75 private JButton jButtonCancel
= null;
77 private JLabel jLabelUsage
= null;
79 private JComboBox jComboBoxUsage
= null;
81 private JLabel jLabelEnableFeature
= null;
83 private JRadioButton jRadioButtonEnableFeature
= null;
85 private JRadioButton jRadioButtonDisableFeature
= null;
87 private JRadioButton jRadioButtonProtocol
= null;
89 private JRadioButton jRadioButtonProtocolNotify
= null;
91 private JButton jButtonGenerateGuid
= null;
93 private JLabel jLabelOverrideID
= null;
95 private JTextField jTextFieldOverrideID
= null;
97 private StarLabel jStarLabel1
= null;
99 private StarLabel jStarLabel2
= null;
101 private JLabel jLabelProtocolType
= null;
104 This method initializes jTextFieldC_Name
106 @return javax.swing.JTextField jTextFieldC_Name
109 private JTextField
getJTextFieldProtocolName() {
110 if (jTextFieldC_Name
== null) {
111 jTextFieldC_Name
= new JTextField();
112 jTextFieldC_Name
.setBounds(new java
.awt
.Rectangle(160, 35, 320, 20));
114 return jTextFieldC_Name
;
118 This method initializes jTextFieldGuid
120 @return javax.swing.JTextField jTextFieldGuid
123 private JTextField
getJTextFieldGuid() {
124 if (jTextFieldGuid
== null) {
125 jTextFieldGuid
= new JTextField();
126 jTextFieldGuid
.setBounds(new java
.awt
.Rectangle(160, 60, 240, 20));
128 return jTextFieldGuid
;
132 This method initializes jTextFieldFeatureFlag
134 @return javax.swing.JTextField jTextFieldFeatureFlag
137 private JTextField
getJTextFieldFeatureFlag() {
138 if (jTextFieldFeatureFlag
== null) {
139 jTextFieldFeatureFlag
= new JTextField();
140 jTextFieldFeatureFlag
.setBounds(new java
.awt
.Rectangle(160, 135, 320, 20));
142 return jTextFieldFeatureFlag
;
146 This method initializes jButtonOk
148 @return javax.swing.JButton jButtonOk
151 private JButton
getJButtonOk() {
152 if (jButtonOk
== null) {
153 jButtonOk
= new JButton();
154 jButtonOk
.setText("OK");
155 jButtonOk
.setBounds(new java
.awt
.Rectangle(290, 190, 90, 20));
156 jButtonOk
.addActionListener(this);
162 This method initializes jButtonCancel
164 @return javax.swing.JButton jButtonCancel
167 private JButton
getJButtonCancel() {
168 if (jButtonCancel
== null) {
169 jButtonCancel
= new JButton();
170 jButtonCancel
.setText("Cancel");
171 jButtonCancel
.setBounds(new java
.awt
.Rectangle(390, 190, 90, 20));
172 jButtonCancel
.setPreferredSize(new Dimension(90, 20));
173 jButtonCancel
.addActionListener(this);
175 return jButtonCancel
;
179 This method initializes jComboBoxUsage
181 @return javax.swing.JComboBox jComboBoxUsage
184 private JComboBox
getJComboBoxProtocolUsage() {
185 if (jComboBoxUsage
== null) {
186 jComboBoxUsage
= new JComboBox();
187 jComboBoxUsage
.setBounds(new java
.awt
.Rectangle(160, 85, 320, 20));
189 return jComboBoxUsage
;
193 This method initializes jRadioButtonEnableFeature
195 @return javax.swing.JRadioButton jRadioButtonEnableFeature
198 private JRadioButton
getJRadioButtonEnableFeature() {
199 if (jRadioButtonEnableFeature
== null) {
200 jRadioButtonEnableFeature
= new JRadioButton();
201 jRadioButtonEnableFeature
.setText("Enable");
202 jRadioButtonEnableFeature
.setBounds(new java
.awt
.Rectangle(160, 110, 90, 20));
203 jRadioButtonEnableFeature
.addActionListener(this);
204 jRadioButtonEnableFeature
.setSelected(true);
206 return jRadioButtonEnableFeature
;
210 This method initializes jRadioButtonDisableFeature
212 @return javax.swing.JRadioButton jRadioButtonDisableFeature
215 private JRadioButton
getJRadioButtonDisableFeature() {
216 if (jRadioButtonDisableFeature
== null) {
217 jRadioButtonDisableFeature
= new JRadioButton();
218 jRadioButtonDisableFeature
.setText("Disable");
219 jRadioButtonDisableFeature
.setBounds(new java
.awt
.Rectangle(320, 110, 90, 20));
220 jRadioButtonDisableFeature
.addActionListener(this);
222 return jRadioButtonDisableFeature
;
226 This method initializes jRadioButtonProtocol
228 @return javax.swing.JRadioButton jRadioButtonProtocol
231 private JRadioButton
getJRadioButtonProtocol() {
232 if (jRadioButtonProtocol
== null) {
233 jRadioButtonProtocol
= new JRadioButton();
234 jRadioButtonProtocol
.setText("Protocol");
235 jRadioButtonProtocol
.setBounds(new java
.awt
.Rectangle(160, 10, 90, 20));
236 jRadioButtonProtocol
.setSelected(true);
237 jRadioButtonProtocol
.addActionListener(this);
239 return jRadioButtonProtocol
;
243 This method initializes jRadioButtonProtocolNotify
245 @return javax.swing.JRadioButton jRadioButtonProtocolNotify
248 private JRadioButton
getJRadioButtonProtocolNotify() {
249 if (jRadioButtonProtocolNotify
== null) {
250 jRadioButtonProtocolNotify
= new JRadioButton();
251 jRadioButtonProtocolNotify
.setText("Protocol Notify");
252 jRadioButtonProtocolNotify
.setBounds(new java
.awt
.Rectangle(320, 10, 120, 20));
253 jRadioButtonProtocolNotify
.addActionListener(this);
255 return jRadioButtonProtocolNotify
;
259 This method initializes jButtonGenerateGuid
261 @return javax.swing.JButton jButtonGenerateGuid
264 private JButton
getJButtonGenerateGuid() {
265 if (jButtonGenerateGuid
== null) {
266 jButtonGenerateGuid
= new JButton();
267 jButtonGenerateGuid
.setBounds(new java
.awt
.Rectangle(405, 60, 75, 20));
268 jButtonGenerateGuid
.setText("GEN");
269 jButtonGenerateGuid
.addActionListener(this);
271 return jButtonGenerateGuid
;
275 This method initializes jTextFieldOverrideID
277 @return javax.swing.JTextField jTextFieldOverrideID
280 private JTextField
getJTextFieldOverrideID() {
281 if (jTextFieldOverrideID
== null) {
282 jTextFieldOverrideID
= new JTextField();
283 jTextFieldOverrideID
.setBounds(new java
.awt
.Rectangle(160, 160, 320, 20));
285 return jTextFieldOverrideID
;
288 public static void main(String
[] args
) {
293 This is the default constructor
296 public ModuleProtocols() {
299 this.setVisible(true);
303 This is the override edit constructor
305 @param inProtocol The input data of ProtocolsDocument.Protocols
308 public ModuleProtocols(ProtocolsDocument
.Protocols inProtocol
) {
311 this.setVisible(true);
315 This is the override edit constructor
317 @param inProtocol The input data of ProtocolsDocument.Protocols
318 @param type The input data of node type
319 @param index The input data of node index
322 public ModuleProtocols(ProtocolsDocument
.Protocols inProtocol
, int type
, int index
) {
324 init(inProtocol
, type
, index
);
325 this.setVisible(true);
329 This method initializes this
331 @param inProtocol The input data of ProtocolsDocument.Protocols
334 private void init(ProtocolsDocument
.Protocols inProtocol
) {
336 this.setProtocols(inProtocol
);
340 This method initializes this
341 Fill values to all fields if these values are not empty
343 @param inProtocol The input data of ProtocolsDocument.Protocols
344 @param type The input data of node type
345 @param index The input data of node index
348 private void init(ProtocolsDocument
.Protocols inProtocol
, int type
, int index
) {
350 this.location
= index
;
351 if (type
== IDefaultMutableTreeNode
.PROTOCOLS_PROTOCOL_ITEM
) {
352 this.jRadioButtonProtocol
.setSelected(true);
353 this.jRadioButtonProtocolNotify
.setSelected(false);
354 if (this.protocols
.getProtocolArray(index
).getStringValue() != null) {
355 this.jTextFieldC_Name
.setText(this.protocols
.getProtocolArray(index
).getStringValue());
357 if (this.protocols
.getProtocolArray(index
).getGuid() != null) {
358 this.jTextFieldGuid
.setText(this.protocols
.getProtocolArray(index
).getGuid());
360 if (this.protocols
.getProtocolArray(index
).getUsage() != null) {
361 this.jComboBoxUsage
.setSelectedItem(this.protocols
.getProtocolArray(index
).getUsage().toString());
363 this.jRadioButtonEnableFeature
.setSelected(this.protocols
.getProtocolArray(index
).getEnableFeature());
364 this.jRadioButtonDisableFeature
.setSelected(!this.protocols
.getProtocolArray(index
).getEnableFeature());
365 if (this.protocols
.getProtocolArray(index
).getFeatureFlag() != null) {
366 this.jTextFieldFeatureFlag
.setText(this.protocols
.getProtocolArray(index
).getFeatureFlag());
368 this.jTextFieldOverrideID
.setText(String
.valueOf(this.protocols
.getProtocolArray(index
).getOverrideID()));
369 } else if (type
== IDefaultMutableTreeNode
.PROTOCOLS_PROTOCOLNOTIFY_ITEM
) {
370 this.jRadioButtonProtocol
.setSelected(false);
371 this.jRadioButtonProtocolNotify
.setSelected(true);
372 this.jTextFieldFeatureFlag
.setEditable(false);
373 this.jRadioButtonDisableFeature
.setEnabled(false);
374 this.jRadioButtonEnableFeature
.setEnabled(false);
375 this.jComboBoxUsage
.setEnabled(false);
376 if (this.protocols
.getProtocolNotifyArray(index
).getStringValue() != null) {
377 this.jTextFieldC_Name
.setText(this.protocols
.getProtocolNotifyArray(index
).getStringValue());
379 if (this.protocols
.getProtocolNotifyArray(index
).getGuid() != null) {
380 this.jTextFieldGuid
.setText(this.protocols
.getProtocolNotifyArray(index
).getGuid());
382 if (this.protocols
.getProtocolNotifyArray(index
).getUsage() != null) {
383 this.jComboBoxUsage
.setSelectedItem(this.protocols
.getProtocolNotifyArray(index
).getUsage().toString());
385 this.jTextFieldOverrideID
.setText(String
.valueOf(this.protocols
.getProtocolNotifyArray(index
)
388 this.jRadioButtonProtocol
.setEnabled(false);
389 this.jRadioButtonProtocolNotify
.setEnabled(false);
393 This method initializes this
396 private void init() {
397 this.setSize(500, 515);
398 this.setName("JFrame");
399 this.setContentPane(getJContentPane());
400 this.setTitle("Protocols");
402 this.setViewMode(false);
406 Disable all components when the mode is view
408 @param isView true - The view mode; false - The non-view mode
411 public void setViewMode(boolean isView
) {
412 this.jButtonOk
.setVisible(false);
413 this.jButtonCancel
.setVisible(false);
415 this.jRadioButtonProtocol
.setEnabled(!isView
);
416 this.jRadioButtonProtocolNotify
.setEnabled(!isView
);
417 this.jTextFieldC_Name
.setEnabled(!isView
);
418 this.jTextFieldGuid
.setEnabled(!isView
);
419 this.jComboBoxUsage
.setEnabled(!isView
);
420 this.jRadioButtonEnableFeature
.setEnabled(!isView
);
421 this.jRadioButtonDisableFeature
.setEnabled(!isView
);
422 this.jTextFieldFeatureFlag
.setEnabled(!isView
);
423 this.jTextFieldOverrideID
.setEnabled(!isView
);
424 this.jButtonGenerateGuid
.setEnabled(!isView
);
429 This method initializes jContentPane
431 @return javax.swing.JPanel jContentPane
434 private JPanel
getJContentPane() {
435 if (jContentPane
== null) {
436 jLabelProtocolType
= new JLabel();
437 jLabelProtocolType
.setBounds(new java
.awt
.Rectangle(15, 10, 140, 20));
438 jLabelProtocolType
.setText("Protocol Type");
439 jLabelOverrideID
= new JLabel();
440 jLabelOverrideID
.setBounds(new java
.awt
.Rectangle(15, 160, 140, 20));
441 jLabelOverrideID
.setText("Override ID");
442 jLabelEnableFeature
= new JLabel();
443 jLabelEnableFeature
.setText("Enable Feature");
444 jLabelEnableFeature
.setBounds(new java
.awt
.Rectangle(15, 110, 140, 20));
445 jLabelUsage
= new JLabel();
446 jLabelUsage
.setText("Usage");
447 jLabelUsage
.setBounds(new java
.awt
.Rectangle(15, 85, 140, 20));
448 jLabelFeatureFlag
= new JLabel();
449 jLabelFeatureFlag
.setText("Feature Flag");
450 jLabelFeatureFlag
.setBounds(new java
.awt
.Rectangle(15, 135, 140, 20));
451 jLabelGuid
= new JLabel();
452 jLabelGuid
.setText("Guid");
453 jLabelGuid
.setBounds(new java
.awt
.Rectangle(15, 60, 140, 20));
454 jLabelC_Name
= new JLabel();
455 jLabelC_Name
.setText("C_Name");
456 jLabelC_Name
.setBounds(new java
.awt
.Rectangle(15, 35, 140, 20));
457 jContentPane
= new JPanel();
458 jContentPane
.setLayout(null);
459 jContentPane
.add(jLabelC_Name
, null);
460 jContentPane
.add(getJTextFieldProtocolName(), null);
461 jContentPane
.add(jLabelGuid
, null);
462 jContentPane
.add(getJTextFieldGuid(), null);
463 jContentPane
.add(jLabelFeatureFlag
, null);
464 jContentPane
.add(getJTextFieldFeatureFlag(), null);
465 jContentPane
.add(getJButtonOk(), null);
466 jContentPane
.add(getJButtonCancel(), null);
467 jContentPane
.add(jLabelUsage
, null);
468 jContentPane
.add(getJComboBoxProtocolUsage(), null);
469 jContentPane
.add(jLabelEnableFeature
, null);
470 jContentPane
.add(getJRadioButtonEnableFeature(), null);
471 jContentPane
.add(getJRadioButtonDisableFeature(), null);
472 jContentPane
.add(getJRadioButtonProtocol(), null);
473 jContentPane
.add(getJRadioButtonProtocolNotify(), null);
474 jContentPane
.add(getJButtonGenerateGuid(), null);
475 jContentPane
.add(jLabelOverrideID
, null);
476 jContentPane
.add(getJTextFieldOverrideID(), null);
477 jContentPane
.add(jLabelProtocolType
, null);
479 jStarLabel1
= new StarLabel();
480 jStarLabel1
.setBounds(new java
.awt
.Rectangle(0, 10, 10, 20));
481 jStarLabel2
= new StarLabel();
482 jStarLabel2
.setBounds(new java
.awt
.Rectangle(0, 35, 10, 20));
484 jContentPane
.add(jStarLabel1
, null);
485 jContentPane
.add(jStarLabel2
, null);
491 This method initializes Usage type
494 private void initFrame() {
495 jComboBoxUsage
.addItem("ALWAYS_CONSUMED");
496 jComboBoxUsage
.addItem("SOMETIMES_CONSUMED");
497 jComboBoxUsage
.addItem("ALWAYS_PRODUCED");
498 jComboBoxUsage
.addItem("SOMETIMES_PRODUCED");
499 jComboBoxUsage
.addItem("TO_START");
500 jComboBoxUsage
.addItem("BY_START");
501 jComboBoxUsage
.addItem("PRIVATE");
505 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
507 * Override actionPerformed to listen all actions
510 public void actionPerformed(ActionEvent arg0
) {
511 if (arg0
.getSource() == jButtonOk
) {
512 this.setEdited(true);
516 if (arg0
.getSource() == jButtonCancel
) {
521 // Contorl the selected status when click RadionButton
522 // Do not use Radio Button Group
524 if (arg0
.getSource() == jRadioButtonProtocol
) {
525 if (jRadioButtonProtocol
.isSelected()) {
526 jRadioButtonProtocolNotify
.setSelected(false);
527 jRadioButtonEnableFeature
.setEnabled(true);
528 jRadioButtonDisableFeature
.setEnabled(true);
529 jTextFieldFeatureFlag
.setEnabled(true);
530 jComboBoxUsage
.setEnabled(true);
532 if (!jRadioButtonProtocolNotify
.isSelected() && !jRadioButtonProtocol
.isSelected()) {
533 jRadioButtonProtocol
.setSelected(true);
534 jRadioButtonEnableFeature
.setEnabled(true);
535 jRadioButtonDisableFeature
.setEnabled(true);
536 jTextFieldFeatureFlag
.setEnabled(true);
537 jComboBoxUsage
.setEnabled(true);
541 if (arg0
.getSource() == jRadioButtonProtocolNotify
) {
542 if (jRadioButtonProtocolNotify
.isSelected()) {
543 jRadioButtonProtocol
.setSelected(false);
544 jRadioButtonEnableFeature
.setEnabled(false);
545 jRadioButtonDisableFeature
.setEnabled(false);
546 jTextFieldFeatureFlag
.setEnabled(false);
547 jComboBoxUsage
.setSelectedIndex(1);
548 jComboBoxUsage
.setEnabled(false);
550 if (!jRadioButtonProtocolNotify
.isSelected() && !jRadioButtonProtocol
.isSelected()) {
551 jRadioButtonProtocolNotify
.setSelected(true);
552 jRadioButtonEnableFeature
.setEnabled(false);
553 jRadioButtonDisableFeature
.setEnabled(false);
554 jTextFieldFeatureFlag
.setEnabled(false);
555 jComboBoxUsage
.setSelectedIndex(1);
556 jComboBoxUsage
.setEnabled(false);
561 // Contorl the selected status when click RadionButton
562 // Do not use Radio Button Group
564 if (arg0
.getSource() == jRadioButtonEnableFeature
) {
565 if (jRadioButtonEnableFeature
.isSelected()) {
566 jRadioButtonDisableFeature
.setSelected(false);
568 if (!jRadioButtonDisableFeature
.isSelected() && !jRadioButtonEnableFeature
.isSelected()) {
569 jRadioButtonEnableFeature
.setSelected(true);
573 if (arg0
.getSource() == jRadioButtonDisableFeature
) {
574 if (jRadioButtonDisableFeature
.isSelected()) {
575 jRadioButtonEnableFeature
.setSelected(false);
577 if (!jRadioButtonDisableFeature
.isSelected() && !jRadioButtonEnableFeature
.isSelected()) {
578 jRadioButtonDisableFeature
.setSelected(true);
582 if (arg0
.getSource() == jButtonGenerateGuid
) {
583 jTextFieldGuid
.setText(Tools
.generateUuidString());
588 Get ProtocolsDocument.Protocols
590 @return ProtocolsDocument.Protocols
593 public ProtocolsDocument
.Protocols
getProtocols() {
598 Set ProtocolsDocument.Protocols
600 @param protocols The input data of ProtocolsDocument.Protocols
603 public void setProtocols(ProtocolsDocument
.Protocols protocols
) {
604 this.protocols
= protocols
;
608 Data validation for all fields
610 @retval true - All datas are valid
611 @retval false - At least one data is invalid
614 public boolean check() {
616 // Check if all required fields are not empty
618 if (isEmpty(this.jTextFieldC_Name
.getText())) {
619 Log
.err("C_Name couldn't be empty");
624 // Check if all fields have correct data types
626 if (!DataValidation
.isCName(this.jTextFieldC_Name
.getText())) {
627 Log
.err("Incorrect data type for C_Name");
630 if (!isEmpty(this.jTextFieldGuid
.getText()) && !DataValidation
.isGuid(this.jTextFieldGuid
.getText())) {
631 Log
.err("Incorrect data type for Guid");
634 if (!isEmpty(this.jTextFieldFeatureFlag
.getText())
635 && !DataValidation
.isFeatureFlag(this.jTextFieldFeatureFlag
.getText())) {
636 Log
.err("Incorrect data type for Feature Flag");
639 if (!isEmpty(this.jTextFieldOverrideID
.getText())
640 && !DataValidation
.isOverrideID(this.jTextFieldOverrideID
.getText())) {
641 Log
.err("Incorrect data type for Override ID");
649 Save all components of Protocols
650 if exists protocols, set the value directly
651 if not exists protocols, new an instance first
656 if (this.protocols
== null) {
657 protocols
= ProtocolsDocument
.Protocols
.Factory
.newInstance();
659 if (this.jRadioButtonProtocol
.isSelected()) {
660 ProtocolsDocument
.Protocols
.Protocol protocol
= ProtocolsDocument
.Protocols
.Protocol
.Factory
662 protocol
.setStringValue(this.jTextFieldC_Name
.getText());
663 if (!isEmpty(this.jTextFieldGuid
.getText())) {
664 protocol
.setGuid(this.jTextFieldGuid
.getText());
666 protocol
.setUsage(ProtocolUsage
.Enum
.forString(jComboBoxUsage
.getSelectedItem().toString()));
667 protocol
.setEnableFeature(this.jRadioButtonEnableFeature
.isSelected());
668 if (!isEmpty(this.jTextFieldFeatureFlag
.getText())) {
669 protocol
.setFeatureFlag(this.jTextFieldFeatureFlag
.getText());
671 if (!isEmpty(this.jTextFieldOverrideID
.getText())) {
672 protocol
.setOverrideID(Integer
.parseInt(this.jTextFieldOverrideID
.getText()));
675 protocols
.setProtocolArray(location
, protocol
);
677 protocols
.addNewProtocol();
678 protocols
.setProtocolArray(protocols
.getProtocolList().size() - 1, protocol
);
681 if (this.jRadioButtonProtocolNotify
.isSelected()) {
682 ProtocolsDocument
.Protocols
.ProtocolNotify protocolNofity
= ProtocolsDocument
.Protocols
.ProtocolNotify
.Factory
684 protocolNofity
.setStringValue(this.jTextFieldC_Name
.getText());
685 if (!isEmpty(this.jTextFieldGuid
.getText())) {
686 protocolNofity
.setGuid(this.jTextFieldGuid
.getText());
689 .setUsage(ProtocolNotifyUsage
.Enum
.forString(jComboBoxUsage
.getSelectedItem().toString()));
691 if (!isEmpty(this.jTextFieldOverrideID
.getText())) {
692 protocolNofity
.setOverrideID(Integer
.parseInt(this.jTextFieldOverrideID
.getText()));
695 protocols
.setProtocolNotifyArray(location
, protocolNofity
);
697 protocols
.addNewProtocolNotify();
698 protocols
.setProtocolNotifyArray(protocols
.getProtocolNotifyList().size() - 1, protocolNofity
);
701 } catch (Exception e
) {
702 Log
.err("Update Protocols", e
.getMessage());