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


Java MouseWheelListener类代码示例

本文整理汇总了Java中org.eclipse.swt.events.MouseWheelListener的典型用法代码示例。如果您正苦于以下问题:Java MouseWheelListener类的具体用法?Java MouseWheelListener怎么用?Java MouseWheelListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: initUI

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUI(final Composite parent) {

		_pc = new PixelConverter(parent);

		_defaultSelectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				onChangeUI();
			}
		};

		_defaultMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				UI.adjustSpinnerValueOnMouseScroll(event);
				onChangeUI();
			}
		};

	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:SlideoutMapBookmarks.java

示例2: createUI_0_init

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void createUI_0_init(final Composite parent) {

		if (_tk == null) {
			_tk = new FormToolkit(parent.getDisplay());
		}

		_defaultSelectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent event) {
				if (_isUpdateUI) {
					return;
				}
				onChangeProperty();
			}
		};

		_defaultMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				UI.adjustSpinnerValueOnMouseScroll(event);
				onChangeProperty();
			}
		};
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:SmoothingUI_Initial.java

示例3: initUI

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUI(final Composite parent) {

		_pc = new PixelConverter(parent);
		_hintDefaultSpinnerWidth = _isLinux ? SWT.DEFAULT : _pc.convertWidthInCharsToPixels(_isOSX ? 10 : 5);

		_selectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				if (_isUpdateUI) {
					return;
				}
				onModifySmoothing(e.widget, true);
			}
		};

		_spinnerMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				Util.adjustSpinnerValueOnMouseScroll(event);
				if (_isUpdateUI) {
					return;
				}
				onModifySmoothing(event.widget, true);
			}
		};
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:27,代码来源:SmoothingUI_Jamet.java

示例4: initUI

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUI(final Composite parent) {

		_defaultSelectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				onChangeUI();
			}
		};

		_defaultMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				net.tourbook.common.UI.adjustSpinnerValueOnMouseScroll(event);
				onChangeUI();
			}
		};
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:18,代码来源:SlideoutHRVOptions.java

示例5: initUI

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUI(final Composite parent) {

		_gridLineListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				onSelectGridLine();
			}
		};

		_defaultSelectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				onChangeUI();
			}
		};

		_defaultMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				net.tourbook.common.UI.adjustSpinnerValueOnMouseScroll(event);
				onChangeUI();
			}
		};
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:ChartOptions_Grid.java

示例6: initUITools

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUITools(final Composite parent) {

		_pc = new PixelConverter(parent);
		_hintDefaultSpinnerWidth = _isLinux ? SWT.DEFAULT : _pc.convertWidthInCharsToPixels(_isOSX ? 10 : 5);

		_defaultSelectionAdapter = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				onChangeProperty();
				enableControls();
			}
		};

		_defaultMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				UI.adjustSpinnerValueOnMouseScroll(event);
				onChangeProperty();
			}
		};
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:22,代码来源:PrefPageAppearance.java

