Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Spinner


      public void widgetSelected(SelectionEvent e) {
        fDeleteNewsByCountValue.setEnabled(fDeleteNewsByCountCheck.getSelection());
      }
    });

    fDeleteNewsByCountValue = new Spinner(group, SWT.BORDER);
    fDeleteNewsByCountValue.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fDeleteNewsByCountValue.setEnabled(fDeleteNewsByCountCheck.getSelection());
    fDeleteNewsByCountValue.setMinimum(0);
    fDeleteNewsByCountValue.setMaximum(1000);
    fDeleteNewsByCountValue.setSelection(fGlobalScope.getInteger(DefaultPreferences.DEL_NEWS_BY_COUNT_VALUE));

    /* Delete by Age */
    fDeleteNewsByAgeCheck = new Button(group, SWT.CHECK);
    fDeleteNewsByAgeCheck.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fDeleteNewsByAgeCheck.setSelection(fGlobalScope.getBoolean(DefaultPreferences.DEL_NEWS_BY_AGE_STATE));
    fDeleteNewsByAgeCheck.setText("Maximum age of news in days: ");
    fDeleteNewsByAgeCheck.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        fDeleteNewsByAgeValue.setEnabled(fDeleteNewsByAgeCheck.getSelection());
      }
    });

    fDeleteNewsByAgeValue = new Spinner(group, SWT.BORDER);
    fDeleteNewsByAgeValue.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fDeleteNewsByAgeValue.setEnabled(fDeleteNewsByAgeCheck.getSelection());
    fDeleteNewsByAgeValue.setMinimum(0);
    fDeleteNewsByAgeValue.setMaximum(1000);
    fDeleteNewsByAgeValue.setSelection(fGlobalScope.getInteger(DefaultPreferences.DEL_NEWS_BY_AGE_VALUE));
View Full Code Here


        });
      }

      /* Spinner */
      else if (c instanceof Spinner) {
        Spinner spinner = (Spinner) c;
        spinner.addSelectionListener(new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            run.run();
          }
        });
View Full Code Here

          fReloadSpinner.setEnabled(fUpdateCheck.getSelection());
          fReloadCombo.setEnabled(fUpdateCheck.getSelection());
        }
      });

      fReloadSpinner = new Spinner(autoReloadContainer, SWT.BORDER);
      fReloadSpinner.setMinimum(1);
      fReloadSpinner.setMaximum(999);
      fReloadSpinner.setEnabled(fPrefUpdateIntervalState);

      if (fUpdateIntervalScope == MINUTES_SCOPE)
View Full Code Here

      public void widgetSelected(SelectionEvent e) {
        fMarkReadAfterSpinner.setEnabled(fMarkReadStateCheck.getSelection());
      }
    });

    fMarkReadAfterSpinner = new Spinner(markReadAfterContainer, SWT.BORDER);
    fMarkReadAfterSpinner.setMinimum(0);
    fMarkReadAfterSpinner.setMaximum(100);
    fMarkReadAfterSpinner.setSelection(fPrefMarkReadVal / 1000);
    fMarkReadAfterSpinner.setEnabled(fMarkReadStateCheck.getSelection());
View Full Code Here

      public void widgetSelected(SelectionEvent e) {
        fMaxCountSpinner.setEnabled(fDeleteNewsByCountCheck.getSelection());
      }
    });

    fMaxCountSpinner = new Spinner(container, SWT.BORDER);
    fMaxCountSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fMaxCountSpinner.setEnabled(fDeleteNewsByCountCheck.getSelection());
    fMaxCountSpinner.setMinimum(0);
    fMaxCountSpinner.setMaximum(99999);
    fMaxCountSpinner.setSelection(fPrefDeleteNewsByCountValue);

    /* Delete by Age */
    fDeleteNewsByAgeCheck = new Button(container, SWT.CHECK);
    fDeleteNewsByAgeCheck.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fDeleteNewsByAgeCheck.setSelection(fPrefDeleteNewsByAgeState);
    fDeleteNewsByAgeCheck.setText(Messages.RetentionPropertyPage_MAX_AGE);
    fDeleteNewsByAgeCheck.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        fMaxAgeSpinner.setEnabled(fDeleteNewsByAgeCheck.getSelection());
      }
    });

    fMaxAgeSpinner = new Spinner(container, SWT.BORDER);
    fMaxAgeSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fMaxAgeSpinner.setEnabled(fDeleteNewsByAgeCheck.getSelection());
    fMaxAgeSpinner.setMinimum(0);
    fMaxAgeSpinner.setMaximum(99999);
    fMaxAgeSpinner.setSelection(fPrefDeleteNewsByAgeValue);
