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


Java Spinner.addMouseWheelListener方法代码示例

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


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

示例1: 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

示例2: createUI_10_LatLonDigits

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

		final SelectionListener _selectionAdapterLatLonDigits = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				onSelect_LatLonDigits();
			}
		};

		/*
		 * Lat/lon digits
		 */
		{
			// label: lat/lon digits
			_lblLatLonDigits = new Label(parent, SWT.NONE);
			GridDataFactory.fillDefaults()//
					.align(SWT.FILL, SWT.CENTER)
					.applyTo(_lblLatLonDigits);
			_lblLatLonDigits.setText(Messages.Slideout_TourEditor_Label_LatLonDigits);
			_lblLatLonDigits.setToolTipText(Messages.Slideout_TourEditor_Label_LatLonDigits_Tooltip);

			// spinner
			_spinnerLatLonDigits = new Spinner(parent, SWT.BORDER);
			GridDataFactory.fillDefaults() //
					.align(SWT.END, SWT.CENTER)
					.applyTo(_spinnerLatLonDigits);
			_spinnerLatLonDigits.setMinimum(0);
			_spinnerLatLonDigits.setMaximum(20);
			_spinnerLatLonDigits.addMouseWheelListener(new MouseWheelListener() {
				@Override
				public void mouseScrolled(final MouseEvent event) {
					UI.adjustSpinnerValueOnMouseScroll(event);
					onSelect_LatLonDigits();
				}
			});
			_spinnerLatLonDigits.addSelectionListener(_selectionAdapterLatLonDigits);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:39,代码来源:SlideoutViewSettings.java

示例3: createUI_55_Field_Weight

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

		Label label = new Label(parent, SWT.NONE);
		label.setText(Messages.Pref_People_Label_weight);

		final Composite containerWeight = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults()//
				.applyTo(containerWeight);
		GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerWeight);
		{
			// spinner: weight
			_spinnerWeight = new Spinner(containerWeight, SWT.BORDER);
			GridDataFactory.fillDefaults() //
					.align(SWT.BEGINNING, SWT.FILL)
//					.hint(_spinnerWidth, SWT.DEFAULT)
					.applyTo(_spinnerWeight);
			_spinnerWeight.setDigits(1);
			_spinnerWeight.setMinimum(0);
			_spinnerWeight.setMaximum(3000); // 300.0 kg
			_spinnerWeight.addSelectionListener(_defaultSelectionListener);
			_spinnerWeight.addMouseWheelListener(new MouseWheelListener() {
				@Override
				public void mouseScrolled(final MouseEvent event) {
					UI.adjustSpinnerValueOnMouseScroll(event);
					onModifyPerson();
				}
			});

			// label: unit
			label = new Label(containerWeight, SWT.NONE);
			label.setText(UI.UNIT_WEIGHT_KG);
		}

		// 3rd column filler
		new Label(parent, SWT.NONE);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:40,代码来源:PrefPagePeople.java

示例4: createUI_22_SmoothGradient

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

		/*
		 * image: gradient
		 */
		_iconGradient = new CLabel(parent, SWT.NONE);
		GridDataFactory.fillDefaults().indent(16, 0).applyTo(_iconGradient);
		_iconGradient.setBackground(_tk.getColors().getBackground());
		_iconGradient.setImage(_imageGradient);

		/*
		 * label: smooth gradient
		 */
		final Label label = _tk.createLabel(parent, Messages.TourChart_Smoothing_Label_GradientSmoothing, SWT.CHECK);
		GridDataFactory.fillDefaults() //
				.align(SWT.FILL, SWT.CENTER)
				.applyTo(label);
		label.setToolTipText(Messages.TourChart_Smoothing_Label_GradientSmoothing_Tooltip);

		/*
		 * spinner: gradient tau
		 */
		_spinnerGradientTau = new Spinner(parent, SWT.BORDER);
		GridDataFactory.fillDefaults()//
				.align(SWT.BEGINNING, SWT.FILL)
				.applyTo(_spinnerGradientTau);
		_spinnerGradientTau.setDigits(1);
		_spinnerGradientTau.setMinimum(1);
		_spinnerGradientTau.setMaximum(MAX_TAU);
		_spinnerGradientTau.addSelectionListener(_selectionListener);
		_spinnerGradientTau.addMouseWheelListener(_spinnerMouseWheelListener);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:33,代码来源:SmoothingUI_Jamet.java

