Examples of Spinner

  • pivot.wtk.Spinner
    Component that presents a means of cycling through a list of items. @author tvolkert

  • Examples of org.eclipse.swt.widgets.Spinner

                public void widgetSelected( SelectionEvent e )
                {
                    precedenceSpinner.setEnabled( precedenceCheckbox.getSelection() );
                }
            } );
            precedenceSpinner = new Spinner( spinnerComposite, SWT.BORDER );
            precedenceSpinner.setMinimum( 0 );
            precedenceSpinner.setMaximum( 255 );
            precedenceSpinner.setDigits( 0 );
            precedenceSpinner.setIncrement( 1 );
            precedenceSpinner.setPageIncrement( 10 );
    View Full Code Here

    Examples of org.eclipse.swt.widgets.Spinner

            spinnersGridData.horizontalSpan = 2;
            spinnersGridData.horizontalAlignment = GridData.BEGINNING;
            spinnersGridData.widthHint = 3 * 12;

            BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.minimum" ), 1 ); //$NON-NLS-1$
            minimumSpinner = new Spinner( composite, SWT.BORDER );
            minimumSpinner.setMinimum( 0 );
            minimumSpinner.setMaximum( Integer.MAX_VALUE );
            minimumSpinner.setDigits( 0 );
            minimumSpinner.setIncrement( 1 );
            minimumSpinner.setPageIncrement( 100 );
            minimumSpinner.setSelection( subtreeSpecification.getMinBaseDistance() );
            minimumSpinner.setLayoutData( spinnersGridData );
            minimumSpinner.addModifyListener( new ModifyListener()
            {
                public void modifyText( ModifyEvent event )
                {
                    validate();
                }
            } );

            BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.maximum" ), 1 ); //$NON-NLS-1$
            maximumSpinner = new Spinner( composite, SWT.BORDER );
            maximumSpinner.setMinimum( 0 );
            maximumSpinner.setMaximum( Integer.MAX_VALUE );
            maximumSpinner.setDigits( 0 );
            maximumSpinner.setIncrement( 1 );
            maximumSpinner.setPageIncrement( 100 );
    View Full Code Here

    Examples of org.eclipse.swt.widgets.Spinner

            // label alpha
            Label labelOpactityLabel = new Label(mainComposite, SWT.NONE);
            labelOpactityLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            labelOpactityLabel.setText(Messages.LineLabelsParametersComposite_5);
            labelOpacitySpinner = new Spinner(mainComposite, SWT.BORDER);
            labelOpacitySpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            labelOpacitySpinner.setMaximum(100);
            labelOpacitySpinner.setMinimum(0);
            labelOpacitySpinner.setIncrement(10);
            String opacity = textSymbolizerWrapper.getOpacity();
            Double tmpOpacity = isDouble(opacity);
            int tmp = 100;
            if (tmpOpacity != null) {
                tmp = (int) (tmpOpacity.doubleValue() * 100);
            }
            labelOpacitySpinner.setSelection(tmp);
            labelOpacitySpinner.addSelectionListener(this);
            labelOpacityAttributecombo = new Combo(mainComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
            labelOpacityAttributecombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            labelOpacityAttributecombo.setItems(numericAttributesArrays);
            labelOpacityAttributecombo.addSelectionListener(this);
            labelOpacityAttributecombo.select(0);
            if (tmpOpacity == null) {
                int index = getAttributeIndex(opacity, numericAttributesArrays);
                if (index != -1) {
                    labelOpacityAttributecombo.select(index);
                }
            }

            // font
            Label fontLabel = new Label(mainComposite, SWT.NONE);
            fontLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            fontLabel.setText(Messages.LineLabelsParametersComposite_6);

            fontEditor = new FontEditor(mainComposite);
            GridData fontButtonGD = new GridData(SWT.FILL, SWT.FILL, true, false);
            fontButtonGD.horizontalSpan = 2;
            fontButton = fontEditor.getButton();
            fontButton.setLayoutData(fontButtonGD);
            fontEditor.setListener(this);

            FontData[] fontData = textSymbolizerWrapper.getFontData();
            if (fontData != null) {
                fontEditor.setFontList(fontData);
            }

            // font color
            Label fontColorLabel = new Label(mainComposite, SWT.NONE);
            fontColorLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            fontColorLabel.setText(Messages.LineLabelsParametersComposite_7);

            fontColorEditor = new StolenColorEditor(mainComposite, this);
            fontColorButton = fontColorEditor.getButton();
            GridData fontColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
            fontColorButtonGD.horizontalSpan = 2;
            fontColorButton.setLayoutData(fontColorButtonGD);
            Color tmpColor = null;;
            try {
                tmpColor = Color.decode(textSymbolizerWrapper.getColor());
            } catch (Exception e) {
                tmpColor = Color.black;
            }
            fontColorEditor.setColor(tmpColor);

            // label halo
            Label haloLabel = new Label(mainComposite, SWT.NONE);
            haloLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            haloLabel.setText(Messages.LineLabelsParametersComposite_8);

            haloColorEditor = new StolenColorEditor(mainComposite, this);
            haloColorButton = haloColorEditor.getButton();
            GridData haloColorButtonGD = new GridData(SWT.FILL, SWT.CENTER, true, false);
            haloColorButton.setLayoutData(haloColorButtonGD);
            tmpColor = null;;
            try {
                tmpColor = Color.decode(textSymbolizerWrapper.getHaloColor());
            } catch (Exception e) {
                tmpColor = Color.black;
            }
            haloColorEditor.setColor(tmpColor);

            haloRadiusSpinner = new Spinner(mainComposite, SWT.BORDER);
            haloRadiusSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
            haloRadiusSpinner.setMaximum(20);
            haloRadiusSpinner.setMinimum(0);
            haloRadiusSpinner.setIncrement(1);
            String haloRadius = textSymbolizerWrapper.getHaloRadius();
    View Full Code Here

    Examples of org.jfree.ui.Spinner

            this.spinShip.addPropertyChangeListener(new PropertyChangeListener() {
                public void propertyChange(final PropertyChangeEvent evt) {
                  if (DEBUG) {
                    System.out.println("compassDemo:spinShipPropertyChange");
                  }
                  final Spinner spinner = (Spinner) evt.getSource();
                  if (spinner.isEnabled()) {
                    shipData.setValue(new Double(spinner.getValue()));
                  }
                }
            });

            this.spinWind.addPropertyChangeListener(new PropertyChangeListener() {
                public void propertyChange(final PropertyChangeEvent evt) {
                    if (DEBUG) {
                      System.out.println("compassDemo:spinWindPropertyChange");
                   
                    final Spinner spinner = (Spinner) evt.getSource();
                    if (spinner.isEnabled()) {
                      compassData.setValue(new Double(spinner.getValue()));
                    }
                }
            });
            this.jPanel12.setLayout(this.gridLayout2);
            this.jPanel2.setBorder(this.titledBorder1);
    View Full Code Here

    Examples of org.openfaces.component.input.Spinner

                spinner.setConverter(numberConverter);
            }
        }

        protected InitScript renderInitScript(FacesContext context, DropDownComponent dropDown) throws IOException {
            Spinner spinner = (Spinner) dropDown;
            if (spinner.getStep().doubleValue() <= 0) {
                throw new FacesException("The 'step' attribute of <o:spinner> with id " + spinner.getClientId(context) +
                        " should be greater then 0, but was " + spinner.getStep());
            }

            String buttonStyle = (String) dropDown.getAttributes().get("buttonStyle");
            String buttonClass = (String) dropDown.getAttributes().get("buttonClass");
            String buttonStyleClass = Styles.getCSSClass(context, dropDown, buttonStyle, DEFAULT_BUTTON_CLASS, buttonClass);
            String rolloverButtonStyle = (String) dropDown.getAttributes().get("rolloverButtonStyle");
            String rolloverButtonClass = (String) dropDown.getAttributes().get("rolloverButtonClass");
            String buttonRolloverStyleClass = Styles.getCSSClass(context, dropDown, rolloverButtonStyle, StyleGroup.rolloverStyleGroup(), rolloverButtonClass, DEFAULT_BUTTON_ROLLOVER_CLASS);
            String pressedButtonStyle = (String) dropDown.getAttributes().get("pressedButtonStyle");
            String pressedButtonClass = (String) dropDown.getAttributes().get("pressedButtonClass");
            String buttonPressedStyleClass = Styles.getCSSClass(context, dropDown, pressedButtonStyle, StyleGroup.rolloverStyleGroup(2), pressedButtonClass, DEFAULT_BUTTON_PRESSED_CLASS);

            if (dropDown.isDisabled()) {
                buttonRolloverStyleClass = "";
                String disabledButtonStyle = (String) dropDown.getAttributes().get("disabledButtonStyle");
                String disabledButtonClass = (String) dropDown.getAttributes().get("disabledButtonClass");
                String disabledButtonStyleClass = Styles.getCSSClass(context, dropDown, disabledButtonStyle,
                        StyleGroup.disabledStyleGroup(), disabledButtonClass, DEFAULT_DISABLED_BUTTON_CLASS);

                if (Rendering.isNullOrEmpty(disabledButtonStyle) && Rendering.isNullOrEmpty(disabledButtonClass)) {
                    buttonStyleClass = Styles.mergeClassNames(disabledButtonStyleClass, buttonStyleClass);
                } else {
                    buttonStyleClass = Styles.mergeClassNames(disabledButtonStyleClass, Styles.getCSSClass(context,
                            dropDown, null, StyleGroup.regularStyleGroup(), null, DEFAULT_BUTTON_CLASS));
                }
            }

            JSONObject options;
            try {
                options = createFormatOptions(context, spinner);
            } catch (JSONException e) {
                throw new FacesException(e);
            }

            ScriptBuilder sb = new ScriptBuilder().initScript(context, spinner, "O$.Spinner._init",
                    spinner.getMinValue(),
                    spinner.getMaxValue(),
                    spinner.getStep(),
                    spinner.isCycled(),
                    buttonStyleClass,
                    buttonRolloverStyleClass,
                    buttonPressedStyleClass,
                    spinner.isDisabled(),
                    spinner.isRequired(),
                    spinner.getOnchange(),
                    options);

            return new InitScript(sb, new String[]{
                    Resources.utilJsURL(context),
                    getDropdownJsURL(context),
    View Full Code Here

    Examples of org.primefaces.component.spinner.Spinner

                    editableValueHolder.setRequired(true);
                }
            }
           
            if (input instanceof Spinner) {
                Spinner spinner = (Spinner) input;

                if (constraint.annotationType().equals(Max.class) && spinner.getMax() == Double.MAX_VALUE) {
                    Max max = (Max) constraint;
                    spinner.setMax(max.value());
                }
                if (constraint.annotationType().equals(Min.class) && spinner.getMin() == Double.MIN_VALUE) {
                    Min min = (Min) constraint;
                    spinner.setMin(min.value());
                }
            }
        }
    View Full Code Here

    Examples of org.zkoss.zul.Spinner

        public EffortDurationPicker() {
            this(false);
        }

        public EffortDurationPicker(boolean withseconds) {
            hours = new Spinner();
            hours.setCols(2);
            setMinFor(hours, 0);
            minutes = new Spinner();
            minutes.setCols(2);
            setRangeFor(minutes, 0, 59);
            appendWithTooltipText(hours, _("Hours"));
            appendWithTooltipText(minutes, _("Minutes"));

            if (withseconds) {
                seconds = new Spinner();
                seconds.setCols(2);
                setRangeFor(seconds, 0, 59);
                appendWithTooltipText(seconds, _("Seconds"));
            }
        }
    View Full Code Here

    Examples of pivot.wtk.Spinner

            TableViewRowEditor tableViewRowEditor = new TableViewRowEditor();
            tableView.setRowEditor(tableViewRowEditor);

            // Date uses a Spinner with a CalendarDateSpinnerData model
            Spinner dateSpinner = new Spinner(new CalendarDateSpinnerData());
            dateSpinner.setSelectedItemKey("date");
            tableViewRowEditor.getCellEditors().put("date", dateSpinner);

            // Expense type uses a ListButton that presents the expense types
            ListButton typeListButton = new ListButton(new EnumList<ExpenseType>(ExpenseType.class));
            typeListButton.setSelectedItemKey("type");
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. 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.