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


Java Scale.setPageIncrement方法代码示例

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


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

示例1: renderTransparency

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
private void renderTransparency(final Shell shell) {
	Group group = new Group(shell, SWT.NONE);
	group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 6, 1));
	group.setLayout(new GridLayout(1, false));
	group.setText("Transparency");
	final Scale transparencySlider = new Scale(group, SWT.HORIZONTAL);
	transparencySlider.setMinimum(20);
	transparencySlider.setMaximum(100);
	transparencySlider.setPageIncrement(90);
	transparencySlider.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
	transparencySlider.setSelection(100);
	transparencySlider.addListener(SWT.Selection, new Listener() {

		@Override
		public void handleEvent(Event event) {
			shell.setAlpha(255 * transparencySlider.getSelection() / 100);
		}
	});
}
 
开发者ID:juanerasmoe,项目名称:pmTrans,代码行数:20,代码来源:FindReplaceDialog.java

示例2: fillSynthGainScale

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
protected void fillSynthGainScale( Scale scale ){
	double[] range = getSynth().getDoublePropertyRange( MidiSettings.SYNTH_GAIN );
	if( range.length == 2 ){
		int value = (int)Math.round( getDoubleValue( MidiSettings.SYNTH_GAIN ) * 10f );
		int minimum = (int)Math.round( range[0] * 10 );
		int maximum = (int)Math.round( range[1] * 10 );
		if( minimum < maximum ){
			scale.setMinimum( minimum );
			scale.setMaximum( maximum );
			scale.setIncrement(1);
			scale.setPageIncrement(10);
			if( value >= minimum && value <= maximum ){
				scale.setSelection( value );
			}
		}
	}
}
 
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:18,代码来源:MidiOutputPortSettings.java

示例3: SliderImpl

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
public SliderImpl(final Object parentUiReference, final ISliderSetupSpi setup, final SwtImageRegistry imageRegistry) {
    super(new Scale((Composite) parentUiReference, getStyle(setup)), imageRegistry);

    this.orientation = setup.getOrientation();

    final Scale scale = getUiReference();

    scale.setMaximum(setup.getMaximum());
    scale.setMinimum(setup.getMinimum());
    scale.setSelection(setup.getMinimum());
    scale.setPageIncrement(setup.getTickSpacing());
    scale.setToolTipText(setup.getToolTipText());

    scale.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(final SelectionEvent e) {
            fireInputChanged(getSelection());
        }
    });
}
 
开发者ID:jo-source,项目名称:jo-widgets,代码行数:21,代码来源:SliderImpl.java

示例4: createComponent

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
protected void createComponent(Composite parent) {
	composite = section.getWidgetFactory().createComposite(parent);
	RowLayout layout = new RowLayout(SWT.HORIZONTAL);
	layout.wrap = true;
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.center = true;
	composite.setLayout(layout);

	scale = new Scale(composite, SWT.HORIZONTAL);
	scale.setMinimum(0);
	scale.setMaximum(100);
	scale.setIncrement(1);
	scale.setPageIncrement(5);
	RowData rd = new RowData();
	rd.width = 100;
	scale.setLayoutData(rd);
	scale.setToolTipText(pDescriptor.getDescription());
	scale.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			if (!isRefresh)
				ftext.setText("" + (scale.getSelection() / 100f));
		}
	});

	super.createComponent(composite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:29,代码来源:SPTransparency.java

示例5: createScale

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
/**
 * 
 * @param shell : the Shell object used
 * @param intMin : the Integer minimum value of the scale bar
 * @param intMax : the Integer maximum value of the scale bar
 * @param intIncrements : the Integer number of increments
 * @param intPageIncrement : the Integer step of the scale bar
 * @param intSetSelection : the Integer initial value of the slider
 * @return Scale widget
 */
public Scale createScale(Shell shell, int intMin, int intMax, int intIncrements, int intPageIncrement, int intSetSelection) {

	Scale myScale = new Scale(shell, SWT.HORIZONTAL);

	myScale.setMinimum(intMin);
	myScale.setMaximum(intMax);
	myScale.setIncrement(intIncrements);
	myScale.setPageIncrement(intPageIncrement);
	myScale.setSelection(intSetSelection);

	return myScale;

}
 
开发者ID:MikeFot,项目名称:Java--GIS-Shapefile-Parser-and-Processor,代码行数:24,代码来源:WidgetFactory.java

示例6: createRankGroup

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
private void createRankGroup(Composite parent) {
    Composite prioGroup = new Composite(parent, SWT.NONE);
    prioGroup.setLayout(new GridLayout(2, false));

    Label minRankLabel = new Label(prioGroup, SWT.NONE);
    minRankLabel.setText(getMessage("property.minRank") + System.getProperty("line.separator")
            + getMessage("property.minRank.line2"));
    minRankLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));

    minRankSlider = new Scale(prioGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
    minRankSlider.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
    minRankSlider.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent event) {
            int rank = minRankSlider.getSelection();
            getCurrentProps().getFilterSettings().setMinRank(rank);
            updateRankValueLabel();
        }
    });
    minRankSlider.setMinimum(BugRanker.VISIBLE_RANK_MIN);
    minRankSlider.setMaximum(BugRanker.VISIBLE_RANK_MAX);
    minRankSlider.setSelection(getCurrentProps().getFilterSettings().getMinRank());
    minRankSlider.setIncrement(1);
    minRankSlider.setPageIncrement(5);
    Label dummyLabel = new Label(prioGroup, SWT.NONE);
    dummyLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));

    rankValueLabel = new Label(prioGroup, SWT.NONE);
    rankValueLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false));
    updateRankValueLabel();
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:32,代码来源:ReportConfigurationTab.java