示例5: createUI_56_Field_Height

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

		Label label = new Label(parent, SWT.NONE);
		label.setText(Messages.Pref_People_Label_height);

		final Composite containerHeight = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults()//
				.applyTo(containerHeight);
		GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerHeight);
		{
			// spinner: height
			_spinnerHeight = new Spinner(containerHeight, SWT.BORDER);
			GridDataFactory.fillDefaults()//
					.align(SWT.BEGINNING, SWT.FILL)
//					.hint(_spinnerWidth, SWT.DEFAULT)
					.applyTo(_spinnerHeight);
			_spinnerHeight.setDigits(2);
			_spinnerHeight.setMinimum(0);
			_spinnerHeight.setMaximum(300); // 3.00 m
			_spinnerHeight.addSelectionListener(_defaultSelectionListener);
			_spinnerHeight.addMouseWheelListener(new MouseWheelListener() {
				@Override
				public void mouseScrolled(final MouseEvent event) {
					UI.adjustSpinnerValueOnMouseScroll(event);
					onModifyPerson();
				}
			});

			// label: unit
			label = new Label(containerHeight, SWT.NONE);
			label.setText(UI.UNIT_METER);
		}

		// filler
		new Label(parent, SWT.NONE);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:40,代码来源:PrefPagePeople.java

示例6: createUI_52_BreakByAvgSpeed

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

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
		GridLayoutFactory.fillDefaults().numColumns(3).applyTo(container);
//		container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
		{
			/*
			 * minimum average speed
			 */

			// label: minimum speed
			Label label = new Label(container, SWT.NONE);
			label.setText(Messages.Compute_BreakTime_Label_MinimumAvgSpeed);
			_firstColBreakTime.add(label);

			// spinner: minimum speed
			_spinnerBreakMinAvgSpeed = new Spinner(container, SWT.BORDER);
			GridDataFactory
					.fillDefaults()//
					.applyTo(_spinnerBreakMinAvgSpeed);
			_spinnerBreakMinAvgSpeed.setMinimum(0); // 0.0 km/h
			_spinnerBreakMinAvgSpeed.setMaximum(BREAK_MAX_SPEED_KM_H); // 10.0 km/h
			_spinnerBreakMinAvgSpeed.setDigits(1);
			_spinnerBreakMinAvgSpeed.addSelectionListener(_selectionListener);
			_spinnerBreakMinAvgSpeed.addMouseWheelListener(_spinnerMouseWheelListener);

			// label: km/h
			label = new Label(container, SWT.NONE);
			label.setText(net.tourbook.common.UI.UNIT_LABEL_SPEED);

			/*
			 * label: description
			 */
			label = new Label(container, SWT.WRAP);
			GridDataFactory
					.fillDefaults()//
					.span(3, 1)
					.indent(0, DEFAULT_V_DISTANCE_PARAGRAPH)
					.hint(DEFAULT_DESCRIPTION_WIDTH, SWT.DEFAULT)
					.grab(true, false)
					.applyTo(label);
			label.setText(Messages.Compute_BreakTime_Label_Description_ComputeByAvgSpeed);
		}

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

