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


Java Slider.setBlockIncrement方法代码示例

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


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

示例1: simulationSpeedSelection

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private Node simulationSpeedSelection( SimulatorSettingDetails settingDetails )
{
	VBox vBox = new VBox();

	Text simulationSpeedLabel = new Text("Simulation Speed (milliseconds / cycle)");
	simulationSpeedLabel.setId(UIConstants.TEXT_COLOR);

	//TODO take in settings for slider
	Slider simulationSpeedSlider = new Slider(0, 1000, 100);
	simulationSpeedSlider.setShowTickMarks(true);
	simulationSpeedSlider.setShowTickLabels(true);
	simulationSpeedSlider.setMajorTickUnit(100);
	simulationSpeedSlider.setBlockIncrement(100);

	simulationSpeedModel = simulationSpeedSlider.valueProperty();

	vBox.getChildren().addAll(simulationSpeedLabel, simulationSpeedSlider);

	return vBox;
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:21,代码来源:SimulatorSettingsPanel.java

示例2: setSliderRange

import javafx.scene.control.Slider; //导入方法依赖的package包/类
static void setSliderRange(final Slider slider, double position, double min, double max) {
		slider.setMin(min);
		slider.setMax(max);
//		int range = (int)(max - min + 0.5);
//		if (range > 200) {
//			slider.setMajorTickUnit(50);
//			slider.setMinorTickCount(10);
//		} else if (range >= 50) {
//			slider.setMajorTickUnit(10);
//			slider.setMinorTickCount(5);
//		} else if (range >= 10) {
//			slider.setMajorTickUnit(5);
//			slider.setMinorTickCount(1);
//		} else {
//			slider.setMajorTickUnit(1);
//			slider.setMinorTickCount(1);
//		}
		slider.setMajorTickUnit(1);
		slider.setSnapToTicks(true);
		slider.setShowTickMarks(false);
		slider.setShowTickLabels(false);
		slider.setValue(position);
		slider.setOpacity(0.25);
		slider.setBlockIncrement(1.0);
		
		slider.setOnMouseEntered(e -> {
			slider.setOpacity(1);			
		});
		slider.setOnMouseExited(e -> {
			slider.setOpacity(0.5);			
		});
	}
 
开发者ID:qupath,项目名称:qupath,代码行数:33,代码来源:QuPathViewerPlus.java

示例3: createSlider

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private Slider createSlider(double chartUpperDefault, double chartUpperBound, double chartTickUnit) {
    Slider slider = new Slider();
    slider.setOrientation(Orientation.VERTICAL);
    slider.setMin(0);
    slider.setMax(chartUpperBound);
    slider.setValue(chartUpperDefault);
    slider.setShowTickLabels(true);
    slider.setShowTickMarks(true);
    slider.setMajorTickUnit(chartTickUnit);
    //slider.setMinorTickCount(0.01);
    slider.setBlockIncrement(0.01);
    
    // otherwise below, we also could delegate mediator, but in this case 
    // it is unnecessary because if the GUI that interacts with itself
    //slider.valueProperty().addListener(mediator);
    
    return slider;
}
 
开发者ID:paolopavan,项目名称:circosFX,代码行数:19,代码来源:Trials.java

示例4: createSlider

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private Slider createSlider() {
    Slider slider = new Slider();
    slider.setOrientation(Orientation.VERTICAL);
    slider.setMin(1);
    slider.setMax(10);
    slider.setValue(1);
    slider.setShowTickLabels(true);
    slider.setShowTickMarks(true);
    slider.setMajorTickUnit(0.5);
    //slider.setMinorTickCount(0.01);
    slider.setBlockIncrement(0.01);
    
    
    slider.valueProperty().addListener(new ChangeListener<Number>() {
        public void changed(ObservableValue<? extends Number> ov,
            Number old_val, Number new_val) {
            magnificationProperty.set(new_val.doubleValue());
        }
    });
    // otherwise below, we also could delegate mediator, but in this case 
    // it is unnecessary because if the GUI that interacts with itself
    //slider.valueProperty().addListener(mediator);
    
    return slider;
}
 
开发者ID:paolopavan,项目名称:circosFX,代码行数:26,代码来源:Circos.java

示例5: prepareSlider

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private void prepareSlider() {
		slider = new Slider(0, nbIteration, 5);
		slider.setMajorTickUnit(nbIteration);
		slider.valueProperty().addListener((ov, oldVal, newVal) -> {
			long lNewVal = newVal.longValue();
			if(lNewVal != oldVal.longValue())
				System.out.println(lNewVal);				
		});

		slider.setBlockIncrement(1);
		slider.setSnapToTicks(true);
		if(nbIteration > Integer.MAX_VALUE) {
			slider.setMinorTickCount(Integer.MAX_VALUE);
		} else
			slider.setMinorTickCount((int) nbIteration - 1);
//		slider.setShowTickLabels(true);
//		slider.setShowTickMarks(true);
		
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:20,代码来源:PlayerFX.java

示例6: SliderSample

import javafx.scene.control.Slider; //导入方法依赖的package包/类
public SliderSample() {
    VBox root = new VBox();
    Slider slider = new Slider();
    slider.setMin(0);
    slider.setMax(100);
    slider.setValue(40);
    slider.setShowTickLabels(true);
    slider.setShowTickMarks(true);
    slider.setMajorTickUnit(50);
    slider.setMinorTickCount(5);
    slider.setBlockIncrement(10);
    root.getChildren().addAll(slider, new Button("Click me!!"));
    getChildren().add(root);
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:15,代码来源:SliderSample.java

示例7: newSlider

import javafx.scene.control.Slider; //导入方法依赖的package包/类
public static Slider newSlider(final double min, final double max, final double value, final double blockIncrement, final double majorTickUnit, final boolean showTickLabels, final boolean showTickMarks, final boolean snapToTicks, ChangeListener<? super Number> changeListener) {
	final
	Slider slider = new Slider(min, max, value);
	slider.setBlockIncrement(blockIncrement);
	slider.setMajorTickUnit(majorTickUnit);
	slider.setShowTickLabels(showTickLabels);
	slider.setShowTickMarks(showTickMarks);
	slider.setSnapToTicks(snapToTicks);
	slider.valueProperty().addListener(changeListener);
	
	return slider;
}
 
开发者ID:macroing,项目名称:Dayflower-Path-Tracer,代码行数:13,代码来源:JavaFX.java

示例8: createSlider

import javafx.scene.control.Slider; //导入方法依赖的package包/类
@Override
public Slider createSlider (double min, double max, double start, double increment) {
    Slider slider = new Slider();
    slider.setMin(min);
    slider.setMax(max);
    slider.setValue(start);
    slider.setBlockIncrement(increment);
    slider.setShowTickLabels(true);
    slider.setShowTickMarks(true);
    return slider;
}
 
开发者ID:tomrom95,项目名称:GameAuthoringEnvironment,代码行数:12,代码来源:BasicUIFactory.java

示例9: createSlider

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private Slider createSlider(){
	Slider pSlider = new Slider();
	pSlider.setShowTickLabels(true);
	pSlider.setShowTickMarks(true);
	pSlider.setSnapToTicks(true);
	pSlider.setMin(0);
	pSlider.setMax(10.0);
	pSlider.setMajorTickUnit(10.0);
	pSlider.setMinorTickCount(99);
	pSlider.setBlockIncrement(0.1);
	
	return pSlider;
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:14,代码来源:PIDTunerWindow.java

示例10: drawNode

import javafx.scene.control.Slider; //导入方法依赖的package包/类
@Override
public Node drawNode() {
    Slider slider = createSlider(0, 100, vertical);
    slider.setValue(50);
    slider.setBlockIncrement(20);
    double new_value = slider.getValue();
    slider.adjustValue(position);
    new_value = position;
    if (Double.compare(slider.getValue(), new_value) != 0) {
        reportGetterFailure("ScrollBar.adjustValue()");
    }
    return slider;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:14,代码来源:SliderApp.java

示例11: buildRoadPanel

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private void buildRoadPanel() {
	roadAttributes = new VBox();

	roadColorLabel = new Label("Color");
	roadColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	roadColorPicker = new ColorPicker();
	roadColorPicker.setValue(Color.BLACK);

	roadWidthLabel = new Label("Pixel Width : ");
	roadWidthLabel.setAlignment(Pos.CENTER);
	roadWidthLabel.setPrefSize(202, 17.0); 
	roadWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	roadWidthSlider = new Slider();
	roadWidthSlider.setBlockIncrement(3);
	roadWidthSlider.setPrefSize(202, 5.0); 

	roadAttributes.getChildren().addAll(roadColorLabel, roadColorPicker, roadWidthLabel, roadWidthSlider);

   	road = new TitledPane("Road", roadAttributes);
   	road.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	road.prefWidthProperty().bind(widthProperty());
   	road.setExpanded(false);

       roadWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
       	roadWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
	
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:31,代码来源:RightPanel.java

示例12: buildBuildingPanel

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private void buildBuildingPanel() {
	buildingAttributes = new VBox();

	buildingColorLabel = new Label("Color");
	buildingColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	buildingColorPicker = new ColorPicker();
	buildingColorPicker.setValue(Color.BLACK);

	buildingWidthLabel = new Label("Pixel Width : ");
	buildingWidthLabel.setAlignment(Pos.CENTER);
	buildingWidthLabel.setPrefSize(202, 17.0); 
	buildingWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	buildingWidthSlider = new Slider();
	buildingWidthSlider.setBlockIncrement(3);
	buildingWidthSlider.setPrefSize(202, 5.0); 

	buildingAttributes.getChildren().addAll(buildingColorLabel, buildingColorPicker, buildingWidthLabel, buildingWidthSlider);

   	building = new TitledPane("Buildings", buildingAttributes);
   	building.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	building.prefWidthProperty().bind(widthProperty());
   	building.setExpanded(false);

   	buildingWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
       	buildingWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java

示例13: buildReliefPanel

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private void buildReliefPanel() {
	reliefAttributes = new VBox();

	reliefColorLabel = new Label("Color");
	reliefColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	reliefColorPicker = new ColorPicker();
	reliefColorPicker.setValue(Color.BLACK);

	reliefWidthLabel = new Label("Pixel Width : ");
	reliefWidthLabel.setAlignment(Pos.CENTER);
	reliefWidthLabel.setPrefSize(202, 17.0); 
	reliefWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	reliefWidthSlider = new Slider();
	reliefWidthSlider.setBlockIncrement(3);
	reliefWidthSlider.setPrefSize(202, 5.0); 

	reliefAttributes.getChildren().addAll(reliefColorLabel, reliefColorPicker, reliefWidthLabel, reliefWidthSlider);

   	relief = new TitledPane("Reliefs", reliefAttributes);
   	relief.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	relief.prefWidthProperty().bind(widthProperty());
   	relief.setExpanded(false);

   	reliefWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
   		reliefWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java

示例14: buildPOIPanel

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private void buildPOIPanel() {
	poiAttributes = new VBox();

	poiColorLabel = new Label("Color");
	poiColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	poiColorPicker = new ColorPicker();
	poiColorPicker.setValue(Color.BLACK);

	poiWidthLabel = new Label("Pixel Width : ");
	poiWidthLabel.setAlignment(Pos.CENTER);
	poiWidthLabel.setPrefSize(202, 17.0); 
	poiWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	poiWidthSlider = new Slider();
	poiWidthSlider.setBlockIncrement(3);
	poiWidthSlider.setPrefSize(202, 5.0); 

	poiAttributes.getChildren().addAll(poiColorLabel, poiColorPicker, poiWidthLabel, poiWidthSlider);

   	poi = new TitledPane("POI", poiAttributes);
   	poi.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	poi.prefWidthProperty().bind(widthProperty());
   	poi.setExpanded(false);

   	poiWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
   		poiWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java

示例15: buildROIPanel

import javafx.scene.control.Slider; //导入方法依赖的package包/类
private void buildROIPanel() {
	roiAttributes = new VBox();

	roiColorLabel = new Label("Color");
	roiColorLabel.setTextFill(Paint.valueOf("#bfbfbf"));

	roiColorPicker = new ColorPicker();
	roiColorPicker.setValue(Color.BLACK);

	roiWidthLabel = new Label("Pixel Width : ");
	roiWidthLabel.setAlignment(Pos.CENTER);
	roiWidthLabel.setPrefSize(202, 17.0); 
	roiWidthLabel.setTextFill(Paint.valueOf("#e8e5e5"));

	roiWidthSlider = new Slider();
	roiWidthSlider.setBlockIncrement(3);
	roiWidthSlider.setPrefSize(202, 5.0); 

	roiAttributes.getChildren().addAll(roiColorLabel, roiColorPicker, roiWidthLabel, roiWidthSlider);

   	roi = new TitledPane("ROI", roiAttributes);
   	roi.setStyle("-fx-background-color: rgba(0,0,0,0.85);");
   	roi.prefWidthProperty().bind(widthProperty());
   	roi.setExpanded(false);

   	roiWidthSlider.valueProperty().addListener((ObservableValue<? extends Number> ov, Number t, Number t1) -> {
   		roiWidthLabel.setText("Pixel Width : " + t1.intValue());
       });
}
 
开发者ID:sanke69,项目名称:eDigitalWorld,代码行数:30,代码来源:RightPanel.java


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