Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Scale


    final Label priorityLabel = new Label(composite, SWT.NONE);
    udaptePriorityLabel(priorityLabel, cacheManager, (Goal) rootElement);
    priorityLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true,
        false, 3, 1));

    final Scale scale = new Scale(composite, SWT.NONE);

    scale.setMinimum(0);
    scale.setMaximum(100);
    scale.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
    scale.setSelection(cacheManager.getSelectedGoalPriority(
        (Goal) rootElement).intValue());

    final Spinner spinner = new Spinner(composite, SWT.NONE);

    spinner.setMinimum(0);
    spinner.setMaximum(100);
    spinner.setSelection(scale.getSelection());
    spinner.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false,
        1, 1));

    final Button lockButton = new Button(composite, SWT.TOGGLE);
    lockButton.setText(UNLOCKED_STATE_STRING);
    lockButton.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false,
        false, 1, 1));

    final Button deselectButton = new Button(composite, SWT.TOGGLE);
    deselectButton.setImage(PlatformUI.getWorkbench().getSharedImages()
        .getImage(ISharedImages.IMG_TOOL_DELETE));
    deselectButton.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false,
        false, 1, 1));
    deselectButton.setSelection(cacheManager
        .goalIsMarkedAsToRemove((Goal) rootElement));
    deselectButton.setSelection(cacheManager
        .goalIsMarkedAsToRemove((Goal) rootElement));
    deselectButton.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        if (deselectButton.getSelection()) {
          builder.deselectRootElement((Goal) rootElement);
          scale.setSelection(0);
          spinner.setSelection(0);

          updateRelatedScales(spinner, scale, rootElement,
              spinner.getSelection(), cacheManager, true);
          lockButton.setSelection(true);
          lockButton.setText(LOCKED_STATE_STRING);
          setLockStateForControls();
          spinner.setEnabled(false);
          scale.setEnabled(false);
          lockButton.setEnabled(false);

        } else {
          builder.reselectRootElement((Goal) rootElement);
          spinner.setEnabled(true);
          scale.setEnabled(true);
          lockButton.setEnabled(true);
        }
        udaptePriorityLabel(priorityLabel, cacheManager,
            (Goal) rootElement);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }
    });

    lockedMap.put(rootElement, false);
    scalesMap.put(scale, rootElement);
    spinnersMap.put(spinner, rootElement);

    scale.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        updateRelatedScales(spinner, scale, rootElement,
            scale.getSelection(), cacheManager, false);
        udaptePriorityLabel(priorityLabel, cacheManager,
            (Goal) rootElement);
      }

      @Override