示例7: createUI_110_DirectionArrow

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

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

			label.setText(Messages.TourTrack_Properties_Label_DirectionArrow);
			label.setToolTipText(Messages.TourTrack_Properties_Label_DirectionArrow_Tooltip);

			final Composite container = new Composite(parent, SWT.NONE);
			GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
			GridLayoutFactory.fillDefaults().numColumns(2).applyTo(container);
			{
				/*
				 * Size
				 */
				_spinnerDirectionArrowSize = new Spinner(container, SWT.BORDER);
				GridDataFactory.fillDefaults() //
						.align(SWT.BEGINNING, SWT.FILL)
						.applyTo(_spinnerDirectionArrowSize);
				_spinnerDirectionArrowSize.setMinimum(TourTrackConfigManager.DIRECTION_ARROW_SIZE_MIN);
				_spinnerDirectionArrowSize.setMaximum(TourTrackConfigManager.DIRECTION_ARROW_SIZE_MAX);
				_spinnerDirectionArrowSize.setIncrement(10);
				_spinnerDirectionArrowSize.setPageIncrement(50);
				_spinnerDirectionArrowSize.addSelectionListener(_defaultSelectionListener);
				_spinnerDirectionArrowSize.addMouseWheelListener(_defaultMouseWheelListener);

				/*
				 * Vertical distance
				 */
				_spinnerDirectionArrowDistance = new Spinner(container, SWT.BORDER);
				GridDataFactory.fillDefaults() //
						.align(SWT.BEGINNING, SWT.FILL)
						.applyTo(_spinnerDirectionArrowDistance);
				_spinnerDirectionArrowDistance.setMinimum(TourTrackConfigManager.DIRECTION_ARROW_VERTICAL_DISTANCE_MIN);
				_spinnerDirectionArrowDistance.setMaximum(TourTrackConfigManager.DIRECTION_ARROW_VERTICAL_DISTANCE_MAX);
				_spinnerDirectionArrowDistance.setIncrement(1);
				_spinnerDirectionArrowDistance.setPageIncrement(5);
				_spinnerDirectionArrowDistance.addSelectionListener(_defaultSelectionListener);
				_spinnerDirectionArrowDistance.addMouseWheelListener(_defaultMouseWheelListener);
			}
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:50,代码来源:DialogTourTrackConfig.java