View Full Code Here

        }

          /* Type: Number */
        case ISearchValueType.NUMBER:
        case ISearchValueType.INTEGER: {
          final Spinner spinner = new Spinner(inputField, SWT.BORDER);
          spinner.setMinimum(0);
          spinner.setMaximum(1000);
          spinner.addListener(SWT.Modify, new Listener() {
            public void handleEvent(Event event) {
              fInputValue = spinner.getSelection();

              if (!fInputValue.equals(input))
                fModified = true;
            }
          });

          /* Pre-Select input if given */
          Object presetInput = (input == null) ? fInputValue : input;
          if (presetInput != null && presetInput instanceof Integer)
            spinner.setSelection((Integer) presetInput);

          /* Update Input Value */
          fInputValue = spinner.getSelection();

          break;
        }

          /* Type: String */
 
View Full Code Here

      public void widgetSelected(SelectionEvent e) {
        fLimitNotificationSpinner.setEnabled(fLimitNotificationCheck.getSelection());
      }
    });

    fLimitNotificationSpinner = new Spinner(limitItemsContainer, SWT.BORDER);
    fLimitNotificationSpinner.setMinimum(1);
    fLimitNotificationSpinner.setMaximum(30);
    fLimitNotificationSpinner.setEnabled(fLimitNotificationCheck.isEnabled() && fLimitNotificationCheck.getSelection());
    if (notificationLimit > 0)
      fLimitNotificationSpinner.setSelection(notificationLimit);
    else
      fLimitNotificationSpinner.setSelection(notificationLimit * -1);

    Label label = new Label(limitItemsContainer, SWT.None);
    label.setText(" news inside the notification");

    /* Full Content */
    fShowExcerptCheck = new Button(notificationGroup, SWT.CHECK);
    fShowExcerptCheck.setText("Show an excerpt of the news content inside the notification");
    fShowExcerptCheck.setSelection(fGlobalScope.getBoolean(DefaultPreferences.SHOW_EXCERPT_IN_NOTIFIER));
    fShowExcerptCheck.setEnabled(fShowNotificationPopup.getSelection());

    /* Only from Tray */
    fNotificationOnlyFromTray = new Button(notificationGroup, SWT.CHECK);
    fNotificationOnlyFromTray.setText("Show notification only when window is minimized");
    fNotificationOnlyFromTray.setSelection(fGlobalScope.getBoolean(DefaultPreferences.SHOW_NOTIFICATION_POPUP_ONLY_WHEN_MINIMIZED));
    fNotificationOnlyFromTray.setEnabled(fShowNotificationPopup.getSelection());

    /* Auto Close Notifier */
    Composite autoCloseContainer = new Composite(notificationGroup, SWT.None);
    autoCloseContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0, 0, 2, false));

    fAutoCloseNotifierCheck = new Button(autoCloseContainer, SWT.CHECK);
    fAutoCloseNotifierCheck.setText("Close notification automatically after ");
    fAutoCloseNotifierCheck.setEnabled(fShowNotificationPopup.getSelection());
    fAutoCloseNotifierCheck.setSelection(!fGlobalScope.getBoolean(DefaultPreferences.STICKY_NOTIFICATION_POPUP));
    fAutoCloseNotifierCheck.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        fAutoCloseNotifierSpinner.setEnabled(fAutoCloseNotifierCheck.getSelection());
      }
    });

    int notificationAutoCloseValue = fGlobalScope.getInteger(DefaultPreferences.AUTOCLOSE_NOTIFICATION_VALUE);

    fAutoCloseNotifierSpinner = new Spinner(autoCloseContainer, SWT.BORDER);
    fAutoCloseNotifierSpinner.setMinimum(1);
    fAutoCloseNotifierSpinner.setMaximum(99);
    fAutoCloseNotifierSpinner.setEnabled(fAutoCloseNotifierCheck.isEnabled() && fAutoCloseNotifierCheck.getSelection());
    fAutoCloseNotifierSpinner.setSelection(notificationAutoCloseValue);