View Full Code Here


    final Label priorityLabel = new Label(composite, SWT.NONE);
    udaptePriorityLabel(priorityLabel, cacheManager, source, target);
    priorityLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true,
        false, 3, 1));

    final Scale scale = new Scale(composite, SWT.NONE);

    scale.setMinimum(0);
    scale.setMaximum(100);
    scale.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
    scale.setSelection(cacheManager
        .getSelectedGoalPriorizedDecompositionWeight(source, target));

    final Spinner spinner = new Spinner(composite, SWT.NONE);

    spinner.setMinimum(0);
    spinner.setMaximum(100);
    spinner.setSelection(scale.getSelection());
    spinner.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false,
        1, 1));

    final Button lockButton = new Button(composite, SWT.TOGGLE);

    lockButton.setFont(lockButtonFont);
    lockButton.setText(UNLOCKED_STATE_STRING);
    lockButton.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false,
        false, 1, 1));

    final Button deselectButton = new Button(composite, SWT.TOGGLE);
    deselectButton.setImage(PlatformUI.getWorkbench().getSharedImages()
        .getImage(ISharedImages.IMG_TOOL_DELETE));
     
    deselectButton.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false,
        false, 1, 1));
    deselectButton.setSelection(cacheManager
        .goalDecompositionIsMarkedAsToRemove(decomposition));
   
    deselectButton.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        if (deselectButton.getSelection()) {
          builder.deselectDecomposition(decomposition);
          scale.setSelection(0);
          spinner.setSelection(0);

          updateRelatedScales(spinner, scale, decomposition,
              scale.getSelection(), cacheManager, true);
          lockButton.setSelection(true);
          lockButton.setText(LOCKED_STATE_STRING);
          setLockStateForControls();
          spinner.setEnabled(false);
          scale.setEnabled(false);
          lockButton.setEnabled(false);
        } else {
          builder.reselectDecomposition(decomposition);
          scale.setSelection(cacheManager
              .getSelectedGoalPriorizedDecompositionWeight(cacheManager
                  .getSelectedGoalsPriorizedDecomposition(decomposition)));
          spinner.setEnabled(true);
          scale.setEnabled(true);
          lockButton.setEnabled(true);
        }
        udaptePriorityLabel(priorityLabel, cacheManager, source, target);

      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }
    });

    lockedMap
        .put(decomposition, cacheManager
            .goalDecompositionIsMarkedAsToRemove(decomposition));
    scalesMap.put(scale, decomposition);
    spinnersMap.put(spinner, decomposition);

    scale.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        spinner.setSelection(scale.getSelection());
        updateRelatedScales(spinner, scale, decomposition,
            scale.getSelection(), cacheManager, false);
        udaptePriorityLabel(priorityLabel, cacheManager, source, target);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {

      }
    });

    spinner.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        scale.setSelection(spinner.getSelection());
        updateRelatedScales(spinner, scale, decomposition,
            spinner.getSelection(), cacheManager, false);
        udaptePriorityLabel(priorityLabel, cacheManager, source, target);
      }
