d2f04a19e67751aae87e39e9726e8402cf2738f0
[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(
115              JvSwingUtils
116                         .wrapTooltip(true, ((desc == null || desc.trim().length() == 0) ? MessageManager.getString("label.opt_and_params_further_details ")
117                                 : desc)
118                                 + "<br><img src=\"" + linkImageURL + "\"/>")
119                 );
120         enabled.addMouseListener(this);
121       }
122       else
123       {
124         if (desc != null && desc.trim().length() > 0)
125         {
126           enabled.setToolTipText(
127                    JvSwingUtils.wrapTooltip(true, opt.getDescription())
128                  );
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 = (JvSwingUtils
348                         .wrapTooltip(true, parm.getDescription()
349                                 + (finfo != null ? "<br><img src=\""
350                                         + linkImageURL
351                                         + "\"/>"+MessageManager.getString("label.opt_and_params_further_detail")
352                                         : "")));
353       }
354
355       JvSwingUtils.mgAddtoLayout(this, ttipText,
356               new JLabel(parm.getName()), controlPanel, "");
357       updateControls(parm);
358       validate();
359     }
360
361     private void makeExpanderParam(ParameterI parm)
362     {
363       setPreferredSize(new Dimension(PARAM_WIDTH, PARAM_CLOSEDHEIGHT));
364       setBorder(new TitledBorder(parm.getName()));
365       setLayout(null);
366       showDesc.setFont(new Font("Verdana", Font.PLAIN, 6));
367       showDesc.setText("+");
368       string.setFont(new Font("Verdana", Font.PLAIN, 11));
369       string.setBackground(getBackground());
370
371       string.setEditable(false);
372       descPanel.getViewport().setView(string);
373
374       descPanel.setVisible(false);
375
376       JPanel firstrow = new JPanel();
377       firstrow.setLayout(null);
378       controlPanel.setLayout(new BorderLayout());
379       controlPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH - 70,
380               PARAM_CLOSEDHEIGHT - 50));
381       firstrow.add(controlPanel);
382       firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30,
383               PARAM_CLOSEDHEIGHT - 30));
384
385       final ParamBox me = this;
386
387       if (parm.getDescription() != null
388               && parm.getDescription().trim().length() > 0)
389       {
390         // Only create description boxes if there actually is a description.
391         if (finfo != null)
392         {
393           showDesc.setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.formatMessage("label.opt_and_params_show_brief_desc_image_link", new String[]{linkImageURL.toExternalForm()})));
394           showDesc.addMouseListener(this);
395         }
396         else
397         {
398           showDesc.setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.opt_and_params_show_brief_desc")));
399         }
400         showDesc.addActionListener(new ActionListener()
401         {
402
403           public void actionPerformed(ActionEvent e)
404           {
405             descisvisible = !descisvisible;
406             descPanel.setVisible(descisvisible);
407             descPanel.getVerticalScrollBar().setValue(0);
408             me.setPreferredSize(new Dimension(PARAM_WIDTH,
409                     (descisvisible) ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT));
410             me.validate();
411             pmdialogbox.refreshParamLayout();
412           }
413         });
414         string.setWrapStyleWord(true);
415         string.setLineWrap(true);
416         string.setColumns(32);
417         string.setText(parm.getDescription());
418         showDesc.setBounds(new Rectangle(10, 10, 16, 16));
419         firstrow.add(showDesc);
420       }
421       add(firstrow);
422       validator = parm.getValidValue();
423       parameter = parm;
424       if (validator != null)
425       {
426         integ = validator.getType() == ValueType.Integer;
427       }
428       else
429       {
430         if (parameter.getPossibleValues() != null)
431         {
432           choice = true;
433         }
434       }
435       updateControls(parm);
436       descPanel.setBounds(new Rectangle(10, PARAM_CLOSEDHEIGHT,
437               PARAM_WIDTH - 20, PARAM_HEIGHT - PARAM_CLOSEDHEIGHT - 5));
438       add(descPanel);
439       validate();
440     }
441
442     public void actionPerformed(ActionEvent e)
443     {
444       if (adjusting)
445       {
446         return;
447       }
448       if (!choice)
449       {
450         updateSliderFromValueField();
451       }
452       checkIfModified();
453     }
454
455     private void checkIfModified()
456     {
457       Object cstate = updateSliderFromValueField();
458       boolean notmod = false;
459       if (cstate.getClass() == lastVal.getClass())
460       {
461         if (cstate instanceof int[])
462         {
463           notmod = (((int[]) cstate)[0] == ((int[]) lastVal)[0]);
464         }
465         else if (cstate instanceof float[])
466         {
467           notmod = (((float[]) cstate)[0] == ((float[]) lastVal)[0]);
468         }
469         else if (cstate instanceof String[])
470         {
471           notmod = (((String[]) cstate)[0].equals(((String[]) lastVal)[0]));
472         }
473       }
474       pmdialogbox.argSetModified(this, !notmod);
475     }
476
477     @Override
478     public int getBaseline(int width, int height)
479     {
480       return 0;
481     }
482
483     // from
484     // http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout
485     // helpful hint of using the Java 1.6 alignBaseLine property of FlowLayout
486     @Override
487     public Component.BaselineResizeBehavior getBaselineResizeBehavior()
488     {
489       return Component.BaselineResizeBehavior.CONSTANT_ASCENT;
490     }
491
492     public int getBoxHeight()
493     {
494       return (descisvisible ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT);
495     }
496
497     public ParameterI getParameter()
498     {
499       ParameterI prm = parameter.copy();
500       if (choice)
501       {
502         prm.setValue((String) choicebox.getSelectedItem());
503       }
504       else
505       {
506         prm.setValue(valueField.getText());
507       }
508       return prm;
509     }
510
511     public void init()
512     {
513       // reset the widget's initial value.
514       lastVal = null;
515     }
516
517     public void mouseClicked(MouseEvent e)
518     {
519       if (javax.swing.SwingUtilities.isRightMouseButton(e))
520       {
521         showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
522       }
523     }
524
525     public void mouseEntered(MouseEvent e)
526     {
527       // TODO Auto-generated method stub
528
529     }
530
531     public void mouseExited(MouseEvent e)
532     {
533       // TODO Auto-generated method stub
534
535     }
536
537     public void mousePressed(MouseEvent e)
538     {
539       // TODO Auto-generated method stub
540
541     }
542
543     public void mouseReleased(MouseEvent e)
544     {
545       // TODO Auto-generated method stub
546
547     }
548
549     public void stateChanged(ChangeEvent e)
550     {
551       if (!adjusting)
552       {
553         valueField.setText(""
554                 + ((integ) ? ("" + (int) slider.getValue())
555                         : ("" + (float) (slider.getValue() / 1000f))));
556         checkIfModified();
557       }
558
559     }
560
561     public void updateControls(ParameterI parm)
562     {
563       adjusting = true;
564       boolean init = (choicebox == null && valueField == null);
565       if (init)
566       {
567         if (choice)
568         {
569           choicebox = new JComboBox();
570           choicebox.addActionListener(this);
571           controlPanel.add(choicebox, BorderLayout.CENTER);
572         }
573         else
574         {
575           slider = new JSlider();
576           slider.addChangeListener(this);
577           valueField = new JTextField();
578           valueField.addActionListener(this);
579           valueField.addKeyListener(new KeyListener()
580           {
581
582             @Override
583             public void keyTyped(KeyEvent e)
584             {
585             }
586
587             @Override
588             public void keyReleased(KeyEvent e)
589             {
590               if (e.isActionKey())
591               {
592                 if (valueField.getText().trim().length() > 0)
593                 {
594                   actionPerformed(null);
595                 }
596               }
597             }
598
599             @Override
600             public void keyPressed(KeyEvent e)
601             {
602             }
603           });
604           valueField.setPreferredSize(new Dimension(60, 25));
605           controlPanel.add(slider, BorderLayout.WEST);
606           controlPanel.add(valueField, BorderLayout.EAST);
607
608         }
609       }
610
611       if (parm != null)
612       {
613         if (choice)
614         {
615           if (init)
616           {
617             List vals = parm.getPossibleValues();
618             for (Object val : vals)
619             {
620               choicebox.addItem(val);
621             }
622           }
623
624           if (parm.getValue() != null)
625           {
626             choicebox.setSelectedItem(parm.getValue());
627           }
628         }
629         else
630         {
631           valueField.setText(parm.getValue());
632         }
633       }
634       lastVal = updateSliderFromValueField();
635       adjusting = false;
636     }
637
638     public Object updateSliderFromValueField()
639     {
640       int iVal;
641       float fVal;
642       if (validator != null)
643       {
644         if (integ)
645         {
646           iVal = 0;
647           try
648           {
649             valueField.setText(valueField.getText().trim());
650             iVal = Integer.valueOf(valueField.getText());
651             if (validator.getMin() != null
652                     && validator.getMin().intValue() > iVal)
653             {
654               iVal = validator.getMin().intValue();
655               // TODO: provide visual indication that hard limit was reached for
656               // this parameter
657             }
658             if (validator.getMax() != null
659                     && validator.getMax().intValue() < iVal)
660             {
661               iVal = validator.getMax().intValue();
662               // TODO: provide visual indication that hard limit was reached for
663               // this parameter
664             }
665           } catch (Exception e)
666           {
667           }
668           ;
669           // update value field to reflect any bound checking we performed.
670           valueField.setText("" + iVal);
671           if (validator.getMin() != null && validator.getMax() != null)
672           {
673             slider.getModel().setRangeProperties(iVal, 1,
674                     validator.getMin().intValue(),
675                     validator.getMax().intValue() + 1, true);
676           }
677           else
678           {
679             slider.setVisible(false);
680           }
681           return new int[]
682           { iVal };
683         }
684         else
685         {
686           fVal = 0f;
687           try
688           {
689             valueField.setText(valueField.getText().trim());
690             fVal = Float.valueOf(valueField.getText());
691             if (validator.getMin() != null
692                     && validator.getMin().floatValue() > fVal)
693             {
694               fVal = validator.getMin().floatValue();
695               // TODO: provide visual indication that hard limit was reached for
696               // this parameter
697               // update value field to reflect any bound checking we performed.
698               valueField.setText("" + fVal);
699             }
700             if (validator.getMax() != null
701                     && validator.getMax().floatValue() < fVal)
702             {
703               fVal = validator.getMax().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           } catch (Exception e)
710           {
711           }
712           ;
713           if (validator.getMin() != null && validator.getMax() != null)
714           {
715             slider.getModel().setRangeProperties((int) (fVal * 1000f), 1,
716                     (int) (validator.getMin().floatValue() * 1000f),
717                     1 + (int) (validator.getMax().floatValue() * 1000f),
718                     true);
719           }
720           else
721           {
722             slider.setVisible(false);
723           }
724           return new float[]
725           { fVal };
726         }
727       }
728       else
729       {
730         if (!choice)
731         {
732           slider.setVisible(false);
733           return new String[]
734           { valueField.getText().trim() };
735         }
736         else
737         {
738           return new String[]
739           { (String) choicebox.getSelectedItem() };
740         }
741       }
742
743     }
744   }
745
746   public static final int PARAM_WIDTH = 340;
747
748   public static final int PARAM_HEIGHT = 150;
749
750   public static final int PARAM_CLOSEDHEIGHT = 80;
751
752   public OptsAndParamsPage(OptsParametersContainerI paramContainer)
753   {
754     this(paramContainer, false);
755   }
756
757   public OptsAndParamsPage(OptsParametersContainerI paramContainer,
758           boolean compact)
759   {
760     poparent = paramContainer;
761     this.compact = compact;
762   }
763
764   public static void showUrlPopUp(JComponent invoker, final String finfo,
765           int x, int y)
766   {
767
768     JPopupMenu mnu = new JPopupMenu();
769     JMenuItem mitem = new JMenuItem(MessageManager.formatMessage(
770             "label.view_params", new String[]
771             { finfo }));
772     mitem.addActionListener(new ActionListener()
773     {
774
775       @Override
776       public void actionPerformed(ActionEvent e)
777       {
778         Desktop.showUrl(finfo);
779
780       }
781     });
782     mnu.add(mitem);
783     mnu.show(invoker, x, y);
784   }
785
786   URL linkImageURL = getClass().getResource("/images/link.gif");
787
788   Map<String, OptionBox> optSet = new java.util.LinkedHashMap<String, OptionBox>();
789
790   Map<String, ParamBox> paramSet = new java.util.LinkedHashMap<String, ParamBox>();
791
792   public Map<String, OptionBox> getOptSet()
793   {
794     return optSet;
795   }
796
797   public void setOptSet(Map<String, OptionBox> optSet)
798   {
799     this.optSet = optSet;
800   }
801
802   public Map<String, ParamBox> getParamSet()
803   {
804     return paramSet;
805   }
806
807   public void setParamSet(Map<String, ParamBox> paramSet)
808   {
809     this.paramSet = paramSet;
810   }
811
812   OptsParametersContainerI poparent;
813
814   OptionBox addOption(OptionI opt)
815   {
816     OptionBox cb = optSet.get(opt.getName());
817     if (cb == null)
818     {
819       cb = new OptionBox(opt);
820       optSet.put(opt.getName(), cb);
821       // jobOptions.add(cb, FlowLayout.LEFT);
822     }
823     return cb;
824   }
825
826   ParamBox addParameter(ParameterI arg)
827   {
828     ParamBox pb = paramSet.get(arg.getName());
829     if (pb == null)
830     {
831       pb = new ParamBox(poparent, arg);
832       paramSet.put(arg.getName(), pb);
833       // paramList.add(pb);
834     }
835     pb.init();
836     // take the defaults from the parameter
837     pb.updateControls(arg);
838     return pb;
839   }
840
841   void selectOption(OptionI option, String string)
842   {
843     OptionBox cb = optSet.get(option.getName());
844     if (cb == null)
845     {
846       cb = addOption(option);
847     }
848     cb.enabled.setSelected(string != null); // initial state for an option.
849     if (string != null)
850     {
851       if (option.getPossibleValues().contains(string))
852       {
853         cb.val.setSelectedItem(string);
854       }
855       else
856       {
857         throw new Error(MessageManager.formatMessage("error.invalid_value_for_option", new String[]{string,option.getName()}));
858       }
859
860     }
861     if (option.isRequired() && !cb.enabled.isSelected())
862     {
863       // TODO: indicate paramset is not valid.. option needs to be selected!
864     }
865     cb.setInitialValue();
866   }
867
868   void setParameter(ParameterI arg)
869   {
870     ParamBox pb = paramSet.get(arg.getName());
871     if (pb == null)
872     {
873       addParameter(arg);
874     }
875     else
876     {
877       pb.updateControls(arg);
878     }
879
880   }
881
882   /**
883    * recover options and parameters from GUI
884    * 
885    * @return
886    */
887   public List<ArgumentI> getCurrentSettings()
888   {
889     List<ArgumentI> argSet = new ArrayList<ArgumentI>();
890     for (OptionBox opts : getOptSet().values())
891     {
892       OptionI opt = opts.getOptionIfEnabled();
893       if (opt != null)
894       {
895         argSet.add(opt);
896       }
897     }
898     for (ParamBox parambox : getParamSet().values())
899     {
900       ParameterI parm = parambox.getParameter();
901       if (parm != null)
902       {
903         argSet.add(parm);
904       }
905     }
906
907     return argSet;
908   }
909
910 }