本文整理汇总了Java中org.eclipse.swt.widgets.Spinner.setPageIncrement方法的典型用法代码示例。如果您正苦于以下问题:Java Spinner.setPageIncrement方法的具体用法?Java Spinner.setPageIncrement怎么用?Java Spinner.setPageIncrement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.Spinner
的用法示例。
在下文中一共展示了Spinner.setPageIncrement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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 );
}
}
}
示例3: 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;
}
示例4: 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);
}
}
示例5: updateUI_PropertyDetail_Number_Integer
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void updateUI_PropertyDetail_Number_Integer(final TourFilterProperty filterProperty, final int fieldNo) {
final TourFilterFieldConfig fieldConfig = filterProperty.fieldConfig;
final FieldValueConverter fieldValueProvider = fieldConfig.fieldValueConverter;
Spinner spinner;
double modelValue;
if (fieldNo == 1) {
modelValue = filterProperty.intValue1;
spinner = filterProperty.uiSpinner_Number1;
} else {
modelValue = filterProperty.intValue2;
spinner = filterProperty.uiSpinner_Number2;
}
double uiValue = modelValue;
if (fieldValueProvider != null) {
uiValue = fieldValueProvider.convert_Model_To_UI(modelValue);
}
spinner.setSelection((int) (uiValue + 0.5));
spinner.setMinimum(fieldConfig.minValue);
spinner.setMaximum(fieldConfig.maxValue);
spinner.setPageIncrement(fieldConfig.pageIncrement);
}
示例6: createUI_20_Controls
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void createUI_20_Controls(final Composite parent) {
final Composite ttContainer = new Composite(parent, SWT.NONE);
GridDataFactory
.fillDefaults()//
.grab(true, false)
.span(2, 1)
.applyTo(ttContainer);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(ttContainer);
{
{
/*
* Tooltip delay
*/
// Label
_lblTooltipDelay = new Label(ttContainer, SWT.NONE);
GridDataFactory
.fillDefaults()//
.align(SWT.FILL, SWT.CENTER)
// .indent(_pc.convertWidthInCharsToPixels(3), 0)
.applyTo(_lblTooltipDelay);
_lblTooltipDelay.setText(Messages.Slideout_TourInfoOptions_Label_TooltipDelay);
_lblTooltipDelay.setToolTipText(Messages.Slideout_TourInfoOptions_Label_TooltipDelaySimple_Tooltip);
// Spinner
_spinnerTooltipDelay = new Spinner(ttContainer, SWT.BORDER);
_spinnerTooltipDelay.setMinimum(0);
_spinnerTooltipDelay.setMaximum(1000);
_spinnerTooltipDelay.setPageIncrement(50);
_spinnerTooltipDelay.addSelectionListener(_defaultSelectionListener);
_spinnerTooltipDelay.addMouseWheelListener(_defaultMouseWheelListener);
}
}
}
示例7: 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());
}
});
}
示例8: 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);
}
示例9: createControl
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
public void createControl(Composite parent) {
// inherit default container and name specification widgets
super.createControl(parent);
final Composite composite = (Composite)getControl();
// sample section generation group
final Group group = new Group(composite,SWT.NONE);
group.setLayout(new GridLayout(2,false));
group.setText("Traceability algorithm parameter(LSA)");
group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
Label nameLabel = new Label(group, SWT.NONE);
nameLabel.setText("Dimensions:");
dimensions = new Spinner(group, SWT.BORDER); // use desired style
dimensions.setMinimum(50);
dimensions.setMaximum(300);
dimensions.setSelection(DIMENSIONS);
dimensions.setIncrement(1);
dimensions.setPageIncrement(10);
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
dimensions.setLayoutData(gridData);
Label thresholdLabel = new Label(group, SWT.NONE);
thresholdLabel.setText("Threshold:");
gridData = new GridData();
gridData.verticalAlignment = SWT.TOP;
thresholdLabel.setLayoutData(gridData);
threshold = new Spinner(group, SWT.NONE);
// allow 3 decimal places
threshold.setDigits(3);
// set the minimum value to 0.001
threshold.setMinimum(1);
// set the maximum value to 20
threshold.setMaximum(1000);
// set the increment value to 0.010
threshold.setIncrement(10);
// set the seletion to 3.456
threshold.setSelection(THRESHOLD);
gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
threshold.setLayoutData(gridData);
}
开发者ID:germanattanasio,项目名称:traceability-assistant-eclipse-plugins,代码行数:50,代码来源:TraceCreationPage.java
示例10: setupPosition
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private Spinner setupPosition(Composite parent) {
Spinner result = new Spinner(parent, SWT.NONE);
result.setIncrement(1);
result.setPageIncrement(10);
return result;
}
示例11: 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);
}
}
}
示例12: createUI_200_TrackPosition
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void createUI_200_TrackPosition(final Composite parent) {
/*
* checkbox: Show track positions
*/
_chkTrackPositions = new Button(parent, SWT.CHECK);
GridDataFactory.fillDefaults().span(2, 1).applyTo(_chkTrackPositions);
_chkTrackPositions.setText(Messages.TourTrack_Properties_Checkbox_ShowTrackPositions);
_chkTrackPositions.setToolTipText(Messages.TourTrack_Properties_Checkbox_ShowTrackPositions_Tooltip);
_chkTrackPositions.addSelectionListener(_defaultSelectionListener);
{
/*
* label: Track position threshold
*/
_lblTrackPositionThreshold = new Label(parent, SWT.NONE);
GridDataFactory.fillDefaults()//
.align(SWT.FILL, SWT.CENTER)
.indent(UI.FORM_FIRST_COLUMN_INDENT, 0)
.applyTo(_lblTrackPositionThreshold);
_lblTrackPositionThreshold.setText(//
Messages.TourTrack_Properties_Label_TrackPositionThreshold);
_lblTrackPositionThreshold.setToolTipText(//
Messages.TourTrack_Properties_Label_TrackPositionThreshold_Tooltip);
final Composite container = new Composite(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(container);
{
/*
* Spinner: Track position threshold
*/
_spinnerTrackPositionThreshold = new Spinner(container, SWT.BORDER);
GridDataFactory.fillDefaults() //
.align(SWT.BEGINNING, SWT.FILL)
.applyTo(_spinnerTrackPositionThreshold);
_spinnerTrackPositionThreshold.setMinimum(TourTrackConfigManager.TRACK_POSITION_THRESHOLD_MIN);
_spinnerTrackPositionThreshold.setMaximum(TourTrackConfigManager.TRACK_POSITION_THRESHOLD_MAX);
_spinnerTrackPositionThreshold.setIncrement(1);
_spinnerTrackPositionThreshold.setPageIncrement(10);
_spinnerTrackPositionThreshold.addSelectionListener(_defaultSelectionListener);
_spinnerTrackPositionThreshold.addMouseWheelListener(_defaultMouseWheelListener);
/*
* Label: eye distance
*/
_lblTrackPositionThresholdAbsolute = new Label(container, SWT.NONE);
_lblTrackPositionThresholdAbsolute.setText(UI.EMPTY_STRING);
}
}
}
示例13: createUI_70_SplitTour
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private Composite createUI_70_SplitTour(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);
{
// checkbox
{
_chkRemoveExceededDuration = new Button(container, SWT.CHECK);
GridDataFactory.fillDefaults().span(3, 1).applyTo(_chkRemoveExceededDuration);
_chkRemoveExceededDuration.setText(Messages.PrefPage_Fit_Checkbox_ReplaceTimeSlice);
_chkRemoveExceededDuration.addSelectionListener(_defaultSelectionListener);
}
// label: info
{
_lblSplitTour_Info = createUI_InfoLabel(container, 3);
_lblSplitTour_Info.setText(Messages.PrefPage_Fit_Label_ReplaceTimeSlice_Info);
}
// label: duration
{
_lblSplitTour_Duration = new Label(container, SWT.NONE);
_lblSplitTour_Duration.setText(Messages.PrefPage_Fit_Label_ReplaceTimeSlice_Duration);
}
// spinner
{
_spinnerExceededDuration = new Spinner(container, SWT.BORDER);
GridDataFactory
.fillDefaults() //
.align(SWT.BEGINNING, SWT.FILL)
.applyTo(_spinnerExceededDuration);
_spinnerExceededDuration.setMinimum(0);
_spinnerExceededDuration.setMaximum(Integer.MAX_VALUE);
_spinnerExceededDuration.setPageIncrement(3600); // 60*60 = 1 hour
_spinnerExceededDuration.addMouseWheelListener(new MouseWheelListener() {
@Override
public void mouseScrolled(final MouseEvent event) {
Util.adjustSpinnerValueOnMouseScroll(event);
updateUI_SplitTour();
}
});
_spinnerExceededDuration.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
updateUI_SplitTour();
}
});
}
// label: duration in year/months/days/...
{
_lblSplitTour_DurationUnit = new Label(container, SWT.NONE);
GridDataFactory
.fillDefaults()//
.grab(true, false)
.align(SWT.FILL, SWT.CENTER)
.applyTo(_lblSplitTour_DurationUnit);
}
}
return container;
}
示例14: createUI_64_Brightness
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void createUI_64_Brightness(final Composite parent) {
{
/*
* Max brightness
*/
_lblMaxBrightness = new Label(parent, SWT.NONE);
GridDataFactory.fillDefaults()//
.grab(true, false)
.align(SWT.FILL, SWT.CENTER)
.applyTo(_lblMaxBrightness);
_lblMaxBrightness.setText(LEGENDCOLOR_DIALOG_MAX_BRIGHTNESS_LABEL);
_lblMaxBrightness.setToolTipText(LEGENDCOLOR_DIALOG_MAX_BRIGHTNESS_TOOLTIP);
final Composite containerMax = new Composite(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(containerMax);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerMax);
{
_cboMaxBrightness = new Combo(containerMax, SWT.DROP_DOWN | SWT.READ_ONLY);
_cboMaxBrightness.addSelectionListener(_defaultSelectionAdapter);
_spinMaxBrightness = new Spinner(containerMax, SWT.BORDER);
_spinMaxBrightness.setMinimum(0);
_spinMaxBrightness.setMaximum(100);
_spinMaxBrightness.setPageIncrement(10);
_spinMaxBrightness.addSelectionListener(_defaultSelectionAdapter);
_spinMaxBrightness.addMouseWheelListener(_defaultMouseWheelListener);
}
}
{
/*
* Min brightness
*/
_lblMinBrightness = new Label(parent, SWT.NONE);
GridDataFactory.fillDefaults()//
.grab(true, false)
.align(SWT.FILL, SWT.CENTER)
.applyTo(_lblMinBrightness);
_lblMinBrightness.setText(LEGENDCOLOR_DIALOG_MIN_BRIGHTNESS_LABEL);
_lblMinBrightness.setToolTipText(LEGENDCOLOR_DIALOG_MIN_BRIGHTNESS_TOOLTIP);
final Composite containerMin = new Composite(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(containerMin);
GridLayoutFactory.fillDefaults().numColumns(2).applyTo(containerMin);
{
_cboMinBrightness = new Combo(containerMin, SWT.DROP_DOWN | SWT.READ_ONLY);
_cboMinBrightness.addSelectionListener(_defaultSelectionAdapter);
_spinMinBrightness = new Spinner(containerMin, SWT.BORDER);
_spinMinBrightness.setMinimum(0);
_spinMinBrightness.setMaximum(100);
_spinMinBrightness.setPageIncrement(10);
_spinMinBrightness.addSelectionListener(_defaultSelectionAdapter);
_spinMinBrightness.addMouseWheelListener(_defaultMouseWheelListener);
}
}
}
示例15: createUI_20_ImageSize
import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private void createUI_20_ImageSize(final Composite parent) {
final Composite container = new Composite(parent, SWT.NONE);
// GridDataFactory.fillDefaults().grab(true, false).applyTo(container);
GridLayoutFactory.fillDefaults().numColumns(1).applyTo(container);
{
/*
* label: displayed photos
*/
final Label label = new Label(container, SWT.NO_FOCUS);
GridDataFactory.fillDefaults()//
// .align(SWT.CENTER, SWT.BEGINNING)
.applyTo(label);
label.setText(Messages.Photo_Properties_Label_Size);
label.setToolTipText(Messages.Photo_Properties_Label_ThumbnailSize_Tooltip);
/*
* spinner: size
*/
_spinnerImageSize = new Spinner(container, SWT.BORDER);
GridDataFactory.fillDefaults() //
.align(SWT.BEGINNING, SWT.FILL)
.applyTo(_spinnerImageSize);
_spinnerImageSize.setMinimum(MIN_IMAGE_WIDTH);
_spinnerImageSize.setMaximum(MAX_IMAGE_WIDTH);
_spinnerImageSize.setIncrement(1);
_spinnerImageSize.setPageIncrement(10);
_spinnerImageSize.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
onSelectImageSize();
}
});
_spinnerImageSize.addMouseWheelListener(new MouseWheelListener() {
@Override
public void mouseScrolled(final MouseEvent event) {
Util.adjustSpinnerValueOnMouseScroll(event);
onSelectImageSize();
}
});
}
}