View Full Code Here

    thresholdGroup.setLayout(new GridLayout(3, false));
    thresholdGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
        true, 1, 1));
    thresholdGroup.setToolTipText("please select a minimal threshold for the attribute explorer here");

    final Scale thresholdScale = new Scale(thresholdGroup, SWT.NONE);
    thresholdScale.setMinimum(0);
    thresholdScale.setMaximum(200);
    thresholdScale.setSelection(100);
    thresholdScale.setToolTipText("please select a minimal threshold for the attribute explorer here");
   
   
    final Spinner thresholdSpinner = new Spinner(thresholdGroup, SWT.NONE);
    thresholdSpinner.setMinimum(-100);
    thresholdSpinner.setMaximum(100);
    thresholdSpinner.setSelection(0);
    thresholdSpinner.setToolTipText("please select a minimal threshold for the attribute explorer here");

    final Combo thresholdCombo = new Combo(thresholdGroup, SWT.DROP_DOWN);
    thresholdCombo.add("makes");
    thresholdCombo.add("some positive");
    thresholdCombo.add("helps");
    thresholdCombo.add("neutral");
    thresholdCombo.add("hurts");
    thresholdCombo.add("some negative");
    thresholdCombo.add("breaks");
    thresholdCombo.setToolTipText("please select a minimal threshold for the attribute explorer here");

    thresholdCombo.select(3);
    thresholdGroup.setEnabled(false);
    thresholdScale.setEnabled(false);
    thresholdSpinner.setEnabled(false);
    thresholdCombo.setEnabled(false);

    attributeExplorerCheckbox.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        boolean enabled = attributeExplorerCheckbox.getSelection();
        thresholdGroup.setEnabled(enabled);
        thresholdScale.setEnabled(enabled);
        thresholdSpinner.setEnabled(enabled);
        thresholdCombo.setEnabled(enabled);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }
    });

    thresholdScale.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        thresholdSpinner.setSelection(thresholdScale.getSelection() - 100);
        updateThresholdComboSelection(thresholdSpinner, thresholdCombo);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }
    });

    thresholdSpinner.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        thresholdScale.setSelection(thresholdSpinner.getSelection() + 100);
        updateThresholdComboSelection(thresholdSpinner, thresholdCombo);
      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }
    });

    thresholdCombo.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        switch (thresholdCombo.getSelectionIndex()) {
        case 0:
          thresholdScale.setSelection(176);
          thresholdSpinner.setSelection(76);
          break;
        case 1:
          thresholdScale.setSelection(126);
          thresholdSpinner.setSelection(26);
          break;
        case 2:
          thresholdScale.setSelection(101);
          thresholdSpinner.setSelection(1);
          break;
        case 3:
          thresholdScale.setSelection(100);
          thresholdSpinner.setSelection(0);
          break;
        case 4:
          thresholdScale.setSelection(99);
          thresholdSpinner.setSelection(-1);
          break;
        case 5:
          thresholdScale.setSelection(74);
          thresholdSpinner.setSelection(-26);
          break;
        case 6:
          thresholdScale.setSelection(24);
          thresholdSpinner.setSelection(-76);
          break;

        default:
          break;
View Full Code Here

    gridData.horizontalSpan = 1;
    gridData.horizontalAlignment = SWT.LEFT;
    gridData.grabExcessHorizontalSpace = false;
    nCaptionLabel.setLayoutData(gridData);

    nScale = new Scale(composite, SWT.NONE);
    nScale.setMaximum(10);
    nScale.setMinimum(2);
    nScale.setIncrement(1);
    nScale.setPageIncrement(1);
    nScale.setSelection(3);
    gridData = new GridData();
    gridData.horizontalSpan = 1;
    gridData.horizontalAlignment = SWT.FILL;
    gridData.grabExcessHorizontalSpace = false;
    nScale.setLayoutData(gridData);
    nScale.setToolTipText("select here the number of calculated subpatterns used for the NGram similarity check");

    nSpinner = new Spinner(composite, SWT.NONE);
    nSpinner.setMinimum(nScale.getMinimum());
    nSpinner.setMaximum(nScale.getMaximum());
    nSpinner.setSelection(nScale.getSelection());
    gridData = new GridData();
    gridData.horizontalSpan = 1;
    gridData.horizontalAlignment = SWT.LEFT;
    gridData.grabExcessHorizontalSpace = false;
    nSpinner.setLayoutData(gridData);
    nSpinner.setToolTipText(nScale.getToolTipText());
    nSpinner.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        nScale.setSelection(nSpinner.getSelection());
        if (getFilterWord() != null && getFilterWord() != "")
          searchProperties(getFilterWord(), getN(), getMinCorrelation(),  cataloguge,
              assignedConstraintedSet);

      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {

      }
    });

    nScale.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        nSpinner.setSelection(nScale.getSelection());
        if (getFilterWord() != null && getFilterWord() != "")
          searchProperties(getFilterWord(), getN(), getMinCorrelation(),  cataloguge,
              assignedConstraintedSet);

      }

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {

      }
    });
    new Label(composite, SWT.NONE); //dummy

    Label minCorrelationCaptionLabel = new Label(composite, SWT.NONE);

    minCorrelationCaptionLabel.setText("min correlation");
    gridData = new GridData();
    gridData.horizontalSpan = 1;
    gridData.horizontalAlignment = SWT.LEFT;
    gridData.grabExcessHorizontalSpace = false;
    minCorrelationCaptionLabel.setLayoutData(gridData);

    minCorrelationScale = new Scale(composite, SWT.NONE);
    minCorrelationScale.setMaximum(100);
    minCorrelationScale.setMinimum(0);
    minCorrelationScale.setSelection(80);

    gridData = new GridData();
