- setPreferredSize(new Dimension(PARAM_WIDTH, PARAM_CLOSEDHEIGHT));
- setBorder(new TitledBorder(parm.getName()));
- setLayout(null);
- showDesc.setFont(new Font("Verdana", Font.PLAIN, 11));
- showDesc.setText("?");
- string.setFont(new Font("Verdana", Font.PLAIN, 11));
- string.setBackground(getBackground());
- // string.setSize(new Dimension(PARAM_WIDTH, 80));
- string.setEditable(false);
- descPanel.getViewport().setView(string);
- //descPanel.setLocation(2,17);
- descPanel.setVisible(false);
- // string.setMinimumSize(new Dimension(140,80));
- // string.setMaximumSize(new Dimension(280,80));
- final ParamBox me=this;
- showDesc.addActionListener(new ActionListener() {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- descisvisible=!descisvisible;
- descPanel.setVisible(descisvisible);
- me.setPreferredSize(new Dimension(PARAM_WIDTH, (descisvisible) ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT));
- me.validate();
- pmlayout.refreshParamLayout();
- }
- });
- string.setWrapStyleWord(true);
- string.setLineWrap(true);
- string.setColumns(32);
- string.setText(parm.getDescription());
- // name.setToolTipText(parm.getDescription());
- JPanel firstrow = new JPanel();
- firstrow.setLayout(null);
- controlPanel.setLayout(new BorderLayout());
- controlPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH-70,PARAM_CLOSEDHEIGHT-50));
- showDesc.setBounds(new Rectangle(10,10,16,16));
- firstrow.add(showDesc);
- firstrow.add(controlPanel);
- firstrow.setBounds(new Rectangle(10,20,PARAM_WIDTH-30, PARAM_CLOSEDHEIGHT-30));
- add(firstrow);
- validator = parm.getValidValue();
- parameter = parm;
- if (validator != null)