Package simtools.ui

Examples of simtools.ui.NumberField


            setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
           
            Box box = Box.createHorizontalBox();
            box.add(new JLabel(param1Name()));
            box.add(Box.createHorizontalGlue());
            box.add(nfParam1 = new NumberField(0.0));
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(new JLabel(param2Name()));
            box.add(Box.createHorizontalGlue());
            box.add(nfParam2 = new NumberField(1.0));
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbStatic = new JRadioButton(resources.getString("static"),true));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbDynamic = new JRadioButton(resources.getString("dynamic"),false));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            ButtonGroup bg = new ButtonGroup();
            bg.add(rbStatic);
            bg.add(rbDynamic);
           
            final JPanel cardPane = new JPanel(new CardLayout());
           
            box = Box.createHorizontalBox();
            box.add(bufferLabel = new JLabel(resources.getString("staticBufferLabel")));
            box.add(Box.createHorizontalGlue());
            box.add(nfSize = new NumberField(100,5));
            cardPane.add(box,"s");
           
            Box vbox = Box.createVerticalBox();
            box = Box.createHorizontalBox();
            box.add(bufferLabel = new JLabel(resources.getString("dynamicBufferLabel")));
            box.add(Box.createHorizontalGlue());
            box.add(nfDynamicSize = new NumberField(100,5));
            vbox.add(box);
            box = Box.createHorizontalBox();
            box.add(bufferLabel = new JLabel(resources.getString("period")));
            box.add(Box.createHorizontalGlue());
            box.add(tfPeriod = new JTextField("1000"));
View Full Code Here


        bg.add(rbUseSource);

        box = Box.createHorizontalBox();
        box.add(lformatdigits = new JLabel(resources.getString("DecimalDigits")));
        box.add(Box.createHorizontalGlue());
        box.add(nfformat = new NumberField(3,3));
        nfformat.setColumns(3);
        nfformat.setHorizontalAlignment(JTextField.RIGHT);

        cbxformat.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
View Full Code Here

          XYPlot plot = (XYPlot)chart.getXYPlot();
          PlotPanel plotPanel = new PlotPanel();
          Container c = (Container)plotPanel.getComponent(0);
          Box b = Box.createHorizontalBox();
          b.add(new JLabel(resources.getString("TransparencyCoefficient")));
          NumberField nfalpha;
          b.add(Box.createHorizontalGlue());
          b.add(nfalpha = new NumberField(plot.getForegroundAlpha()));
          c.add(b);
          b = Box.createHorizontalBox();
          JCheckBox cbDrawContour;
          b.add(cbDrawContour = new JCheckBox(resources.getString("OutlineEachSegment"), ((JSynopticAreaXYItemRenderer)plot.getRenderer()).isOutline()));
          b.add(Box.createHorizontalGlue());
          c.add(b);
          if (tab!=null) tab.add(plotPanel,0);
          int result = JOptionPane.showConfirmDialog(null, panel,
            resources.getString("ChartProperties"), JOptionPane.OK_CANCEL_OPTION,
            JOptionPane.PLAIN_MESSAGE);
          if (result == JOptionPane.OK_OPTION) {
            panel.updateChartProperties(chart);
            if (plotPanel!=null) {
              plotPanel.updateChartProperties();
              plot.setForegroundAlpha((float)nfalpha.getDoubleValue());
              ((JSynopticAreaXYItemRenderer)plot.getRenderer()).setOutline(cbDrawContour.isSelected());
            }
          }
          notifyChange();
        }
View Full Code Here

                lcharNumber.setEnabled(cbFrameLocked.isSelected());
                nfCharNumber.setEnabled(cbFrameLocked.isSelected());
            }
        };
        lcharNumber = new JLabel(resources.getString("CharNumber"));
        nfCharNumber = new NumberField(0, 5);
        cbFrameLocked = new ActionCheckBox(resources.getString("FixedFrame"), false) {
            public void actionPerformed(ActionEvent e) {
                if (isSelected()) {
                    cbFontLocked.setSelected(false);
                }
View Full Code Here

        // CARD PANEL
        cards = new JPanel();
        cards.setLayout(new CardLayout());
        // JSYnoptic formater
        lformatdigits = new JLabel(resources.getString("DecimalDigits:"));
        nfformat = new NumberField(0, 3);
        nfformat.setColumns(10);
        nfformat.setHorizontalAlignment(SwingConstants.RIGHT);
        GridBagPanel digitsPanel = new GridBagPanel();
        digitsPanel.addOnCurrentRow(lformatdigits);
        digitsPanel.addOnCurrentRow(nfformat);
View Full Code Here

      isComplete = iDate.get(Calendar.MONTH) == Calendar.DECEMBER;
    }
    _monthField = new JComboBox(months);
    add(_monthField);
    _monthField.setSelectedIndex(date.get(Calendar.MONTH));
    add(_yearField = new NumberField(date.get(Calendar.YEAR), 4));
    add(new Label(""));
    add(_hourField = new DatePartField(date.get(Calendar.HOUR_OF_DAY), 0, 23, 2));
    add(_minuteField = new DatePartField(date.get(Calendar.MINUTE), 0, 59, 2));
    add(_secondField = new DatePartField(date.get(Calendar.SECOND), 0, 59, 2));
    add(_millisecondField = new DatePartField(date.get(Calendar.MILLISECOND), 0, 999, 3));
View Full Code Here

    lmin = new JLabel(resources.getStringValue("minLabel"));
    panel.add(lmin);
    addMinMaxComponent(true,panel);
    lmax = new JLabel(resources.getStringValue("maxLabel"));
    panel.add(lmax);
    tfmax = new NumberField(0, 10);
    addMinMaxComponent(false,panel);
    addStepComponent(panel);
    add(panel);
  }
View Full Code Here

  }

  protected void addStepComponent(JPanel panel){
    lstep = new JLabel(resources.getStringValue("stepLabel"));
    panel.add(lstep);
    tfstep = new NumberField(0, 10);
    panel.add(tfstep);
  }
View Full Code Here

    panel.add(tfstep);
  }

  protected void addMinMaxComponent(boolean min, JPanel panel){
    if(min){
      tfmin = new NumberField(0, 10);
      panel.add(tfmin);
    }
    else{
      tfmax = new NumberField(0, 10);
      panel.add(tfmax);
    }
  }
View Full Code Here

    lmax.setEnabled(enable);
    lstep.setEnabled(enable);
  }
 
  protected NumberField createFloatingRangeField(){
    return new NumberField(5);
  }
View Full Code Here

TOP

Related Classes of simtools.ui.NumberField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.