View Full Code Here

      equalizerGroupGD.grabExcessVerticalSpace = true;
      equalizerGroupGD.verticalAlignment = SWT.FILL;

      equalizerGroup.setLayoutData(equalizerGroupGD);

      scBand0 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand0.setMaximum(100);
      scBand0.setMinimum(0);
      GridData band0GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand0.setLayoutData(band0GD);

      scBand1 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand1.setMaximum(100);
      scBand1.setMinimum(0);
      GridData band1GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand1.setLayoutData(band1GD);

      scBand2 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand2.setMaximum(100);
      scBand2.setMinimum(0);
      GridData band2GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand2.setLayoutData(band2GD);

      scBand3 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand3.setMaximum(100);
      scBand3.setMinimum(0);
      GridData band3GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand3.setLayoutData(band3GD);

      scBand4 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand4.setMaximum(100);
      scBand4.setMinimum(0);
      GridData band4GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand4.setLayoutData(band4GD);

      scBand5 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand5.setMaximum(100);
      scBand5.setMinimum(0);
      GridData band5GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand5.setLayoutData(band5GD);

      scBand6 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand6.setMaximum(100);
      scBand6.setMinimum(0);
      GridData band6GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand6.setLayoutData(band6GD);

      scBand7 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand7.setMaximum(100);
      scBand7.setMinimum(0);
      GridData band7GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand7.setLayoutData(band7GD);

      scBand8 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand8.setMaximum(100);
      scBand8.setMinimum(0);
      GridData band8GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand8.setLayoutData(band8GD);

      scBand9 = new Scale(equalizerGroup, SWT.VERTICAL);
      scBand9.setMaximum(100);
      scBand9.setMinimum(0);
      GridData band9GD = new GridData(SWT.CENTER, SWT.FILL, true, true);
      scBand9.setLayoutData(band9GD);
View Full Code Here

  public SliderWrapper(Composite parent, int style) {
       
    _boNativeSlider = Controller.getInstance().getPreferenceStore().getBoolean(PreferenceConstants.PLAYERVIEW_USE_NATIVE_SLIDER);
   
    if (_boNativeSlider) {
      _nativeSlider = new Scale(parent, style);     
    } else {
      _nonNativeSlider = new DPlayerSlider(parent, style | SWT.BORDER);     
      _nonNativeSlider.setGauge(10);
    }
  }
View Full Code Here

                  }
                  {
                    GridData speedControlLData = new GridData();
                    speedControlLData.widthHint = 183;
                    speedControlLData.heightHint = 42;
                    speedControl = new Scale(composite9,
                        SWT.NONE);
                    speedControl
                        .setLayoutData(speedControlLData);
                    speedControl
                        .setMinimum(Defines.MIN_SPEED_PERCENT);
View Full Code Here

                      }
                      {
                        GridData speedControlLData = new GridData();
                        speedControlLData.widthHint = 183;
                        speedControlLData.heightHint = 42;
                        speedControl = new Scale(composite9, SWT.NONE);
                        speedControl.setLayoutData(speedControlLData);
                        speedControl.setMinimum( Defines.MIN_SPEED_PERCENT );
                        speedControl.setMaximum( Defines.MAX_SPEED_PERCENT );
                        speedControl.setSelection( 100 );
                        speedControl.setToolTipText("Velocidad de Reproducci�n");
View Full Code Here

    compression.setText("Compression level");
   
    Composite sliderComposite = new Composite(compression, SWT.NONE);
    sliderComposite.setLayout(new GridLayout(3, false));
    new Label(sliderComposite, SWT.NONE).setText("Fast");
    compressionScale = new Scale(sliderComposite, SWT.NONE);
    compressionScale.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    new Label(sliderComposite, SWT.NONE).setText("Best");
   
    Composite labelComposite = new Composite(compression, SWT.NONE);
    labelComposite.setLayout(new GridLayout(1, true));
View Full Code Here

    quality.setText("Quality");
   
    Composite sliderComposite = new Composite(quality, SWT.NONE);
    sliderComposite.setLayout(new GridLayout(3, false));
    new Label(sliderComposite, SWT.NONE).setText("Low");
    qualityScale = new Scale(sliderComposite, SWT.NONE);
    qualityScale.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    new Label(sliderComposite, SWT.NONE).setText("High");
   
    Composite labelComposite = new Composite(quality, SWT.NONE);
    labelComposite.setLayout(new GridLayout(1, false));
View Full Code Here

TOP

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

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.