protected void updateMaxOccur(int max) {
   if (fMaxOccurSpinner == null) return;
   boolean isMax = max == Integer.MAX_VALUE;
   fUnboundSelect.setSelection(isMax);
   fMaxOccurSpinner.setEnabled(!isMax);
   if (!isMax) fMaxOccurSpinner.setSelection(max);
 }
Exemple #2
0
  @NotNull
  public static Spinner createLabelSpinner(
      @NotNull Composite parent, @NotNull String label, int value, int minimum, int maximum) {
    createControlLabel(parent, label);

    Spinner spinner = new Spinner(parent, SWT.BORDER);
    spinner.setMinimum(minimum);
    spinner.setMaximum(maximum);
    spinner.setSelection(value);

    return spinner;
  }
 protected void updateMinOccur(int min) {
   if (fMinOccurSpinner != null) fMinOccurSpinner.setSelection(min);
 }