示例7: createControl

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent)
{
  Composite composite = new Composite(parent, SWT.NULL);
  composite.setLayout(new GridLayout(2, false));

  new Label(composite, SWT.NULL).setText(Localizer.getMessage("ALGORITHM") + ": ");
  option = new ComboViewer(composite, SWT.BORDER | SWT.READ_ONLY);
  option.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  option.setContentProvider(new OptionContentProvider());
  option.setLabelProvider(new LabelProvider());
  option.setInput(bean);

  new Label(composite, SWT.NULL).setText(Localizer.getMessage("OVERLAP_PERCENT") + ": ");
  overlapPercent = new Scale(composite, SWT.HORIZONTAL);
  overlapPercent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  overlapPercent.setMinimum(0);
  overlapPercent.setMaximum(100);
  overlapPercent.setIncrement(1);
  overlapPercent.setPageIncrement(10);

  currentPercent = new Label(composite, SWT.LEFT | SWT.FILL);
  currentPercent.setText(this.bean.getOverlapPercent() + "%     ");

  overlapPercent.addListener(SWT.Selection, new OverlapListener());

  this.setControl(composite);

  this.bind(option, "option");
  this.bind(overlapPercent, "overlapPercent");
}
 
开发者ID:terraframe,项目名称:geoprism,代码行数:32,代码来源:LocatedInPage.java

示例8: createControl

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
/**
 * Create contents of the wizard.
 * 
 * @param parent
 */
public void createControl(Composite parent) {
	Composite container = new Composite(parent, SWT.NULL);
	setControl(container);
	container.setLayout(new GridLayout(2, false));

	Label lbl = new Label(container, SWT.NONE);
	lbl.setText(Messages.ReportTemplatesWizardPage_zoom);
	GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.FILL_HORIZONTAL);
	lbl.setLayoutData(gd);

	scale = new Scale(container, SWT.NONE);
	scale.setMinimum(1);
	scale.setMaximum(50);
	scale.setIncrement(1);
	scale.setPageIncrement(5);

	SashForm sashForm = new SashForm(container, SWT.NONE);
	sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

	// list = new org.eclipse.swt.widgets.List(sashForm, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL);
	Table table = new Table(sashForm, SWT.V_SCROLL | SWT.SINGLE | SWT.BORDER);

	table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));

	gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
	gd.widthHint = 150;
	scale.setLayoutData(gd);

	galleryComposite = new Composite(sashForm, SWT.NONE);
	layout = new StackLayout();
	galleryComposite.setLayout(layout);

	categoryList = BuiltInCategories.getCategoriesList();
	for (String cat : categoryList) {
		cachedGalleries.put(cat, null);
	}
	bundles = StudioTemplateManager.getInstance().getTemplateBundles();
	findTemplates();
	// initializeBackgroundData();

	sashForm.setWeights(new int[] { 20, 80 });
	
	
	
	scale.addListener(SWT.Selection, new Listener() {

		public void handleEvent(Event event) {
			zoomModified();
		}
	});

	container.addMouseWheelListener(scaleListener);
	//galleryComposite.addMouseWheelListener(scaleListener);

	scale.setSelection(6);
	// Manually fire the event because the invocation
	// of #Scale.selection() does not fire it.
	zoomModified();

	createTableColumn(table);
	showGallery(categoryList.get(0));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:68,代码来源:ReportTemplatesWizardPage.java