示例7: removeMouseWheelListener

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
@Override
public void removeMouseWheelListener ( final MouseWheelListener listener )
{
    if ( !this.control.isDisposed () )
    {
        this.control.removeMouseWheelListener ( listener );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:ChartAreaRenderer.java

示例8: installMouseWheelScrollRecursively

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
public static  void installMouseWheelScrollRecursively( ScrolledComposite scrollable) {
	MouseWheelListener scroller = createMouseWheelScroller(scrollable);
	if (scrollable.getParent() != null)
	{	
	 scrollable.getParent().addMouseWheelListener(scroller);
	}	
	installMouseWheelScrollRecursively(scroller, scrollable);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:MouseWheelScrollingOnComposite.java

示例9: createMouseWheelScroller

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
public static   MouseWheelListener createMouseWheelScroller(final ScrolledComposite scrollable) {
	return new MouseWheelListener() {
		
		@Override
		public void mouseScrolled(MouseEvent e) {
			Point currentScroll = scrollable.getOrigin();
			scrollable.setOrigin(currentScroll.x, currentScroll.y - (e.count * 5));
		}
	};
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:MouseWheelScrollingOnComposite.java

示例10: installMouseWheelScrollRecursively

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
/**
 * make wheel scrolling available by installing a wheel listener on this scrollable's parent and hierarchy of
 * children
 * 
 * @param scrollable
 *            the scrolledComposite to wheel-scroll
 */
private void installMouseWheelScrollRecursively(final ScrolledComposite scrollable) {
	MouseWheelListener scroller = createMouseWheelScroller(scrollable);
	if (scrollable.getParent() != null){
		scrollable.getParent().addMouseWheelListener(scroller);
	}			
	installMouseWheelScrollRecursively(scroller, scrollable);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:15,代码来源:DebugDataViewer.java

示例11: createMouseWheelScroller

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private MouseWheelListener createMouseWheelScroller(final ScrolledComposite scrollable) {
	return new MouseWheelListener() {

		@Override
		public void mouseScrolled(MouseEvent e) {
			Point currentScroll = scrollable.getOrigin();
			scrollable.setOrigin(currentScroll.x, currentScroll.y - (e.count * 5));
		}
	};
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:DebugDataViewer.java

示例12: fromMouseWheelListener

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
public static Observable<MouseEvent> fromMouseWheelListener(Control control) {
    Observable<MouseEvent> observable = Observable.create(subscriber -> {
        MouseWheelListener wheelListener = e -> subscriber.onNext(e);
        control.addMouseWheelListener(wheelListener);
        subscriber.setDisposable(Disposables.fromAction(() -> control.removeMouseWheelListener(wheelListener)));
    });
    return wrap(control, observable);
}
 
开发者ID:zakgof,项目名称:rxswt,代码行数:9,代码来源:SwtObservers.java

示例13: initUI

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUI(final Composite parent) {

		_pc = new PixelConverter(parent);
		_tk = new FormToolkit(parent.getDisplay());
		_fontItalic = JFaceResources.getFontRegistry().getItalic(JFaceResources.DIALOG_FONT);

		_defaultSpinnerModifyListener = new ModifyListener() {
			@Override
			public void modifyText(final ModifyEvent e) {
				if (_isUpdateUI) {
					return;
				}
				onModifyHrBorder();
			}
		};

		_defaultSpinnerSelectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				if (_isUpdateUI) {
					return;
				}
				onModifyHrBorder();
			}
		};

		_defaultSpinnerMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				Util.adjustSpinnerValueOnMouseScroll(event);
				if (_isUpdateUI) {
					return;
				}
				onModifyHrBorder();
			}
		};

	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:39,代码来源:TrainingView.java

示例14: createUI_48_SegmenterBy_MinAltitude

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private Composite createUI_48_SegmenterBy_MinAltitude(final Composite parent) {

		final Composite container = new Composite(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
		GridLayoutFactory.fillDefaults().numColumns(5).applyTo(container);
		{
			// label: min alti diff
			final Label label = new Label(container, SWT.NONE);
			label.setText(Messages.tour_segmenter_segType_byUpDownAlti_label);

			// spinner: minimum altitude
			_spinnerMinAltitude = new Spinner(container, SWT.BORDER);
			GridDataFactory.fillDefaults().applyTo(_spinnerMinAltitude);
			_spinnerMinAltitude.setMinimum(1); // 0.1
			_spinnerMinAltitude.setMaximum(10000); // 1000
			_spinnerMinAltitude.setDigits(1);
			_spinnerMinAltitude.addSelectionListener(new SelectionAdapter() {
				@Override
				public void widgetSelected(final SelectionEvent e) {
					createSegments(true);
				}
			});
			_spinnerMinAltitude.addMouseWheelListener(new MouseWheelListener() {
				@Override
				public void mouseScrolled(final MouseEvent event) {
					UI.adjustSpinnerValueOnMouseScroll(event);
					onSelect_BreakTime();
				}
			});

			// label: unit
			_lblMinAltitude = new Label(container, SWT.NONE);
			_lblMinAltitude.setText(net.tourbook.common.UI.UNIT_LABEL_ALTITUDE);

			_lblAltitudeUpMin = createUI_DP_Info(container);
			_btnSaveTourMin = createUI_DB_SaveTour(container);
		}

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

示例15: initUI

import org.eclipse.swt.events.MouseWheelListener; //导入依赖的package包/类
private void initUI(final Composite parent) {

		_tk = new FormToolkit(parent.getDisplay());

		_defaultSpinnerModifyListener = new ModifyListener() {
			@Override
			public void modifyText(final ModifyEvent e) {
				if (_isUpdateUI) {
					return;
				}
				onModifyMinMaxTime();
			}
		};

		_defaultSpinnerSelectionListener = new SelectionAdapter() {
			@Override
			public void widgetSelected(final SelectionEvent e) {
				if (_isUpdateUI) {
					return;
				}
				onModifyMinMaxTime();
			}
		};

		_defaultSpinnerMouseWheelListener = new MouseWheelListener() {
			@Override
			public void mouseScrolled(final MouseEvent event) {
				Util.adjustSpinnerValueOnMouseScroll(event);
				if (_isUpdateUI) {
					return;
				}
				onModifyMinMaxTime();
			}
		};
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:36,代码来源:HeartRateVariabilityView.java


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