Package javax.swing

Examples of javax.swing.SpinnerListModel


  public List asList() {
    return new CSVReader(separator, escapeSequence).digest(values, true);
  }

  public void addToControlPanel(ControlPanel panel) {
    model = new SpinnerListModel(asList());
    spinner = new JSpinner(model);
    panel.getStylesheetHandler().addSpinner(spinner);
    spinner.setEnabled(isEditable());
    initComponent(spinner, panel);
  }
View Full Code Here


            GregorianCalendar cal = (value == null ? new GregorianCalendar() : (GregorianCalendar) value);

            day = new SpinnerNumberModel(cal.get(Calendar.DATE), 1, 31, 1);
            addSpinner(new JSpinner(day), status);

            month = new SpinnerListModel(MONTH_STRINGS);
            month.setValue(MONTH_STRINGS[cal.get(Calendar.MONTH)]);
            JSpinner monthSpinner = new JSpinner(month);
            JComponent editor = monthSpinner.getEditor();
            if (editor instanceof JSpinner.DefaultEditor) {
                JFormattedTextField tf = ((JSpinner.DefaultEditor) editor).getTextField();
View Full Code Here

        List<Integer> years = new ArrayList<Integer>();
        YearPeriod yp = getYearPeriod();
        for (int i = yp.getBegin(), y = yp.getEnd() + 1; i < y; i++) {
            years.add(new Integer(i));
        }
        SpinnerListModel model = new SpinnerListModel(years);
        getYearSpinner().setModel(model);

        setActionListenersActivated(true);
    }
View Full Code Here

        m4TravelPerRev.setColumns(10);
       
        JLabel lblMicrosteps = new JLabel("Microsteps");
        panelMotors.add(lblMicrosteps, "2, 10, right, default");
       
        JSpinner m1Microsteps = new JSpinner(new SpinnerListModel(new Object[] { (Integer) 1, (Integer) 2, (Integer) 4, (Integer) 8 }));
        panelMotors.add(m1Microsteps, "4, 10");
       
        JSpinner m2Microsteps = new JSpinner(new SpinnerListModel(new Object[] { (Integer) 1, (Integer) 2, (Integer) 4, (Integer) 8 }));
        panelMotors.add(m2Microsteps, "6, 10");
       
        JSpinner m3Microsteps = new JSpinner(new SpinnerListModel(new Object[] { (Integer) 1, (Integer) 2, (Integer) 4, (Integer) 8 }));
        panelMotors.add(m3Microsteps, "8, 10");
       
        JSpinner m4Microsteps = new JSpinner(new SpinnerListModel(new Object[] { (Integer) 1, (Integer) 2, (Integer) 4, (Integer) 8 }));
        panelMotors.add(m4Microsteps, "10, 10");
       
        JLabel lblPolarity = new JLabel("Reverse Polarity");
        panelMotors.add(lblPolarity, "2, 12, right, default");
       
View Full Code Here

        // align.setEnabled(false);
        chkDigits = new JCheckBox("Set Digits:");
        chkDigits.setEnabled(false);

        Integer[] digitInts = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        SpinnerListModel digitsModel = new SpinnerListModel(digitInts);

        sprDigits = new JSpinner(digitsModel);
        sprDigits.setValue(3);
        sprDigits.setEnabled(false);       
View Full Code Here

TOP

Related Classes of javax.swing.SpinnerListModel

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.