示例9: createUI_70_Option_GeoPosition

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

		final PixelConverter pc = new PixelConverter(parent);
		final int valueWidth = pc.convertWidthInCharsToPixels(4);
		Label label;

		final Group group = new Group(parent, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
		group.setText(Messages.Adjust_Altitude_Group_GeoPosition);
		GridLayoutFactory.swtDefaults().numColumns(3).applyTo(group);
		{
			/*
			 * label: adjusted slices
			 */
			label = new Label(group, SWT.NONE);
			label.setText(Messages.Adjust_Altitude_Label_GeoPosition_Slices);

			/*
			 * label: slice value
			 */
			_lblSliceValue = new Label(group, SWT.TRAIL);
			GridDataFactory
					.fillDefaults()
					.align(SWT.END, SWT.CENTER)
					.hint(valueWidth, SWT.DEFAULT)
					.applyTo(_lblSliceValue);

			/*
			 * scale: slice position
			 */
			_scaleSlicePos = new Scale(group, SWT.HORIZONTAL);
			GridDataFactory.fillDefaults().grab(true, false).applyTo(_scaleSlicePos);
			_scaleSlicePos.setMinimum(0);
			_scaleSlicePos.setMaximum(MAX_ADJUST_GEO_POS_SLICES * 2);
			_scaleSlicePos.setPageIncrement(5);
			_scaleSlicePos.addSelectionListener(new SelectionAdapter() {
				@Override
				public void widgetSelected(final SelectionEvent e) {
					onSelectSlicePosition();
				}
			});
			_scaleSlicePos.addListener(SWT.MouseDoubleClick, new Listener() {
				@Override
				public void handleEvent(final Event event) {
					onDoubleClickGeoPos(event.widget);
				}
			});
		}

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

示例10: construct

import org.eclipse.swt.widgets.Scale; //导入方法依赖的package包/类
public Control construct(Composite parent) {
	Composite composite = new Composite(parent, SWT.NONE);
	GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL)
			.grab(true, true).applyTo(composite);
	GridLayoutFactory.swtDefaults().numColumns(2).applyTo(composite);
	
	Scale scale = new Scale (composite, SWT.BORDER);
	Rectangle clientArea = composite.getClientArea ();
	scale.setBounds (clientArea.x, clientArea.y, 500, 64);
	scale.setMaximum (40);
	scale.setPageIncrement (5);
	
	final Text t = new Text(composite, SWT.BORDER | SWT.MULTI);
	t.setText ("Test at the moving");
	Rectangle clientArea2 = composite.getClientArea ();
	t.setBounds (clientArea2.x, clientArea2.y, 400, 300);
	
	scale.addListener (SWT.Selection, new Listener () {
		public void handleEvent (Event e) {
			t.setText("Moving is executed");
		}
	});
	
    Label label = new Label(composite, SWT.NULL);
    label.setText("Volume:");
    
    final Scale scale2 = new Scale(composite, SWT.VERTICAL);
    scale2.setBounds(0, 0, 40, 200);
    scale2.setMaximum(20);
    scale2.setMinimum(0);
    scale2.setIncrement(1);
    scale2.setPageIncrement(5);
    
    final Text value = new Text(composite, SWT.BORDER | SWT.SINGLE);
    
    scale2.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        int perspectiveValue = scale2.getMaximum() - scale2.getSelection() + scale2.getMinimum();
        value.setText("Vol: " + perspectiveValue);
      }
    });
    
    value.setEditable(false);
    scale2.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    value.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));

	return null;
}
 
开发者ID:xored,项目名称:q7.quality.mockups,代码行数:49,代码来源:ScaleTest.java


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