示例8: createUI_20_AdjustImportYear

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

		final Group group = new Group(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
		group.setText(Messages.PrefPage_HAC45_Group);
		GridLayoutFactory.swtDefaults().numColumns(2).applyTo(group);
		{
			// checkbox: adjust import year
			{
				_chkAdjustImportYear = new Button(group, SWT.CHECK);
				GridDataFactory.fillDefaults().span(2, 1).applyTo(_chkAdjustImportYear);
				_chkAdjustImportYear.setText(Messages.PrefPage_HAC45_Checkbox_AdjustImportYear);
				_chkAdjustImportYear.addSelectionListener(new SelectionAdapter() {
					@Override
					public void widgetSelected(final SelectionEvent e) {
						enableControls();
					}
				});
			}

			// label: import year
			{
				_lblImportYear = new Label(group, SWT.NONE);
				GridDataFactory.fillDefaults()//
						.align(SWT.BEGINNING, SWT.CENTER)
						.indent(_pc.convertHorizontalDLUsToPixels(12), 0)
						.applyTo(_lblImportYear);
				_lblImportYear.setText(Messages.PrefPage_HAC45_Label_ImportYear);
			}

			// spinner: import year
			{
				_spinnerImportYear = new Spinner(group, SWT.BORDER);
				GridDataFactory.fillDefaults() //
						.align(SWT.BEGINNING, SWT.FILL)
						.applyTo(_spinnerImportYear);
				_spinnerImportYear.setPageIncrement(10);
				_spinnerImportYear.setMaximum(3000);
				_spinnerImportYear.setMinimum(1800);
				_spinnerImportYear.addMouseWheelListener(new MouseWheelListener() {
					@Override
					public void mouseScrolled(final MouseEvent event) {
						Util.adjustSpinnerValueOnMouseScroll(event);
					}
				});
			}
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:49,代码来源:PrefPageImportHAC45.java

示例9: createUI_50_IgnoreLastMarker

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

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
		GridLayoutFactory
				.fillDefaults()//
				.numColumns(3)
				.extendedMargins(5, 5, 15, 5)
				.spacing(20, 5)
				.applyTo(container);
		{
			/*
			 * Marker
			 */

			// checkbox: ignore last marker
			{
				_chkIgnoreLastMarker = new Button(container, SWT.CHECK);
				GridDataFactory.fillDefaults().span(3, 1).applyTo(_chkIgnoreLastMarker);
				_chkIgnoreLastMarker.setText(Messages.PrefPage_Fit_Checkbox_IgnoreLastMarker);
				_chkIgnoreLastMarker.addSelectionListener(_defaultSelectionListener);
			}

			// label: info
			{
				_lblIgnorLastMarker_Info = createUI_InfoLabel(container, 3);
				_lblIgnorLastMarker_Info.setText(Messages.PrefPage_Fit_Label_IgnoreLastMarker_Info);
			}

			// label: ignore time slices
			{
				_lblIgnorLastMarker_TimeSlices = new Label(container, SWT.NONE);
				_lblIgnorLastMarker_TimeSlices.setText(Messages.PrefPage_Fit_Label_IgnoreLastMarker_TimeSlices);
			}

			// spinner
			{
				_spinnerIgnorLastMarker_TimeSlices = new Spinner(container, SWT.BORDER);
				GridDataFactory
						.fillDefaults() //
						.align(SWT.BEGINNING, SWT.FILL)
						.applyTo(_spinnerIgnorLastMarker_TimeSlices);
				_spinnerIgnorLastMarker_TimeSlices.setMinimum(0);
				_spinnerIgnorLastMarker_TimeSlices.setMaximum(1000);
				_spinnerIgnorLastMarker_TimeSlices.setPageIncrement(10);
				_spinnerIgnorLastMarker_TimeSlices.addMouseWheelListener(new MouseWheelListener() {
					@Override
					public void mouseScrolled(final MouseEvent event) {
						Util.adjustSpinnerValueOnMouseScroll(event);
					}
				});
			}
		}

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

示例10: createUI_580_IL_LastMarker

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

		{
			/*
			 * Checkbox: Last marker
			 */
			_chkIL_SetLastMarker = new Button(parent, SWT.CHECK);
			_chkIL_SetLastMarker.setText(Messages.Dialog_ImportConfig_Checkbox_LastMarker);
			_chkIL_SetLastMarker.setToolTipText(Messages.Dialog_ImportConfig_Checkbox_LastMarker_Tooltip);
			_chkIL_SetLastMarker.addSelectionListener(_defaultModify_Listener);
			GridDataFactory
					.fillDefaults()//
					.span(2, 1)
					.indent(0, 5)
					.applyTo(_chkIL_SetLastMarker);
		}

		{
			/*
			 * Last marker distance
			 */
			// label
			_lblIL_LastMarker = new Label(parent, SWT.NONE);
			_lblIL_LastMarker.setText(Messages.Dialog_ImportConfig_Label_LastMarkerDistance);
			_lblIL_LastMarker.setToolTipText(Messages.Dialog_ImportConfig_Label_LastMarkerDistance_Tooltip);
			GridDataFactory
					.fillDefaults()//
					.align(SWT.FILL, SWT.CENTER)
					.indent(_leftPadding, 0)
					.applyTo(_lblIL_LastMarker);

			final Composite container = new Composite(parent, SWT.NONE);
//			GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
			GridLayoutFactory.fillDefaults().numColumns(2).applyTo(container);
			{
				// spinner: distance 1.1 km
				_spinnerIL_LastMarkerDistance = new Spinner(container, SWT.BORDER);
				_spinnerIL_LastMarkerDistance.setMaximum(EasyConfig.LAST_MARKER_DISTANCE_MAX / 100);
				_spinnerIL_LastMarkerDistance.setMinimum(EasyConfig.LAST_MARKER_DISTANCE_MIN);
				_spinnerIL_LastMarkerDistance.setDigits(1);
				_spinnerIL_LastMarkerDistance.addMouseWheelListener(_defaultModify_MouseWheelListener);
				_spinnerIL_LastMarkerDistance.addSelectionListener(_defaultModify_Listener);
				GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(_spinnerIL_LastMarkerDistance);

				// label: unit
				_lblIL_LastMarkerDistanceUnit = new Label(container, SWT.NONE);
				_lblIL_LastMarkerDistanceUnit.setText(UI.UNIT_LABEL_DISTANCE);
				GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(_lblIL_LastMarkerDistanceUnit);
			}
		}

		{
			/*
			 * Marker text
			 */

			// label
			_lblIL_LastMarkerText = new Label(parent, SWT.NONE);
			_lblIL_LastMarkerText.setText(Messages.Dialog_ImportConfig_Label_LastMarkerText);
			GridDataFactory
					.fillDefaults()//
					.align(SWT.FILL, SWT.CENTER)
					.indent(_leftPadding, 0)
					.applyTo(_lblIL_LastMarkerText);

			// text
			_txtIL_LastMarker = new Text(parent, SWT.BORDER);
			GridDataFactory
					.fillDefaults()//
					.grab(true, false)
					.applyTo(_txtIL_LastMarker);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:74,代码来源:DialogEasyImportConfig.java

示例11: createUI_10_Toolbar

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

		_toolbar = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults()//
				.grab(true, false)
				.align(SWT.BEGINNING, SWT.FILL)
				.applyTo(_toolbar);
		GridLayoutFactory.fillDefaults()//
				.numColumns(6)
				.margins(3, 3)
				.applyTo(_toolbar);
//		container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
		{
			/*
			 * label: hr min
			 */
			_lblHrMin = new Label(_toolbar, SWT.NONE);
			GridDataFactory.fillDefaults()//
//					.indent(5, 0)
					.align(SWT.BEGINNING, SWT.CENTER)
					.applyTo(_lblHrMin);
			_lblHrMin.setText(Messages.Training_View_Label_LeftChartBorder);
			_lblHrMin.setToolTipText(Messages.Training_View_Label_LeftChartBorder_Tooltip);

			/*
			 * spinner: hr min
			 */
			_spinnerHrLeft = new Spinner(_toolbar, SWT.BORDER);
			_spinnerHrLeft.setMinimum(HR_LEFT_MIN_BORDER);
			_spinnerHrLeft.setMaximum(HR_RIGHT_MAX_BORDER);
			_spinnerHrLeft.addModifyListener(_defaultSpinnerModifyListener);
			_spinnerHrLeft.addSelectionListener(_defaultSpinnerSelectionListener);
			_spinnerHrLeft.addMouseWheelListener(_defaultSpinnerMouseWheelListener);

			/*
			 * label: hr max
			 */
			_lblHrMax = new Label(_toolbar, SWT.NONE);
			GridDataFactory.fillDefaults()//
					.align(SWT.BEGINNING, SWT.CENTER)
					.applyTo(_lblHrMax);
			_lblHrMax.setText(Messages.Training_View_Label_RightChartBorder);
			_lblHrMax.setToolTipText(Messages.Training_View_Label_RightChartBorder_Tooltip);

			/*
			 * spinner: hr max
			 */
			_spinnerHrRight = new Spinner(_toolbar, SWT.BORDER);
			_spinnerHrRight.setMinimum(HR_LEFT_MIN_BORDER);
			_spinnerHrRight.setMaximum(HR_RIGHT_MAX_BORDER);
			_spinnerHrRight.addModifyListener(_defaultSpinnerModifyListener);
			_spinnerHrRight.addSelectionListener(_defaultSpinnerSelectionListener);
			_spinnerHrRight.addMouseWheelListener(_defaultSpinnerMouseWheelListener);

			/*
			 * toolbar actions
			 */
			final ToolBar toolbar = new ToolBar(_toolbar, SWT.FLAT);
			GridDataFactory.fillDefaults()//
					.align(SWT.BEGINNING, SWT.CENTER)
					.applyTo(toolbar);
			_headerToolbarManager = new ToolBarManager(toolbar);
		}

//		// label: horizontal separator
//		final Label label = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
//		GridDataFactory.fillDefaults()//
//				.grab(true, false)
//				.hint(SWT.DEFAULT, 1)
//				.applyTo(label);
//		label.setText(UI.EMPTY_STRING);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:73,代码来源:TrainingView.java

示例12: createUI_20_Options

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

		{
			/*
			 * Checkbox: Show segment line
			 */
			_chkShowSegmentLine = new Button(parent, SWT.CHECK);
			GridDataFactory.fillDefaults()//
					.span(2, 1)
					.applyTo(_chkShowSegmentLine);
			_chkShowSegmentLine.setText(Messages.Slideout_SegmenterChartOptions_Checkbox_IsShowSegmentLine);
			_chkShowSegmentLine.addSelectionListener(_defaultSelectionAdapter);
		}
		{
			/*
			 * Line opacity
			 */
			// Label
			_lblLineOpacity = new Label(parent, SWT.NONE);
			GridDataFactory.fillDefaults()//
					.align(SWT.FILL, SWT.CENTER)
					.applyTo(_lblLineOpacity);
			_lblLineOpacity.setText(Messages.Slideout_SegmenterChartOptions_Label_LineOpacity);
			_lblLineOpacity.setToolTipText(Messages.Slideout_SegmenterChartOptions_Label_Opacity_Tooltip);

			// Spinner:
			_spinLineOpacity = new Spinner(parent, SWT.BORDER);
			_spinLineOpacity.setMinimum(0);
			_spinLineOpacity.setMaximum(100);
			_spinLineOpacity.setPageIncrement(10);
			_spinLineOpacity.addSelectionListener(_defaultSelectionAdapter);
			_spinLineOpacity.addMouseWheelListener(_defaultMouseWheelListener);
		}
		{
			/*
			 * Checkbox: Show segment marker
			 */
			_chkShowSegmentMarker = new Button(parent, SWT.CHECK);
			GridDataFactory.fillDefaults()//
					.span(2, 1)
					.applyTo(_chkShowSegmentMarker);
			_chkShowSegmentMarker.setText(Messages.Slideout_SegmenterChartOptions_Checkbox_IsShowSegmentMarker);
			_chkShowSegmentMarker.addSelectionListener(_defaultSelectionAdapter);
		}
		{
			/*
			 * Graph opacity
			 */
			// Label
			_lblGraphOpacity = new Label(parent, SWT.NONE);
			GridDataFactory.fillDefaults()//
					.align(SWT.FILL, SWT.CENTER)
					.applyTo(_lblGraphOpacity);
			_lblGraphOpacity.setText(Messages.Slideout_SegmenterChartOptions_Label_GraphOpacity);
			_lblGraphOpacity.setToolTipText(Messages.Slideout_SegmenterChartOptions_Label_Opacity_Tooltip);

			// Spinner:
			_spinGraphOpacity = new Spinner(parent, SWT.BORDER);
			_spinGraphOpacity.setMinimum(0);
			_spinGraphOpacity.setMaximum(100);
			_spinGraphOpacity.setPageIncrement(10);
			_spinGraphOpacity.addSelectionListener(_defaultSelectionAdapter);
			_spinGraphOpacity.addMouseWheelListener(_defaultMouseWheelListener);
		}
		{
			/*
			 * Checkbox: Show segment tooltip
			 */
			_chkShowSegmentTooltip = new Button(parent, SWT.CHECK);
			GridDataFactory.fillDefaults()//
					.span(2, 1)
					.applyTo(_chkShowSegmentTooltip);
			_chkShowSegmentTooltip.setText(Messages.Slideout_SegmenterChartOptions_Checkbox_IsShowSegmentTooltip);
			_chkShowSegmentTooltip.addSelectionListener(_defaultSelectionAdapter);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:77,代码来源:SlideoutTourChartSegmenterProperties.java

示例13: createUI_20_TourCache

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

		final int verticalIndent = 20;

		final Group group = new Group(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
		group.setText(Messages.Pref_Tour_Group_TourCache);
		GridLayoutFactory.swtDefaults().numColumns(2).applyTo(group);
		{
			/*
			 * label: info
			 */
			Label label = new Label(group, SWT.WRAP);
			GridDataFactory.fillDefaults()//
					.hint(_defaultInfoWidth, SWT.DEFAULT)
					.grab(true, false)
					.span(2, 1)
					.applyTo(label);
			label.setText(Messages.Pref_Tour_Label_TourCacheSize_Info);

			/*
			 * label: cache size
			 */
			label = new Label(group, NONE);
			GridDataFactory.fillDefaults()//
					.indent(0, verticalIndent)
					.align(SWT.BEGINNING, SWT.CENTER)
					.applyTo(label);
			label.setText(Messages.Pref_Tour_Label_TourCacheSize);

			// spinner: cache size
			_spinnerTourCacheSize = new Spinner(group, SWT.BORDER);
			GridDataFactory.fillDefaults()//
					.indent(0, verticalIndent)
					.hint(_defaultSpinnerWidth, SWT.DEFAULT)
					.align(SWT.BEGINNING, SWT.CENTER)
					.applyTo(_spinnerTourCacheSize);
			_spinnerTourCacheSize.setMinimum(0);
			_spinnerTourCacheSize.setMaximum(100000);
			_spinnerTourCacheSize.addMouseWheelListener(_defaultMouseWheelListener);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:43,代码来源:PrefPageTour.java

示例14: createUI_50_Border

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

		/*
		 * Checkbox: paint with border
		 */
		{
			_chkPaintWithBorder = new Button(parent, SWT.CHECK);
			GridDataFactory.fillDefaults()//
					.grab(true, false)
					.span(2, 1)
					.applyTo(_chkPaintWithBorder);
			_chkPaintWithBorder.setText(Messages.pref_map_layout_PaintBorder);
			_chkPaintWithBorder.addSelectionListener(_defaultSelectionListener);
		}

		/*
		 * border width
		 */
		{
			// label: border width
			_lblBorderWidth = new Label(parent, NONE);
			GridDataFactory.fillDefaults()//
					.indent(_firstColumnIndent, 0)
					.applyTo(_lblBorderWidth);
			_lblBorderWidth.setText(Messages.pref_map_layout_BorderWidth);

			// spinner: border width
			_spinnerBorderWidth = new Spinner(parent, SWT.BORDER);
			_spinnerBorderWidth.setMinimum(1);
			_spinnerBorderWidth.setMaximum(30);
			_spinnerBorderWidth.addSelectionListener(_defaultSelectionListener);
			_spinnerBorderWidth.addMouseWheelListener(_defaultMouseWheelListener);
		}

		/*
		 * Border color
		 */
		{
			// label
			_lblBorderColor = new Label(parent, NONE);
			GridDataFactory.fillDefaults()//
					.indent(_firstColumnIndent, 0)
					.align(SWT.FILL, SWT.BEGINNING)
					.applyTo(_lblBorderColor);
			_lblBorderColor.setText(Messages.Pref_MapLayout_Label_BorderColor);

			final Composite containerBorderColor = new Composite(parent, SWT.NONE);
			GridDataFactory.fillDefaults()//
					.grab(true, false)
					.applyTo(containerBorderColor);
			GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerBorderColor);
			{
				// Radio: darker
				_rdoBorderColorDarker = new Button(containerBorderColor, SWT.RADIO);
				_rdoBorderColorDarker.setText(Messages.Pref_MapLayout_Checkbox_BorderColor_Darker);
				_rdoBorderColorDarker.addSelectionListener(_defaultSelectionListener);

				// spinner: border width
				_spinnerBorderColorDarker = new Spinner(containerBorderColor, SWT.BORDER);
				_spinnerBorderColorDarker.setMinimum(0);
				_spinnerBorderColorDarker.setMaximum(100);
				_spinnerBorderColorDarker.setPageIncrement(10);
				_spinnerBorderColorDarker.addSelectionListener(_defaultSelectionListener);
				_spinnerBorderColorDarker.addMouseWheelListener(_defaultMouseWheelListener);

				// Radio: color
				_rdoBorderColorColor = new Button(containerBorderColor, SWT.RADIO);
				_rdoBorderColorColor.setText(Messages.Pref_MapLayout_Checkbox_BorderColor_Color);
				_rdoBorderColorColor.addSelectionListener(_defaultSelectionListener);

				// border color
				_colorBorderColor = new ColorSelector(containerBorderColor);
				_colorBorderColor.addListener(_defaultChangePropertyListener);
			}
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:77,代码来源:PrefPageMap2Appearance.java

示例15: createUI_30_Iterations

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

		/*
		 * sync smoothing
		 */
		{
			_chkIsSynchSmoothing = _tk.createButton(
					parent,
					Messages.TourChart_Smoothing_Checkbox_IsSyncSmoothing,
					SWT.CHECK);
			GridDataFactory.fillDefaults() //
					.align(SWT.FILL, SWT.CENTER)
					.span(3, 1)
					.indent(0, 10)
					.applyTo(_chkIsSynchSmoothing);
			_chkIsSynchSmoothing.setToolTipText(Messages.TourChart_Smoothing_Checkbox_IsSyncSmoothing_Tooltip);
			_chkIsSynchSmoothing.addSelectionListener(_selectionListener);
		}

		/*
		 * repeated smoothing
		 */
		{
			_lblRepeatedSmoothing = _tk.createLabel(parent, Messages.TourChart_Smoothing_Label_RepeatedSmoothing);
			GridDataFactory.fillDefaults() //
					.align(SWT.FILL, SWT.CENTER)
					.span(2, 1)
					.indent(0, 10)
					.applyTo(_lblRepeatedSmoothing);
			_lblRepeatedSmoothing.setToolTipText(Messages.TourChart_Smoothing_Label_RepeatedSmoothing_Tooltip);

			/*
			 * spinner: repeated smoothing
			 */
			_spinnerRepeatedSmoothing = new Spinner(parent, SWT.BORDER);
			GridDataFactory.fillDefaults()//
					.align(SWT.BEGINNING, SWT.FILL)
					.indent(0, 10)
					.hint(_hintDefaultSpinnerWidth, SWT.DEFAULT)
					.applyTo(_spinnerRepeatedSmoothing);
			_spinnerRepeatedSmoothing.setMinimum(0);
			_spinnerRepeatedSmoothing.setMaximum(10);
			_spinnerRepeatedSmoothing.addSelectionListener(_selectionListener);
			_spinnerRepeatedSmoothing.addMouseWheelListener(_spinnerMouseWheelListener);
		}

		/*
		 * repeated tau
		 */
		{
			_lblRepeatedTau = _tk.createLabel(parent, Messages.TourChart_Smoothing_Label_RepeatedTau);
			GridDataFactory.fillDefaults() //
					.align(SWT.FILL, SWT.CENTER)
					.span(2, 1)
					.applyTo(_lblRepeatedTau);
			_lblRepeatedTau.setToolTipText(Messages.TourChart_Smoothing_Label_RepeatedTau_Tooltip);

			/*
			 * spinner: repeated tau
			 */
			_spinnerRepeatedTau = new Spinner(parent, SWT.BORDER);
			GridDataFactory.fillDefaults()//
					.align(SWT.BEGINNING, SWT.FILL)
					.hint(_hintDefaultSpinnerWidth, SWT.DEFAULT)
					.applyTo(_spinnerRepeatedTau);
			_spinnerRepeatedTau.setDigits(1);
			_spinnerRepeatedTau.setMinimum(1);
			_spinnerRepeatedTau.setMaximum(10);
			_spinnerRepeatedTau.addSelectionListener(_selectionListener);
			_spinnerRepeatedTau.addMouseWheelListener(_spinnerMouseWheelListener);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:73,代码来源:SmoothingUI_Jamet.java


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