Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.SpinnerSelectionListener$Adapter


        monthSpinner.setSpinnerData(new NumericSpinnerData(0, 11));
        monthSpinner.setItemRenderer(new MonthSpinnerItemRenderer());
        monthSpinner.setCircular(true);
        monthSpinner.getStyles().put("sizeToContent", true);

        monthSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setMonth((Integer)spinner.getSelectedItem());
            }
        });

        // Year spinner
        yearSpinner = new Spinner();
        yearSpinner.setSpinnerData(new NumericSpinnerData(0, Short.MAX_VALUE));

        yearSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setYear((Integer)spinner.getSelectedItem());
            }
View Full Code Here


                }
            };

            colorChooserButton.getColorChooserButtonSelectionListeners().add(colorChooserButtonSelectionListener);

            SpinnerSelectionListener spinnerSelectionListener = new SpinnerSelectionListener.Adapter() {
                @Override
                public void selectedItemChanged(Spinner spinner, Object previousSelectedItem) {
                    int red = (Integer)redSpinner.getSelectedItem();
                    int green = (Integer)greenSpinner.getSelectedItem();
                    int blue = (Integer)blueSpinner.getSelectedItem();
View Full Code Here

                }
            };

            colorChooserButton.getColorChooserButtonSelectionListeners().add(colorChooserButtonSelectionListener);

            SpinnerSelectionListener spinnerSelectionListener = new SpinnerSelectionListener.Adapter() {
                @Override
                public void selectedItemChanged(Spinner spinner, Object previousSelectedItem) {
                    int red = (Integer)redSpinner.getSelectedItem();
                    int green = (Integer)greenSpinner.getSelectedItem();
                    int blue = (Integer)blueSpinner.getSelectedItem();
View Full Code Here

        monthSpinner.setSpinnerData(new NumericSpinnerData(0, 11));
        monthSpinner.setItemRenderer(new MonthSpinnerItemRenderer());
        monthSpinner.setCircular(true);
        monthSpinner.getStyles().put("sizeToContent", true);

        monthSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setMonth((Integer)spinner.getSelectedItem());
            }
        });

        // Year spinner
        yearSpinner = new Spinner();
        yearSpinner.setSpinnerData(new NumericSpinnerData(0, Short.MAX_VALUE));

        yearSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setYear((Integer)spinner.getSelectedItem());
            }
View Full Code Here

        monthSpinner.setSpinnerData(new NumericSpinnerData(0, 11));
        monthSpinner.setItemRenderer(new MonthSpinnerItemRenderer());
        monthSpinner.setCircular(true);
        monthSpinner.getStyles().put("sizeToContent", true);

        monthSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setMonth((Integer)spinner.getSelectedItem());
            }
        });

        // Year spinner
        yearSpinner = new Spinner();
        yearSpinner.setSpinnerData(new NumericSpinnerData(0, Short.MAX_VALUE));

        yearSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setYear((Integer)spinner.getSelectedItem());
            }
View Full Code Here

        monthSpinner.setSpinnerData(new NumericSpinnerData(0, 11));
        monthSpinner.setItemRenderer(new MonthSpinnerItemRenderer());
        monthSpinner.setCircular(true);
        monthSpinner.getStyles().put("sizeToContent", true);

        monthSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setMonth((Integer)spinner.getSelectedItem());
            }
        });

        // Year spinner
        yearSpinner = new Spinner();
        yearSpinner.setSpinnerData(new NumericSpinnerData(0, Short.MAX_VALUE));

        yearSpinner.getSpinnerSelectionListeners().add(new SpinnerSelectionListener() {
            @Override
            public void selectedIndexChanged(Spinner spinner, int previousSelectedIndex) {
                Calendar calendar = (Calendar)getComponent();
                calendar.setYear((Integer)spinner.getSelectedItem());
            }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.SpinnerSelectionListener$Adapter

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.