View Full Code Here

        }

          /* Type: Number */
        case ISearchValueType.NUMBER:
        case ISearchValueType.INTEGER: {
          final Spinner spinner = new Spinner(inputField, SWT.BORDER);
          spinner.setMinimum(0);
          spinner.setMaximum(1000);
          spinner.addListener(SWT.Modify, new Listener() {
            public void handleEvent(Event event) {
              fInputValue = spinner.getSelection();

              if (!fInputValue.equals(input))
                fModified = true;
            }
          });

          /* Pre-Select input if given */
          Object presetInput = (input == null) ? fInputValue : input;
          if (presetInput != null && presetInput instanceof Integer)
            spinner.setSelection((Integer) presetInput);

          /* Update Input Value */
          fInputValue = spinner.getSelection();

          break;
        }

          /* Type: String */
 
View Full Code Here

      public void widgetSelected(SelectionEvent e) {
        fMaxCountSpinner.setEnabled(fDeleteNewsByCountCheck.getSelection());
      }
    });

    fMaxCountSpinner = new Spinner(container, SWT.BORDER);
    fMaxCountSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fMaxCountSpinner.setEnabled(fDeleteNewsByCountCheck.getSelection());
    fMaxCountSpinner.setMinimum(0);
    fMaxCountSpinner.setMaximum(1000);
    fMaxCountSpinner.setSelection(fPrefDeleteNewsByCountValue);

    /* Delete by Age */
    fDeleteNewsByAgeCheck = new Button(container, SWT.CHECK);
    fDeleteNewsByAgeCheck.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fDeleteNewsByAgeCheck.setSelection(fPrefDeleteNewsByAgeState);
    fDeleteNewsByAgeCheck.setText("Maximum age of news in days: ");
    fDeleteNewsByAgeCheck.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        fMaxAgeSpinner.setEnabled(fDeleteNewsByAgeCheck.getSelection());
      }
    });

    fMaxAgeSpinner = new Spinner(container, SWT.BORDER);
    fMaxAgeSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    fMaxAgeSpinner.setEnabled(fDeleteNewsByAgeCheck.getSelection());
    fMaxAgeSpinner.setMinimum(0);
    fMaxAgeSpinner.setMaximum(1000);
    fMaxAgeSpinner.setSelection(fPrefDeleteNewsByAgeValue);
View Full Code Here

        public void widgetSelected(SelectionEvent e) {
          fMaxLastVisitSpinner.setEnabled(fDeleteFeedByLastVisitCheck.getSelection());
        }
      });

      fMaxLastVisitSpinner = new Spinner(container, SWT.BORDER);
      fMaxLastVisitSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      fMaxLastVisitSpinner.setEnabled(fDeleteFeedByLastVisitCheck.getSelection());
      fMaxLastVisitSpinner.setMinimum(1);
      fMaxLastVisitSpinner.setMaximum(999);
      fMaxLastVisitSpinner.setSelection(fGlobalScope.getInteger(DefaultPreferences.CLEAN_UP_BM_BY_LAST_VISIT_VALUE));

      Label label = new Label(container, SWT.None);
      label.setText("days");
    }

    /* 2.) Delete Feeds that have not updated in X Days */
    {
      fDeleteFeedByLastUpdateCheck = new Button(container, SWT.CHECK);
      fDeleteFeedByLastUpdateCheck.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      fDeleteFeedByLastUpdateCheck.setSelection(fGlobalScope.getBoolean(DefaultPreferences.CLEAN_UP_BM_BY_LAST_UPDATE_STATE));
      fDeleteFeedByLastUpdateCheck.setText("Delete bookmarks that have not been updated for ");
      fDeleteFeedByLastUpdateCheck.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          fMaxLastUpdateSpinner.setEnabled(fDeleteFeedByLastUpdateCheck.getSelection());
        }
      });

      fMaxLastUpdateSpinner = new Spinner(container, SWT.BORDER);
      fMaxLastUpdateSpinner.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      fMaxLastUpdateSpinner.setEnabled(fDeleteFeedByLastUpdateCheck.getSelection());
      fMaxLastUpdateSpinner.setMinimum(1);
      fMaxLastUpdateSpinner.setMaximum(999);
      fMaxLastUpdateSpinner.setSelection(fGlobalScope.getInteger(DefaultPreferences.CLEAN_UP_BM_BY_LAST_UPDATE_VALUE));
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Spinner

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.