847c26a4dc9c648db858ad06ce6ee61f05690b44
[jalview.git] / src / jalview / gui / OptsAndParamsPage.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.gui;
22
23 import jalview.util.MessageManager;
24 import jalview.ws.params.ArgumentI;
25 import jalview.ws.params.OptionI;
26 import jalview.ws.params.ParameterI;
27 import jalview.ws.params.ValueConstrainI;
28 import jalview.ws.params.ValueConstrainI.ValueType;
29
30 import java.awt.BorderLayout;
31 import java.awt.Component;
32 import java.awt.Dimension;
33 import java.awt.Font;
34 import java.awt.GridLayout;
35 import java.awt.Rectangle;
36 import java.awt.event.ActionEvent;
37 import java.awt.event.ActionListener;
38 import java.awt.event.KeyEvent;
39 import java.awt.event.KeyListener;
40 import java.awt.event.MouseEvent;
41 import java.awt.event.MouseListener;
42 import java.net.URL;
43 import java.util.ArrayList;
44 import java.util.Hashtable;
45 import java.util.List;
46 import java.util.Map;
47
48 import javax.swing.JButton;
49 import javax.swing.JCheckBox;
50 import javax.swing.JComboBox;
51 import javax.swing.JComponent;
52 import javax.swing.JLabel;
53 import javax.swing.JMenuItem;
54 import javax.swing.JPanel;
55 import javax.swing.JPopupMenu;
56 import javax.swing.JScrollPane;
57 import javax.swing.JSlider;
58 import javax.swing.JTextArea;
59 import javax.swing.JTextField;
60 import javax.swing.border.TitledBorder;
61 import javax.swing.event.ChangeEvent;
62 import javax.swing.event.ChangeListener;
63
64 import net.miginfocom.swing.MigLayout;
65
66 /**
67  * GUI generator/manager for options and parameters. Originally abstracted from
68  * the WsJobParameters dialog box.
69  * 
70  * @author jprocter
71  * 
72  */
73 public class OptsAndParamsPage
74 {
75   /**
76    * compact or verbose style parameters
77    */
78   boolean compact = false;
79
80   public class OptionBox extends JPanel implements MouseListener,
81           ActionListener
82   {
83     JCheckBox enabled = new JCheckBox();
84
85     final URL finfo;
86
87     boolean hasLink = false;
88
89     boolean initEnabled = false;
90
91     String initVal = null;
92
93     OptionI option;
94
95     JLabel optlabel = new JLabel();
96
97     JComboBox val = new JComboBox();
98
99     public OptionBox(OptionI opt)
100     {
101       option = opt;
102       setLayout(new BorderLayout());
103       enabled.setSelected(opt.isRequired()); // TODO: lock required options
104       enabled.setFont(new Font("Verdana", Font.PLAIN, 11));
105       enabled.setText("");
106       enabled.setText(opt.getName());
107       enabled.addActionListener(this);
108       finfo = option.getFurtherDetails();
109       String desc = opt.getDescription();
110       if (finfo != null)
111       {
112         hasLink = true;
113
114         enabled.setToolTipText("<html>"
115                 + JvSwingUtils
116                         .wrapTooltip(((desc == null || desc.trim().length() == 0) ? "see further details by right-clicking"
117                                 : desc)
118                                 + "<br><img src=\"" + linkImageURL + "\"/>")
119                 + "</html>");
120         enabled.addMouseListener(this);
121       }
122       else
123       {
124         if (desc != null && desc.trim().length() > 0)
125         {
126           enabled.setToolTipText("<html>"
127                   + JvSwingUtils.wrapTooltip(opt.getDescription())
128                   + "</html>");
129         }
130       }
131       add(enabled, BorderLayout.NORTH);
132       for (Object str : opt.getPossibleValues())
133       {
134         val.addItem((String) str);
135       }
136       val.setSelectedItem((String) opt.getValue());
137       if (opt.getPossibleValues().size() > 1)
138       {
139         setLayout(new GridLayout(1, 2));
140         val.addActionListener(this);
141         add(val, BorderLayout.SOUTH);
142       }
143       // TODO: add actionListeners for popup (to open further info),
144       // and to update list of parameters if an option is enabled
145       // that takes a value. JBPNote: is this TODO still valid ?
146       setInitialValue();
147     }
148
149     public void actionPerformed(ActionEvent e)
150     {
151       if (e.getSource() != enabled)
152       {
153         enabled.setSelected(true);
154       }
155       checkIfModified();
156     }
157
158     private void checkIfModified()
159     {
160       boolean notmod = (initEnabled == enabled.isSelected());
161       if (enabled.isSelected())
162       {
163         if (initVal != null)
164         {
165           notmod &= initVal.equals(val.getSelectedItem());
166         }
167         else
168         {
169           // compare against default service setting
170           notmod &= option.getValue() == null
171                   || option.getValue().equals(val.getSelectedItem());
172         }
173       }
174       else
175       {
176         notmod &= (initVal != null) ? initVal.equals(val.getSelectedItem())
177                 : val.getSelectedItem() != initVal;
178       }
179       poparent.argSetModified(this, !notmod);
180     }
181
182     public OptionI getOptionIfEnabled()
183     {
184       if (!enabled.isSelected())
185       {
186         return null;
187       }
188       OptionI opt = option.copy();
189       if (opt.getPossibleValues() != null
190               && opt.getPossibleValues().size() == 1)
191       {
192         // Hack to make sure the default value for an enabled option with only
193         // one value is actually returned
194         opt.setValue(opt.getPossibleValues().get(0));
195       }
196       if (val.getSelectedItem() != null)
197       {
198         opt.setValue((String) val.getSelectedItem());
199       }
200       else
201       {
202         if (option.getValue() != null)
203         {
204           opt.setValue(option.getValue());
205         }
206       }
207       return opt;
208     }
209
210     public void mouseClicked(MouseEvent e)
211     {
212       if (javax.swing.SwingUtilities.isRightMouseButton(e))
213       {
214         showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
215       }
216     }
217
218     public void mouseEntered(MouseEvent e)
219     {
220       // TODO Auto-generated method stub
221
222     }
223
224     public void mouseExited(MouseEvent e)
225     {
226       // TODO Auto-generated method stub
227
228     }
229
230     public void mousePressed(MouseEvent e)
231     {
232       // TODO Auto-generated method stub
233
234     }
235
236     public void mouseReleased(MouseEvent e)
237     {
238       // TODO Auto-generated method stub
239
240     }
241
242     public void resetToDefault(boolean setDefaultParams)
243     {
244       enabled.setSelected(false);
245       if (option.isRequired()
246               || (setDefaultParams && option.getValue() != null))
247       {
248         // Apply default value
249         selectOption(option, option.getValue());
250       }
251     }
252
253     public void setInitialValue()
254     {
255       initEnabled = enabled.isSelected();
256       if (option.getPossibleValues() != null
257               && option.getPossibleValues().size() > 1)
258       {
259         initVal = (String) val.getSelectedItem();
260       }
261       else
262       {
263         initVal = (initEnabled) ? (String) val.getSelectedItem() : null;
264       }
265     }
266
267   }
268
269   public class ParamBox extends JPanel implements ChangeListener,
270           ActionListener, MouseListener
271   {
272     boolean adjusting = false;
273
274     boolean choice = false;
275
276     JComboBox choicebox;
277
278     JPanel controlPanel = new JPanel();
279
280     boolean descisvisible = false;
281
282     JScrollPane descPanel = new JScrollPane();
283
284     final URL finfo;
285
286     boolean integ = false;
287
288     Object lastVal;
289
290     ParameterI parameter;
291
292     final OptsParametersContainerI pmdialogbox;
293
294     JPanel settingPanel = new JPanel();
295
296     JButton showDesc = new JButton();
297
298     JSlider slider = null;
299
300     JTextArea string = new JTextArea();
301
302     ValueConstrainI validator = null;
303
304     JTextField valueField = null;
305
306     public ParamBox(final OptsParametersContainerI pmlayout, ParameterI parm)
307     {
308       pmdialogbox = pmlayout;
309       finfo = parm.getFurtherDetails();
310       validator = parm.getValidValue();
311       parameter = parm;
312       if (validator != null)
313       {
314         integ = validator.getType() == ValueType.Integer;
315       }
316       else
317       {
318         if (parameter.getPossibleValues() != null)
319         {
320           choice = true;
321         }
322       }
323
324       if (!compact)
325       {
326         makeExpanderParam(parm);
327       }
328       else
329       {
330         makeCompactParam(parm);
331
332       }
333     }
334
335     private void makeCompactParam(ParameterI parm)
336     {
337       setLayout(new MigLayout("", "[][grow]"));
338
339       String ttipText = null;
340
341       controlPanel.setLayout(new BorderLayout());
342
343       if (parm.getDescription() != null
344               && parm.getDescription().trim().length() > 0)
345       {
346         // Only create description boxes if there actually is a description.
347         ttipText = ("<html>"
348                 + JvSwingUtils
349                         .wrapTooltip(parm.getDescription()
350                                 + (finfo != null ? "<br><img src=\""
351                                         + linkImageURL
352                                         + "\"/> Right click for further information."
353                                         : "")) + "</html>");
354       }
355
356       JvSwingUtils.mgAddtoLayout(this, ttipText,
357               new JLabel(parm.getName()), controlPanel, "");
358       updateControls(parm);
359       validate();
360     }
361
362     private void makeExpanderParam(ParameterI parm)
363     {
364       setPreferredSize(new Dimension(PARAM_WIDTH, PARAM_CLOSEDHEIGHT));
365       setBorder(new TitledBorder(parm.getName()));
366       setLayout(null);
367       showDesc.setFont(new Font("Verdana", Font.PLAIN, 6));
368       showDesc.setText("+");
369       string.setFont(new Font("Verdana", Font.PLAIN, 11));
370       string.setBackground(getBackground());
371
372       string.setEditable(false);
373       descPanel.getViewport().setView(string);
374
375       descPanel.setVisible(false);
376
377       JPanel firstrow = new JPanel();
378       firstrow.setLayout(null);
379       controlPanel.setLayout(new BorderLayout());
380       controlPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH - 70,
381               PARAM_CLOSEDHEIGHT - 50));
382       firstrow.add(controlPanel);
383       firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30,
384               PARAM_CLOSEDHEIGHT - 30));
385
386       final ParamBox me = this;
387
388       if (parm.getDescription() != null
389               && parm.getDescription().trim().length() > 0)
390       {
391         // Only create description boxes if there actually is a description.
392         if (finfo != null)
393         {
394           showDesc.setToolTipText("<html>"
395                   + JvSwingUtils
396                           .wrapTooltip("Click to show brief description<br><img src=\""
397                                   + linkImageURL
398                                   + "\"/> Right click for further information.")
399                   + "</html>");
400           showDesc.addMouseListener(this);
401         }
402         else
403         {
404           showDesc.setToolTipText("<html>"
405                   + JvSwingUtils
406                           .wrapTooltip("Click to show brief description.")
407                   + "</html>");
408         }
409         showDesc.addActionListener(new ActionListener()
410         {
411
412           public void actionPerformed(ActionEvent e)
413           {
414             descisvisible = !descisvisible;
415             descPanel.setVisible(descisvisible);
416             descPanel.getVerticalScrollBar().setValue(0);
417             me.setPreferredSize(new Dimension(PARAM_WIDTH,
418                     (descisvisible) ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT));
419             me.validate();
420             pmdialogbox.refreshParamLayout();
421           }
422         });
423         string.setWrapStyleWord(true);
424         string.setLineWrap(true);
425         string.setColumns(32);
426         string.setText(parm.getDescription());
427         showDesc.setBounds(new Rectangle(10, 10, 16, 16));
428         firstrow.add(showDesc);
429       }
430       add(firstrow);
431       validator = parm.getValidValue();
432       parameter = parm;
433       if (validator != null)
434       {
435         integ = validator.getType() == ValueType.Integer;
436       }
437       else
438       {
439         if (parameter.getPossibleValues() != null)
440         {
441           choice = true;
442         }
443       }
444       updateControls(parm);
445       descPanel.setBounds(new Rectangle(10, PARAM_CLOSEDHEIGHT,
446               PARAM_WIDTH - 20, PARAM_HEIGHT - PARAM_CLOSEDHEIGHT - 5));
447       add(descPanel);
448       validate();
449     }
450
451     public void actionPerformed(ActionEvent e)
452     {
453       if (adjusting)
454       {
455         return;
456       }
457       if (!choice)
458       {
459         updateSliderFromValueField();
460       }
461       checkIfModified();
462     }
463
464     private void checkIfModified()
465     {
466       Object cstate = updateSliderFromValueField();
467       boolean notmod = false;
468       if (cstate.getClass() == lastVal.getClass())
469       {
470         if (cstate instanceof int[])
471         {
472           notmod = (((int[]) cstate)[0] == ((int[]) lastVal)[0]);
473         }
474         else if (cstate instanceof float[])
475         {
476           notmod = (((float[]) cstate)[0] == ((float[]) lastVal)[0]);
477         }
478         else if (cstate instanceof String[])
479         {
480           notmod = (((String[]) cstate)[0].equals(((String[]) lastVal)[0]));
481         }
482       }
483       pmdialogbox.argSetModified(this, !notmod);
484     }
485
486     @Override
487     public int getBaseline(int width, int height)
488     {
489       return 0;
490     }
491
492     // from
493     // http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout
494     // helpful hint of using the Java 1.6 alignBaseLine property of FlowLayout
495     @Override
496     public Component.BaselineResizeBehavior getBaselineResizeBehavior()
497     {
498       return Component.BaselineResizeBehavior.CONSTANT_ASCENT;
499     }
500
501     public int getBoxHeight()
502     {
503       return (descisvisible ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT);
504     }
505
506     public ParameterI getParameter()
507     {
508       ParameterI prm = parameter.copy();
509       if (choice)
510       {
511         prm.setValue((String) choicebox.getSelectedItem());
512       }
513       else
514       {
515         prm.setValue(valueField.getText());
516       }
517       return prm;
518     }
519
520     public void init()
521     {
522       // reset the widget's initial value.
523       lastVal = null;
524     }
525
526     public void mouseClicked(MouseEvent e)
527     {
528       if (javax.swing.SwingUtilities.isRightMouseButton(e))
529       {
530         showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
531       }
532     }
533
534     public void mouseEntered(MouseEvent e)
535     {
536       // TODO Auto-generated method stub
537
538     }
539
540     public void mouseExited(MouseEvent e)
541     {
542       // TODO Auto-generated method stub
543
544     }
545
546     public void mousePressed(MouseEvent e)
547     {
548       // TODO Auto-generated method stub
549
550     }
551
552     public void mouseReleased(MouseEvent e)
553     {
554       // TODO Auto-generated method stub
555
556     }
557
558     public void stateChanged(ChangeEvent e)
559     {
560       if (!adjusting)
561       {
562         valueField.setText(""
563                 + ((integ) ? ("" + (int) slider.getValue())
564                         : ("" + (float) (slider.getValue() / 1000f))));
565         checkIfModified();
566       }
567
568     }
569
570     public void updateControls(ParameterI parm)
571     {
572       adjusting = true;
573       boolean init = (choicebox == null && valueField == null);
574       if (init)
575       {
576         if (choice)
577         {
578           choicebox = new JComboBox();
579           choicebox.addActionListener(this);
580           controlPanel.add(choicebox, BorderLayout.CENTER);
581         }
582         else
583         {
584           slider = new JSlider();
585           slider.addChangeListener(this);
586           valueField = new JTextField();
587           valueField.addActionListener(this);
588           valueField.addKeyListener(new KeyListener()
589           {
590
591             @Override
592             public void keyTyped(KeyEvent e)
593             {
594             }
595
596             @Override
597             public void keyReleased(KeyEvent e)
598             {
599               if (e.isActionKey())
600               {
601                 if (valueField.getText().trim().length() > 0)
602                 {
603                   actionPerformed(null);
604                 }
605               }
606             }
607
608             @Override
609             public void keyPressed(KeyEvent e)
610             {
611             }
612           });
613           valueField.setPreferredSize(new Dimension(60, 25));
614           controlPanel.add(slider, BorderLayout.WEST);
615           controlPanel.add(valueField, BorderLayout.EAST);
616
617         }
618       }
619
620       if (parm != null)
621       {
622         if (choice)
623         {
624           if (init)
625           {
626             List vals = parm.getPossibleValues();
627             for (Object val : vals)
628             {
629               choicebox.addItem(val);
630             }
631           }
632
633           if (parm.getValue() != null)
634           {
635             choicebox.setSelectedItem(parm.getValue());
636           }
637         }
638         else
639         {
640           valueField.setText(parm.getValue());
641         }
642       }
643       lastVal = updateSliderFromValueField();
644       adjusting = false;
645     }
646
647     public Object updateSliderFromValueField()
648     {
649       int iVal;
650       float fVal;
651       if (validator != null)
652       {
653         if (integ)
654         {
655           iVal = 0;
656           try
657           {
658             valueField.setText(valueField.getText().trim());
659             iVal = Integer.valueOf(valueField.getText());
660             if (validator.getMin() != null
661                     && validator.getMin().intValue() > iVal)
662             {
663               iVal = validator.getMin().intValue();
664               // TODO: provide visual indication that hard limit was reached for
665               // this parameter
666             }
667             if (validator.getMax() != null
668                     && validator.getMax().intValue() < iVal)
669             {
670               iVal = validator.getMax().intValue();
671               // TODO: provide visual indication that hard limit was reached for
672               // this parameter
673             }
674           } catch (Exception e)
675           {
676           }
677           ;
678           // update value field to reflect any bound checking we performed.
679           valueField.setText("" + iVal);
680           if (validator.getMin() != null && validator.getMax() != null)
681           {
682             slider.getModel().setRangeProperties(iVal, 1,
683                     validator.getMin().intValue(),
684                     validator.getMax().intValue() + 1, true);
685           }
686           else
687           {
688             slider.setVisible(false);
689           }
690           return new int[]
691           { iVal };
692         }
693         else
694         {
695           fVal = 0f;
696           try
697           {
698             valueField.setText(valueField.getText().trim());
699             fVal = Float.valueOf(valueField.getText());
700             if (validator.getMin() != null
701                     && validator.getMin().floatValue() > fVal)
702             {
703               fVal = validator.getMin().floatValue();
704               // TODO: provide visual indication that hard limit was reached for
705               // this parameter
706               // update value field to reflect any bound checking we performed.
707               valueField.setText("" + fVal);
708             }
709             if (validator.getMax() != null
710                     && validator.getMax().floatValue() < fVal)
711             {
712               fVal = validator.getMax().floatValue();
713               // TODO: provide visual indication that hard limit was reached for
714               // this parameter
715               // update value field to reflect any bound checking we performed.
716               valueField.setText("" + fVal);
717             }
718           } catch (Exception e)
719           {
720           }
721           ;
722           if (validator.getMin() != null && validator.getMax() != null)
723           {
724             slider.getModel().setRangeProperties((int) (fVal * 1000f), 1,
725                     (int) (validator.getMin().floatValue() * 1000f),
726                     1 + (int) (validator.getMax().floatValue() * 1000f),
727                     true);
728           }
729           else
730           {
731             slider.setVisible(false);
732           }
733           return new float[]
734           { fVal };
735         }
736       }
737       else
738       {
739         if (!choice)
740         {
741           slider.setVisible(false);
742           return new String[]
743           { valueField.getText().trim() };
744         }
745         else
746         {
747           return new String[]
748           { (String) choicebox.getSelectedItem() };
749         }
750       }
751
752     }
753   }
754
755   public static final int PARAM_WIDTH = 340;
756
757   public static final int PARAM_HEIGHT = 150;
758
759   public static final int PARAM_CLOSEDHEIGHT = 80;
760
761   public OptsAndParamsPage(OptsParametersContainerI paramContainer)
762   {
763     this(paramContainer, false);
764   }
765
766   public OptsAndParamsPage(OptsParametersContainerI paramContainer,
767           boolean compact)
768   {
769     poparent = paramContainer;
770     this.compact = compact;
771   }
772
773   public static void showUrlPopUp(JComponent invoker, final String finfo,
774           int x, int y)
775   {
776
777     JPopupMenu mnu = new JPopupMenu();
778     JMenuItem mitem = new JMenuItem(MessageManager.formatMessage(
779             "label.view_params", new String[]
780             { finfo }));
781     mitem.addActionListener(new ActionListener()
782     {
783
784       @Override
785       public void actionPerformed(ActionEvent e)
786       {
787         Desktop.showUrl(finfo);
788
789       }
790     });
791     mnu.add(mitem);
792     mnu.show(invoker, x, y);
793   }
794
795   URL linkImageURL = getClass().getResource("/images/link.gif");
796
797   Map<String, OptionBox> optSet = new java.util.LinkedHashMap<String, OptionBox>();
798
799   Map<String, ParamBox> paramSet = new java.util.LinkedHashMap<String, ParamBox>();
800
801   public Map<String, OptionBox> getOptSet()
802   {
803     return optSet;
804   }
805
806   public void setOptSet(Map<String, OptionBox> optSet)
807   {
808     this.optSet = optSet;
809   }
810
811   public Map<String, ParamBox> getParamSet()
812   {
813     return paramSet;
814   }
815
816   public void setParamSet(Map<String, ParamBox> paramSet)
817   {
818     this.paramSet = paramSet;
819   }
820
821   OptsParametersContainerI poparent;
822
823   OptionBox addOption(OptionI opt)
824   {
825     OptionBox cb = optSet.get(opt.getName());
826     if (cb == null)
827     {
828       cb = new OptionBox(opt);
829       optSet.put(opt.getName(), cb);
830       // jobOptions.add(cb, FlowLayout.LEFT);
831     }
832     return cb;
833   }
834
835   ParamBox addParameter(ParameterI arg)
836   {
837     ParamBox pb = paramSet.get(arg.getName());
838     if (pb == null)
839     {
840       pb = new ParamBox(poparent, arg);
841       paramSet.put(arg.getName(), pb);
842       // paramList.add(pb);
843     }
844     pb.init();
845     // take the defaults from the parameter
846     pb.updateControls(arg);
847     return pb;
848   }
849
850   void selectOption(OptionI option, String string)
851   {
852     OptionBox cb = optSet.get(option.getName());
853     if (cb == null)
854     {
855       cb = addOption(option);
856     }
857     cb.enabled.setSelected(string != null); // initial state for an option.
858     if (string != null)
859     {
860       if (option.getPossibleValues().contains(string))
861       {
862         cb.val.setSelectedItem(string);
863       }
864       else
865       {
866         throw new Error("Invalid value " + string + " for option " + option);
867       }
868
869     }
870     if (option.isRequired() && !cb.enabled.isSelected())
871     {
872       // TODO: indicate paramset is not valid.. option needs to be selected!
873     }
874     cb.setInitialValue();
875   }
876
877   void setParameter(ParameterI arg)
878   {
879     ParamBox pb = paramSet.get(arg.getName());
880     if (pb == null)
881     {
882       addParameter(arg);
883     }
884     else
885     {
886       pb.updateControls(arg);
887     }
888
889   }
890
891   /**
892    * recover options and parameters from GUI
893    * 
894    * @return
895    */
896   public List<ArgumentI> getCurrentSettings()
897   {
898     List<ArgumentI> argSet = new ArrayList<ArgumentI>();
899     for (OptionBox opts : getOptSet().values())
900     {
901       OptionI opt = opts.getOptionIfEnabled();
902       if (opt != null)
903       {
904         argSet.add(opt);
905       }
906     }
907     for (ParamBox parambox : getParamSet().values())
908     {
909       ParameterI parm = parambox.getParameter();
910       if (parm != null)
911       {
912         argSet.add(parm);
913       }
914     }
915
916     return argSet;
917   }
918
919 }