Example usage for org.eclipse.jface.preference ScaleFieldEditor setIncrement

List of usage examples for org.eclipse.jface.preference ScaleFieldEditor setIncrement

Introduction

In this page you can find the example usage for org.eclipse.jface.preference ScaleFieldEditor setIncrement.

Prototype

public void setIncrement(int increment) 

Source Link

Document

Set the value to be used for Scale.setIncrement(int) and update the scale.

Usage

From source file:org.eclipse.titan.designer.preferences.pages.DebugPreferencePage.java

License:Open Source License

private void createLoadBalancingSection(final Composite parent) {
    ExpandableComposite expandable = createExtendableComposite(parent, "Load balancing");
    Composite comp = new Composite(expandable, SWT.NONE);
    comp.setLayout(new GridLayout(2, false));
    comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    expandable.setClient(comp);/*from  w ww  .ja  v  a 2s . c  o m*/
    expandable.setExpanded(false);
    IntegerFieldEditor tokens = new IntegerFieldEditor(
            PreferenceConstants.DEBUG_LOAD_TOKENS_TO_PROCESS_IN_A_ROW,
            "Tokens to process between thread switches", comp);
    tokens.setValidRange(0, Integer.MAX_VALUE);
    addField(tokens);

    ScaleFieldEditor threadPriority = new ScaleFieldEditor(PreferenceConstants.DEBUG_LOAD_THREAD_PRIORITY,
            "Thread priority", comp);
    threadPriority.setMinimum(Thread.MIN_PRIORITY);
    threadPriority.setMaximum(Thread.MAX_PRIORITY);
    threadPriority.setIncrement(1);
    threadPriority.getScaleControl()
            .setToolTipText("Sets the priority of the threads created by the syntax analyzer.");
    addField(threadPriority);

    IntegerFieldEditor sleepBetweenFiles = new IntegerFieldEditor(
            PreferenceConstants.DEBUG_LOAD_SLEEP_BETWEEN_FILES,
            "Sleep the syntax analyzer thread after processing a single file(-1 to do not sleep at all)", comp);
    sleepBetweenFiles.setValidRange(-1, Integer.MAX_VALUE);
    addField(sleepBetweenFiles);

    BooleanFieldEditor yieldBetweenChecks = new BooleanFieldEditor(
            PreferenceConstants.DEBUG_LOAD_YIELD_BETWEEN_CHECKS,
            "Switch thread after semantically checking modules or definitions.", comp);
    addField(yieldBetweenChecks);
}