当前位置: 首页>>代码示例>>Java>>正文


Java Spinner.setIncrement方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Spinner.setIncrement方法的典型用法代码示例。如果您正苦于以下问题:Java Spinner.setIncrement方法的具体用法?Java Spinner.setIncrement怎么用?Java Spinner.setIncrement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Spinner的用法示例。


在下文中一共展示了Spinner.setIncrement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createControl

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
@Override
protected Control createControl(Composite parent) {
	spinner = new Spinner(parent, style);
	spinner.setBackground(parent.getBackground());

	spinner.setMinimum(minimum);
	spinner.setMaximum(maximum);
	spinner.setSelection(selection);
	spinner.setIncrement(increment);

	if (selectionListeners != null) {
		for (SelectionListener l : selectionListeners) {
			spinner.addSelectionListener(l);
		}
	}

	return spinner;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:19,代码来源:SpinnerContribution.java

示例2: createUI_Spinner_ColorOpacity

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private Spinner createUI_Spinner_ColorOpacity(final Composite parent) {

		final Spinner spinnerOpacity = new Spinner(parent, SWT.BORDER);
		GridDataFactory.fillDefaults() //
				.align(SWT.BEGINNING, SWT.FILL)
				.applyTo(spinnerOpacity);

		spinnerOpacity.setMinimum(Map3GradientColorManager.OPACITY_MIN);
		spinnerOpacity.setMaximum(Map3GradientColorManager.OPACITY_MAX);
		spinnerOpacity.setDigits(Map3GradientColorManager.OPACITY_DIGITS);
		spinnerOpacity.setIncrement(1);
		spinnerOpacity.setPageIncrement(10);
		spinnerOpacity.addSelectionListener(_defaultSelectionListener);
		spinnerOpacity.addMouseWheelListener(_defaultMouseWheelListener);

		return spinnerOpacity;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:18,代码来源:DialogTourTrackConfig.java

示例3: createUI_Spinner_PositionSize

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private Spinner createUI_Spinner_PositionSize(final Composite container) {

		final Spinner spinnerPositionSize = new Spinner(container, SWT.BORDER);
		GridDataFactory.fillDefaults() //
				.align(SWT.BEGINNING, SWT.FILL)
				.applyTo(spinnerPositionSize);

		spinnerPositionSize.setMinimum(TourTrackConfigManager.TRACK_POSITION_SIZE_MIN);
		spinnerPositionSize.setMaximum(TourTrackConfigManager.TRACK_POSITION_SIZE_MAX);
		spinnerPositionSize.setIncrement(1);
		spinnerPositionSize.setPageIncrement(50);
		spinnerPositionSize.addSelectionListener(_defaultSelectionListener);
		spinnerPositionSize.addMouseWheelListener(_defaultMouseWheelListener);

		return spinnerPositionSize;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:DialogTourTrackConfig.java

示例4: fillSynthPolyphonySpinner

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
protected void fillSynthPolyphonySpinner( Spinner spinner ){
	int value = getIntegerValue( MidiSettings.SYNTH_POLYPHONY );
	int[] range = getSynth().getIntegerPropertyRange( MidiSettings.SYNTH_POLYPHONY );
	if( range.length == 2 && range[0] < range[1] ){
		spinner.setMinimum( range[0] );
		spinner.setMaximum( range[1] );
		spinner.setIncrement(1);
		spinner.setPageIncrement(1);
		if( value >= range[0] && value <= range[1] ){
			spinner.setSelection( value );
		}
	}
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:14,代码来源:MidiOutputPortSettings.java

示例5: initScaleGroup

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void initScaleGroup(final Composite parent) {
    final GridData gridData = new GridData();
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalAlignment = GridData.FILL;

    final Group scaleGroup = new Group(parent, SWT.NONE);
    scaleGroup.setLayoutData(gridData);
    scaleGroup.setText(ResourceString.getResourceString("label.page.scale.printing"));

    final GridLayout scaleGroupLayout = new GridLayout();
    scaleGroupLayout.marginWidth = 20;
    scaleGroupLayout.horizontalSpacing = 20;
    scaleGroupLayout.numColumns = 3;
    scaleGroup.setLayout(scaleGroupLayout);

    Label label = new Label(scaleGroup, SWT.NONE);
    label.setText(ResourceString.getResourceString("label.page.scale"));

    scaleSpinner = new Spinner(scaleGroup, SWT.BORDER);
    scaleSpinner.setIncrement(5);
    scaleSpinner.setMinimum(10);
    scaleSpinner.setMaximum(400);
    scaleSpinner.setSelection(100);

    label = new Label(scaleGroup, SWT.NONE);
    label.setText("%");

}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:29,代码来源:PageSettingDialog.java

示例6: setMarginSpinner

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void setMarginSpinner(final Spinner spinner) {
    spinner.setDigits(1);
    spinner.setIncrement(5);
    spinner.setMinimum(0);
    spinner.setMaximum(1000);
    spinner.setSelection(20);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:8,代码来源:PageSettingDialog.java

示例7: createSpinner

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private Spinner createSpinner(Composite parent, String label, boolean isFloat, String propertyName) {		
		Label l = new Label(parent, SWT.LEFT);
		l.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
		l.setText(label);
				
		Spinner sp = new Spinner(parent, SWT.BORDER);
		sp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		if (propertyName!=null && !propertyName.isEmpty())
			sp.setData("propertyName", propertyName);

	    // set the minimum value to 0.1
		sp.setMinimum(0);
	    // set the maximum value to 20
		sp.setMaximum((int) 1e6);
		
		if (isFloat) {
			// allow 3 decimal places
			sp.setDigits(FLOAT_DIGITS);
			sp.setIncrement(FLOAT_MULTIPLICATOR);
//			sp.setSelection(FLOAT_MULTIPLICATOR);
		} else {
			sp.setIncrement(0);
			sp.setIncrement(1);
//			sp.setSelection(1);			
		}
		sp.setSelection(0);
		sp.pack();
		
	    return sp;
		
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:32,代码来源:TextStyleTypeWidget.java

示例8: initScaleGroup

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void initScaleGroup(Composite parent) {
	GridData gridData = new GridData();
	gridData.grabExcessHorizontalSpace = true;
	gridData.horizontalAlignment = GridData.FILL;

	Group scaleGroup = new Group(parent, SWT.NONE);
	scaleGroup.setLayoutData(gridData);
	scaleGroup.setText(ResourceString
			.getResourceString("label.page.scale.printing"));

	GridLayout scaleGroupLayout = new GridLayout();
	scaleGroupLayout.marginWidth = 20;
	scaleGroupLayout.horizontalSpacing = 20;
	scaleGroupLayout.numColumns = 3;
	scaleGroup.setLayout(scaleGroupLayout);

	Label label = new Label(scaleGroup, SWT.NONE);
	label.setText(ResourceString.getResourceString("label.page.scale"));

	scaleSpinner = new Spinner(scaleGroup, SWT.BORDER);
	scaleSpinner.setIncrement(5);
	scaleSpinner.setMinimum(10);
	scaleSpinner.setMaximum(400);
	scaleSpinner.setSelection(100);

	label = new Label(scaleGroup, SWT.NONE);
	label.setText("%");

}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:30,代码来源:PageSettingDialog.java

示例9: setMarginSpinner

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void setMarginSpinner(Spinner spinner) {
	spinner.setDigits(1);
	spinner.setIncrement(5);
	spinner.setMinimum(0);
	spinner.setMaximum(1000);
	spinner.setSelection(20);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:PageSettingDialog.java

示例10: setupDirection

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private Spinner setupDirection(Composite parent) {
  Spinner result = new Spinner(parent, SWT.NONE);
  result.setMinimum(-180);
  result.setMaximum(180);
  result.setIncrement(1);
  result.setPageIncrement(10);
  return result;
}
 
开发者ID:google,项目名称:depan,代码行数:9,代码来源:CameraDirectionGroup.java

示例11: initScaleGroup

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void initScaleGroup(Composite parent) {
    final GridData gridData = new GridData();
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalAlignment = GridData.FILL;

    final Group scaleGroup = new Group(parent, SWT.NONE);
    scaleGroup.setLayoutData(gridData);
    scaleGroup.setBackground(ColorConstants.white);
    scaleGroup.setText(DisplayMessages.getMessage("label.page.scale.printing"));

    final GridLayout scaleGroupLayout = new GridLayout();
    scaleGroupLayout.marginWidth = 20;
    scaleGroupLayout.horizontalSpacing = 20;
    scaleGroupLayout.numColumns = 3;
    scaleGroup.setLayout(scaleGroupLayout);

    Label label = new Label(scaleGroup, SWT.NONE);
    label.setBackground(ColorConstants.white);
    label.setText(DisplayMessages.getMessage("label.page.scale"));

    scaleSpinner = new Spinner(scaleGroup, SWT.BORDER);
    scaleSpinner.setIncrement(5);
    scaleSpinner.setMinimum(10);
    scaleSpinner.setMaximum(400);
    scaleSpinner.setSelection(100);

    label = new Label(scaleGroup, SWT.NONE);
    label.setBackground(ColorConstants.white);
    label.setText("%");
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:31,代码来源:PageSettingDialog.java

示例12: setMarginSpinner

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void setMarginSpinner(Spinner spinner) {
    spinner.setDigits(1);
    spinner.setIncrement(5);
    spinner.setMinimum(0);
    spinner.setMaximum(1000);
    spinner.setSelection(20);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:8,代码来源:PageSettingDialog.java

示例13: createUI_100_Line

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void createUI_100_Line(final Composite parent) {

		{
			/*
			 * label: Line width
			 */
			final Label label = new Label(parent, SWT.NONE);
			GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(label);

			label.setText(Messages.TourTrack_Properties_Label_OutlineWidth);
			label.setToolTipText(Messages.TourTrack_Properties_Label_OutlineWidth_Tooltip);

			/*
			 * Spinner: Line width
			 */
			_spinnerOutlineWidth = new Spinner(parent, SWT.BORDER);
			GridDataFactory.fillDefaults() //
					.align(SWT.BEGINNING, SWT.FILL)
					.applyTo(_spinnerOutlineWidth);
			_spinnerOutlineWidth.setMinimum(TourTrackConfigManager.OUTLINE_WIDTH_MIN);
			_spinnerOutlineWidth.setMaximum(TourTrackConfigManager.OUTLINE_WIDTH_MAX);
			_spinnerOutlineWidth.setIncrement(1);
			_spinnerOutlineWidth.setPageIncrement(10);
			_spinnerOutlineWidth.addSelectionListener(_defaultSelectionListener);
			_spinnerOutlineWidth.addMouseWheelListener(_defaultMouseWheelListener);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:28,代码来源:DialogTourTrackConfig.java

示例14: postConstruct

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void postConstruct(final NumberFormat nf, final RangeContent range) {

		final int increment = range.getIncrement();

		final Spinner spinner = getControl();

		spinner.setDigits(nf.getMaximumFractionDigits());
		spinner.setMinimum(range.getMinimum());
		spinner.setMaximum(range.getMaximum());
		spinner.setIncrement(increment);
		spinner.setPageIncrement(increment * 10);

		spinner.addMouseWheelListener(_defaultMouseWheelListener);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:15,代码来源:SpinnerCellEditor.java

示例15: createUI_20_ImageSize

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
/**
 * spinner: thumb size
 */
private void createUI_20_ImageSize(final Composite parent) {

	_spinnerThumbSize = new Spinner(parent, SWT.BORDER);
	GridDataFactory.fillDefaults() //
			.align(SWT.BEGINNING, SWT.FILL)
			.applyTo(_spinnerThumbSize);
	_spinnerThumbSize.setMinimum(ImageGallery.MIN_GALLERY_ITEM_WIDTH);
	_spinnerThumbSize.setMaximum(ImageGallery.MAX_GALLERY_ITEM_WIDTH);
	_spinnerThumbSize.setIncrement(1);
	_spinnerThumbSize.setPageIncrement(50);
	_spinnerThumbSize.setToolTipText(UI.IS_OSX
			? Messages.Pic_Dir_Spinner_ThumbnailSize_Tooltip_OSX
			: Messages.Pic_Dir_Spinner_ThumbnailSize_Tooltip);
	_spinnerThumbSize.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(final SelectionEvent e) {
			_imageGallery.setThumbnailSize(_spinnerThumbSize.getSelection());
		}
	});
	_spinnerThumbSize.addMouseWheelListener(new MouseWheelListener() {
		public void mouseScrolled(final MouseEvent event) {
			Util.adjustSpinnerValueOnMouseScroll(event);
			_imageGallery.setThumbnailSize(_spinnerThumbSize.getSelection());
		}
	});
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:30,代码来源:GalleryActionBar.java


注:本文中的org.eclipse.swt.widgets.Spinner.setIncrement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。