3 The file is used to create, update Ppi 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.
15 package org
.tianocore
.packaging
.module
.ui
;
17 import java
.awt
.event
.ActionEvent
;
19 import javax
.swing
.JButton
;
20 import javax
.swing
.JComboBox
;
21 import javax
.swing
.JLabel
;
22 import javax
.swing
.JPanel
;
23 import javax
.swing
.JRadioButton
;
24 import javax
.swing
.JTextField
;
26 import org
.tianocore
.PPIsDocument
;
27 import org
.tianocore
.PpiNotifyUsage
;
28 import org
.tianocore
.PpiUsage
;
29 import org
.tianocore
.common
.DataValidation
;
30 import org
.tianocore
.common
.Log
;
31 import org
.tianocore
.common
.Tools
;
32 import org
.tianocore
.packaging
.common
.ui
.IDefaultMutableTreeNode
;
33 import org
.tianocore
.packaging
.common
.ui
.IInternalFrame
;
34 import org
.tianocore
.packaging
.common
.ui
.StarLabel
;
37 The class is used to create, update Ppi of MSA/MBD file
38 It extends IInternalFrame
40 @since ModuleEditor 1.0
43 public class ModulePpis
extends IInternalFrame
{
46 /// Define class Serial Version UID
48 private static final long serialVersionUID
= -4284901202357037724L;
51 //Define class members
53 private PPIsDocument
.PPIs ppis
= null;
55 private int location
= -1;
57 private static int PPI
= 1;
59 private static int PPI_NOTIFY
= 2;
61 private JPanel jContentPane
= null;
63 private JRadioButton jRadioButtonPpi
= null;
65 private JRadioButton jRadioButtonPpiNotify
= null;
67 private JLabel jLabelC_Name
= null;
69 private JTextField jTextFieldC_Name
= null;
71 private JLabel jLabelGuid
= null;
73 private JTextField jTextFieldGuid
= null;
75 private JTextField jTextFieldFeatureFlag
= null;
77 private JLabel jLabelFeatureFlag
= null;
79 private JLabel jLabelUsage
= null;
81 private JComboBox jComboBoxUsage
= null;
83 private JLabel jLabelEnableFeature
= null;
85 private JRadioButton jRadioButtonEnableFeature
= null;
87 private JRadioButton jRadioButtonDisableFeature
= null;
89 private JButton jButtonOk
= null;
91 private JButton jButtonCancel
= null;
93 private JLabel jLabelPpiType
= null;
95 private JButton jButtonGenerateGuid
= null;
97 private StarLabel jStarLabel1
= null;
99 private StarLabel jStarLabel2
= null;
101 private JLabel jLabelOverrideID
= null;
103 private JTextField jTextFieldOverrideID
= null;
106 This method initializes jRadioButtonPpi
108 @return javax.swing.JRadioButton jRadioButtonPpi
111 private JRadioButton
getJRadioButtonPpiType() {
112 if (jRadioButtonPpi
== null) {
113 jRadioButtonPpi
= new JRadioButton();
114 jRadioButtonPpi
.setText("Ppi");
115 jRadioButtonPpi
.setBounds(new java
.awt
.Rectangle(160, 10, 100, 20));
116 jRadioButtonPpi
.addActionListener(this);
117 jRadioButtonPpi
.setSelected(true);
119 return jRadioButtonPpi
;
123 This method initializes jRadioButtonPpiNotify
125 @return javax.swing.JRadioButton jRadioButtonPpiNotify
128 private JRadioButton
getJRadioButtonPpiNotify() {
129 if (jRadioButtonPpiNotify
== null) {
130 jRadioButtonPpiNotify
= new JRadioButton();
131 jRadioButtonPpiNotify
.setText("Ppi Notify");
132 jRadioButtonPpiNotify
.setBounds(new java
.awt
.Rectangle(320, 10, 100, 20));
133 jRadioButtonPpiNotify
.addActionListener(this);
135 return jRadioButtonPpiNotify
;
139 This method initializes jTextFieldC_Name
141 @return javax.swing.JTextField jTextFieldC_Name
144 private JTextField
getJTextFieldC_Name() {
145 if (jTextFieldC_Name
== null) {
146 jTextFieldC_Name
= new JTextField();
147 jTextFieldC_Name
.setBounds(new java
.awt
.Rectangle(160, 35, 320, 20));
149 return jTextFieldC_Name
;
153 This method initializes jTextFieldGuid
155 @return javax.swing.JTextField jTextFieldGuid
158 private JTextField
getJTextFieldGuid() {
159 if (jTextFieldGuid
== null) {
160 jTextFieldGuid
= new JTextField();
161 jTextFieldGuid
.setBounds(new java
.awt
.Rectangle(160, 60, 240, 20));
163 return jTextFieldGuid
;
167 This method initializes jTextFieldFeatureFlag
169 @return javax.swing.JTextField jTextFieldFeatureFlag
172 private JTextField
getJTextFieldFeatureFlag() {
173 if (jTextFieldFeatureFlag
== null) {
174 jTextFieldFeatureFlag
= new JTextField();
175 jTextFieldFeatureFlag
.setBounds(new java
.awt
.Rectangle(160, 135, 320, 20));
177 return jTextFieldFeatureFlag
;
181 This method initializes jComboBox
183 @return javax.swing.JComboBox jComboBoxUsage
186 private JComboBox
getJComboBox() {
187 if (jComboBoxUsage
== null) {
188 jComboBoxUsage
= new JComboBox();
189 jComboBoxUsage
.setBounds(new java
.awt
.Rectangle(160, 85, 320, 20));
191 return jComboBoxUsage
;
195 This method initializes jRadioButtonEnableFeature
197 @return javax.swing.JRadioButton jRadioButtonEnableFeature
200 private JRadioButton
getJRadioButtonEnableFeature() {
201 if (jRadioButtonEnableFeature
== null) {
202 jRadioButtonEnableFeature
= new JRadioButton();
203 jRadioButtonEnableFeature
.setText("Enable");
204 jRadioButtonEnableFeature
.setBounds(new java
.awt
.Rectangle(160, 110, 90, 20));
205 jRadioButtonEnableFeature
.addActionListener(this);
206 jRadioButtonEnableFeature
.setSelected(true);
208 return jRadioButtonEnableFeature
;
212 This method initializes jRadioButtonDisableFeature
214 @return javax.swing.JRadioButton jRadioButtonDisableFeature
217 private JRadioButton
getJRadioButtonDisableFeature() {
218 if (jRadioButtonDisableFeature
== null) {
219 jRadioButtonDisableFeature
= new JRadioButton();
220 jRadioButtonDisableFeature
.setText("Disable");
221 jRadioButtonDisableFeature
.setBounds(new java
.awt
.Rectangle(320, 110, 90, 20));
222 jRadioButtonDisableFeature
.addActionListener(this);
224 return jRadioButtonDisableFeature
;
228 This method initializes jButtonOk
230 @return javax.swing.JButton jButtonOk
233 private JButton
getJButtonOk() {
234 if (jButtonOk
== null) {
235 jButtonOk
= new JButton();
236 jButtonOk
.setText("OK");
237 jButtonOk
.setBounds(new java
.awt
.Rectangle(290, 190, 90, 20));
238 jButtonOk
.addActionListener(this);
244 This method initializes jButtonCancel
246 @return javax.swing.JButton jButtonCancel
249 private JButton
getJButtonCancel() {
250 if (jButtonCancel
== null) {
251 jButtonCancel
= new JButton();
252 jButtonCancel
.setText("Cancel");
253 jButtonCancel
.setBounds(new java
.awt
.Rectangle(390, 190, 90, 20));
254 jButtonCancel
.addActionListener(this);
256 return jButtonCancel
;
260 This method initializes jButtonGenerateGuid
262 @return javax.swing.JButton jButtonGenerateGuid
265 private JButton
getJButtonGenerateGuid() {
266 if (jButtonGenerateGuid
== null) {
267 jButtonGenerateGuid
= new JButton();
268 jButtonGenerateGuid
.setBounds(new java
.awt
.Rectangle(405, 60, 75, 20));
269 jButtonGenerateGuid
.setText("GEN");
270 jButtonGenerateGuid
.addActionListener(this);
272 return jButtonGenerateGuid
;
276 This method initializes jTextFieldOverrideID
278 @return javax.swing.JTextField jTextFieldOverrideID
281 private JTextField
getJTextFieldOverrideID() {
282 if (jTextFieldOverrideID
== null) {
283 jTextFieldOverrideID
= new JTextField();
284 jTextFieldOverrideID
.setBounds(new java
.awt
.Rectangle(160, 160, 320, 20));
286 return jTextFieldOverrideID
;
289 public static void main(String
[] args
) {
294 This is the default constructor
297 public ModulePpis() {
300 this.setVisible(true);
304 This is the override edit constructor
306 @param inPpis The input data of PPIsDocument.PPIs
309 public ModulePpis(PPIsDocument
.PPIs inPpis
) {
312 this.setVisible(true);
316 This is the override edit constructor
318 @param inPpis The input data of PPIsDocument.PPIs
319 @param type The input data of node type
320 @param index The input data of node index
323 public ModulePpis(PPIsDocument
.PPIs inPpis
, int type
, int index
) {
325 init(inPpis
, type
, index
);
326 this.setVisible(true);
330 This method initializes this
332 @param inPpis The input data of PPIsDocument.PPIs
335 private void init(PPIsDocument
.PPIs inPpis
) {
337 this.setPpis(inPpis
);
341 This method initializes this
342 Fill values to all fields if these values are not empty
344 @param inPpis The input data of PPIsDocument.PPIs
345 @param type The input data of node type
346 @param index The input data of node index
349 private void init(PPIsDocument
.PPIs inPpis
, int type
, int index
) {
351 this.location
= index
;
352 if (type
== IDefaultMutableTreeNode
.PPIS_PPI_ITEM
) {
353 initUsage(ModulePpis
.PPI
);
354 this.jRadioButtonPpi
.setSelected(true);
355 this.jRadioButtonPpiNotify
.setSelected(false);
356 if (this.ppis
.getPpiArray(index
).getStringValue() != null) {
357 this.jTextFieldC_Name
.setText(this.ppis
.getPpiArray(index
).getStringValue());
359 if (this.ppis
.getPpiArray(index
).getGuid() != null) {
360 this.jTextFieldGuid
.setText(this.ppis
.getPpiArray(index
).getGuid());
362 if (this.ppis
.getPpiArray(index
).getUsage() != null) {
363 this.jComboBoxUsage
.setSelectedItem(this.ppis
.getPpiArray(index
).getUsage().toString());
365 this.jRadioButtonEnableFeature
.setSelected(this.ppis
.getPpiArray(index
).getEnableFeature());
366 this.jRadioButtonDisableFeature
.setSelected(!this.ppis
.getPpiArray(index
).getEnableFeature());
367 if (this.ppis
.getPpiArray(index
).getFeatureFlag() != null) {
368 this.jTextFieldFeatureFlag
.setText(this.ppis
.getPpiArray(index
).getFeatureFlag());
370 this.jTextFieldOverrideID
.setText(String
.valueOf(this.ppis
.getPpiArray(index
).getOverrideID()));
371 } else if (type
== IDefaultMutableTreeNode
.PPIS_PPINOTIFY_ITEM
) {
372 initUsage(ModulePpis
.PPI_NOTIFY
);
373 this.jRadioButtonPpi
.setSelected(false);
374 this.jRadioButtonPpiNotify
.setSelected(true);
375 if (this.ppis
.getPpiNotifyArray(index
).getStringValue() != null) {
376 this.jTextFieldC_Name
.setText(this.ppis
.getPpiNotifyArray(index
).getStringValue());
378 if (this.ppis
.getPpiNotifyArray(index
).getGuid() != null) {
379 this.jTextFieldGuid
.setText(this.ppis
.getPpiNotifyArray(index
).getGuid());
381 if (this.ppis
.getPpiNotifyArray(index
).getUsage() != null) {
382 this.jComboBoxUsage
.setSelectedItem(this.ppis
.getPpiNotifyArray(index
).getUsage().toString());
384 this.jRadioButtonEnableFeature
.setSelected(this.ppis
.getPpiNotifyArray(index
).getEnableFeature());
385 this.jRadioButtonDisableFeature
.setSelected(!this.ppis
.getPpiNotifyArray(index
).getEnableFeature());
386 if (this.ppis
.getPpiNotifyArray(index
).getFeatureFlag() != null) {
387 this.jTextFieldFeatureFlag
.setText(this.ppis
.getPpiNotifyArray(index
).getFeatureFlag());
389 this.jTextFieldOverrideID
.setText(String
.valueOf(this.ppis
.getPpiNotifyArray(index
).getOverrideID()));
391 this.jRadioButtonPpi
.setEnabled(false);
392 this.jRadioButtonPpiNotify
.setEnabled(false);
396 This method initializes this
399 private void init() {
400 this.setContentPane(getJContentPane());
401 this.setTitle("Ppis");
402 this.setBounds(new java
.awt
.Rectangle(0, 0, 500, 515));
404 this.setViewMode(false);
408 Disable all components when the mode is view
410 @param isView true - The view mode; false - The non-view mode
413 public void setViewMode(boolean isView
) {
414 this.jButtonOk
.setVisible(false);
415 this.jButtonCancel
.setVisible(false);
417 this.jRadioButtonPpi
.setEnabled(!isView
);
418 this.jRadioButtonPpiNotify
.setEnabled(!isView
);
419 this.jTextFieldC_Name
.setEnabled(!isView
);
420 this.jTextFieldGuid
.setEnabled(!isView
);
421 this.jComboBoxUsage
.setEnabled(!isView
);
422 this.jRadioButtonEnableFeature
.setEnabled(!isView
);
423 this.jRadioButtonDisableFeature
.setEnabled(!isView
);
424 this.jTextFieldFeatureFlag
.setEnabled(!isView
);
425 this.jTextFieldOverrideID
.setEnabled(!isView
);
426 this.jButtonGenerateGuid
.setEnabled(!isView
);
431 This method initializes jContentPane
433 @return javax.swing.JPanel jContentPane
436 private JPanel
getJContentPane() {
437 if (jContentPane
== null) {
438 jLabelOverrideID
= new JLabel();
439 jLabelOverrideID
.setBounds(new java
.awt
.Rectangle(15, 160, 140, 20));
440 jLabelOverrideID
.setText("Override ID");
441 jLabelPpiType
= new JLabel();
442 jLabelPpiType
.setBounds(new java
.awt
.Rectangle(15, 10, 140, 20));
443 jLabelPpiType
.setText("Ppi Type");
444 jLabelEnableFeature
= new JLabel();
445 jLabelEnableFeature
.setText("Enable Feature");
446 jLabelEnableFeature
.setBounds(new java
.awt
.Rectangle(15, 110, 140, 20));
447 jLabelUsage
= new JLabel();
448 jLabelUsage
.setText("Usage");
449 jLabelUsage
.setBounds(new java
.awt
.Rectangle(15, 85, 140, 20));
450 jLabelFeatureFlag
= new JLabel();
451 jLabelFeatureFlag
.setText("Feature Flag");
452 jLabelFeatureFlag
.setBounds(new java
.awt
.Rectangle(15, 135, 140, 20));
453 jLabelGuid
= new JLabel();
454 jLabelGuid
.setText("Guid");
455 jLabelGuid
.setBounds(new java
.awt
.Rectangle(15, 60, 140, 20));
456 jLabelC_Name
= new JLabel();
457 jLabelC_Name
.setText("C_Name");
458 jLabelC_Name
.setBounds(new java
.awt
.Rectangle(15, 35, 140, 20));
459 jContentPane
= new JPanel();
460 jContentPane
.setLayout(null);
461 jContentPane
.add(getJRadioButtonPpiType(), null);
462 jContentPane
.add(jLabelC_Name
, null);
463 jContentPane
.add(getJTextFieldC_Name(), null);
464 jContentPane
.add(jLabelGuid
, null);
465 jContentPane
.add(getJTextFieldGuid(), null);
466 jContentPane
.add(getJTextFieldFeatureFlag(), null);
467 jContentPane
.add(jLabelFeatureFlag
, null);
468 jContentPane
.add(jLabelUsage
, null);
469 jContentPane
.add(getJComboBox(), null);
470 jContentPane
.add(jLabelEnableFeature
, null);
471 jContentPane
.add(getJRadioButtonEnableFeature(), null);
472 jContentPane
.add(getJRadioButtonDisableFeature(), null);
473 jContentPane
.add(getJButtonOk(), null);
474 jContentPane
.add(getJButtonCancel(), null);
475 jContentPane
.add(getJRadioButtonPpiNotify(), null);
476 jContentPane
.add(jLabelPpiType
, null);
477 jContentPane
.add(getJButtonGenerateGuid(), 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);
486 jContentPane
.add(jLabelOverrideID
, null);
487 jContentPane
.add(getJTextFieldOverrideID(), null);
493 This method initializes Usage type
496 private void initFrame() {
497 jComboBoxUsage
.addItem("ALWAYS_CONSUMED");
498 jComboBoxUsage
.addItem("SOMETIMES_CONSUMED");
499 jComboBoxUsage
.addItem("ALWAYS_PRODUCED");
500 jComboBoxUsage
.addItem("SOMETIMES_PRODUCED");
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() == jRadioButtonPpi
) {
525 if (jRadioButtonPpi
.isSelected()) {
526 jRadioButtonPpiNotify
.setSelected(false);
527 initUsage(ModulePpis
.PPI
);
529 if (!jRadioButtonPpiNotify
.isSelected() && !jRadioButtonPpi
.isSelected()) {
530 jRadioButtonPpi
.setSelected(true);
531 initUsage(ModulePpis
.PPI
);
535 if (arg0
.getSource() == jRadioButtonPpiNotify
) {
536 if (jRadioButtonPpiNotify
.isSelected()) {
537 jRadioButtonPpi
.setSelected(false);
538 initUsage(ModulePpis
.PPI_NOTIFY
);
540 if (!jRadioButtonPpiNotify
.isSelected() && !jRadioButtonPpi
.isSelected()) {
541 jRadioButtonPpiNotify
.setSelected(true);
542 initUsage(ModulePpis
.PPI_NOTIFY
);
547 //Contorl the selected status when click RadionButton
548 //Do not use Radio Button Group
550 if (arg0
.getSource() == jRadioButtonEnableFeature
) {
551 if (jRadioButtonEnableFeature
.isSelected()) {
552 jRadioButtonDisableFeature
.setSelected(false);
554 if (!jRadioButtonDisableFeature
.isSelected() && !jRadioButtonEnableFeature
.isSelected()) {
555 jRadioButtonEnableFeature
.setSelected(true);
559 if (arg0
.getSource() == jRadioButtonDisableFeature
) {
560 if (jRadioButtonDisableFeature
.isSelected()) {
561 jRadioButtonEnableFeature
.setSelected(false);
563 if (!jRadioButtonDisableFeature
.isSelected() && !jRadioButtonEnableFeature
.isSelected()) {
564 jRadioButtonDisableFeature
.setSelected(true);
568 if (arg0
.getSource() == jButtonGenerateGuid
) {
569 jTextFieldGuid
.setText(Tools
.generateUuidString());
574 Get PPIsDocument.PPIs
576 @return PPIsDocument.PPIs
579 public PPIsDocument
.PPIs
getPpis() {
584 Set PPIsDocument.PPIs
586 @param ppis The input data of PPIsDocument.PPIs
589 public void setPpis(PPIsDocument
.PPIs ppis
) {
594 Data validation for all fields
596 @retval true - All datas are valid
597 @retval false - At least one data is invalid
600 public boolean check() {
602 // Check if all required fields are not empty
604 if (isEmpty(this.jTextFieldC_Name
.getText())) {
605 Log
.err("C_Name couldn't be empty");
610 // Check if all fields have correct data types
612 if (!DataValidation
.isCName(this.jTextFieldC_Name
.getText())) {
613 Log
.err("Incorrect data type for C_Name");
616 if (!isEmpty(this.jTextFieldGuid
.getText()) && !DataValidation
.isGuid(this.jTextFieldGuid
.getText())) {
617 Log
.err("Incorrect data type for Guid");
620 if (!isEmpty(this.jTextFieldFeatureFlag
.getText())
621 && !DataValidation
.isFeatureFlag(this.jTextFieldFeatureFlag
.getText())) {
622 Log
.err("Incorrect data type for Feature Flag");
625 if (!isEmpty(this.jTextFieldOverrideID
.getText())
626 && !DataValidation
.isOverrideID(this.jTextFieldOverrideID
.getText())) {
627 Log
.err("Incorrect data type for Override ID");
635 Save all components of PPIs
636 if exists ppis, set the value directly
637 if not exists ppis, new an instance first
642 if (this.ppis
== null) {
643 ppis
= PPIsDocument
.PPIs
.Factory
.newInstance();
645 if (this.jRadioButtonPpi
.isSelected()) {
646 PPIsDocument
.PPIs
.Ppi ppi
= PPIsDocument
.PPIs
.Ppi
.Factory
.newInstance();
647 ppi
.setStringValue(this.jTextFieldC_Name
.getText());
648 if (!isEmpty(this.jTextFieldGuid
.getText())) {
649 ppi
.setGuid(this.jTextFieldGuid
.getText());
651 ppi
.setUsage(PpiUsage
.Enum
.forString(jComboBoxUsage
.getSelectedItem().toString()));
652 ppi
.setEnableFeature(this.jRadioButtonEnableFeature
.isSelected());
653 if (!isEmpty(this.jTextFieldFeatureFlag
.getText())) {
654 ppi
.setFeatureFlag(this.jTextFieldFeatureFlag
.getText());
656 if (!isEmpty(this.jTextFieldOverrideID
.getText())) {
657 ppi
.setOverrideID(Integer
.parseInt(this.jTextFieldOverrideID
.getText()));
660 ppis
.setPpiArray(location
, ppi
);
663 ppis
.setPpiArray(ppis
.getPpiList().size() - 1, ppi
);
666 if (this.jRadioButtonPpiNotify
.isSelected()) {
667 PPIsDocument
.PPIs
.PpiNotify ppiNotify
= PPIsDocument
.PPIs
.PpiNotify
.Factory
.newInstance();
668 ppiNotify
.setStringValue(this.jTextFieldC_Name
.getText());
669 if (!isEmpty(this.jTextFieldGuid
.getText())) {
670 ppiNotify
.setGuid(this.jTextFieldGuid
.getText());
672 ppiNotify
.setUsage(PpiNotifyUsage
.Enum
.forString(jComboBoxUsage
.getSelectedItem().toString()));
673 ppiNotify
.setEnableFeature(this.jRadioButtonEnableFeature
.isSelected());
674 if (!isEmpty(this.jTextFieldFeatureFlag
.getText())) {
675 ppiNotify
.setFeatureFlag(this.jTextFieldFeatureFlag
.getText());
677 if (!isEmpty(this.jTextFieldOverrideID
.getText())) {
678 ppiNotify
.setOverrideID(Integer
.parseInt(this.jTextFieldOverrideID
.getText()));
681 ppis
.setPpiNotifyArray(location
, ppiNotify
);
683 ppis
.addNewPpiNotify();
684 ppis
.setPpiNotifyArray(ppis
.getPpiNotifyList().size() - 1, ppiNotify
);
687 } catch (Exception e
) {
688 Log
.err("Update Protocols", e
.getMessage());
693 Enable/Disable relevant fields via different PPI types
695 @param intType The input data of PPI type
698 private void initUsage(int intType
) {
699 jComboBoxUsage
.removeAllItems();
700 if (intType
== ModulePpis
.PPI
) {
701 jComboBoxUsage
.addItem("ALWAYS_CONSUMED");
702 jComboBoxUsage
.addItem("SOMETIMES_CONSUMED");
703 jComboBoxUsage
.addItem("ALWAYS_PRODUCED");
704 jComboBoxUsage
.addItem("SOMETIMES_PRODUCED");
705 jComboBoxUsage
.addItem("PRIVATE");
707 if (intType
== ModulePpis
.PPI_NOTIFY
) {
708 jComboBoxUsage
.addItem("SOMETIMES_CONSUMED");