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


Java NumberAxis.setAutoRanging方法代码示例

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


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

示例1: createChart

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
protected ScatterChart<Number, Number> createChart() {
    final NumberAxis xAxis = new NumberAxis();
    xAxis.setForceZeroInRange(false);
    final NumberAxis yAxis = new NumberAxis(-100,100,10);
    final ScatterChart<Number,Number> sc = new ScatterChart<Number,Number>(xAxis,yAxis);
    // setup chart
    sc.setId("liveScatterChart");
    sc.setTitle("Animated Sine Wave ScatterChart");
    xAxis.setLabel("X Axis");
    xAxis.setAnimated(false);
    yAxis.setLabel("Y Axis");
    yAxis.setAutoRanging(false);
    // add starting data
    series = new ScatterChart.Series<Number,Number>();
    series.setName("Sine Wave");
    series.getData().add(new ScatterChart.Data<Number, Number>(5d, 5d));
    sc.getData().add(series);
    return sc;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:ChartAdvancedScatterLive.java

示例2: MonitorPaneTemplate

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
public MonitorPaneTemplate()
{
    super();
    super.getStyleClass().add("pane");
    
    x = new NumberAxis();
    x.setAutoRanging(false);
    
    y = new NumberAxis();
    y.setAutoRanging(false);
    
    chart = new LineChart<>(x, y);
    chart.setCreateSymbols(false);
    chart.legendVisibleProperty().setValue(false);
    chart.setPrefHeight(250);
    chart.setPrefWidth(750);
    
    data = new Series<>();
    
    chart.getData().add(data);
    
    super.getChildren().add(chart);
}
 
开发者ID:BlueGoliath,项目名称:Goliath-Overclocking-Utility-FX,代码行数:24,代码来源:MonitorPaneTemplate.java

示例3: initYAxis

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
private NumberAxis initYAxis() {
	final NumberAxis yAxis = new NumberAxis();
	yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {
		@Override
		public String toString(final Number object) {
			return String.format("%6.2f", object);
		}
	});
	yAxis.setTickLabelFont(Font.font("Arial", FontWeight.MEDIUM, 18));
	yAxis.setPrefWidth(120);
	yAxis.setAutoRanging(true);
	yAxis.setLabel("factor");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(false);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:ErrorProfileView.java

示例4: initYAxis

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
private NumberAxis initYAxis() {
final NumberAxis yAxis = new NumberAxis();
yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {
    @Override
    public String toString(final Number object) {
	return String.format("%6.2f", object);
    }
});
yAxis.setTickLabelFont(Font.font("Arial", FontWeight.MEDIUM, 18));
yAxis.setPrefWidth(120);
yAxis.setAutoRanging(true);
yAxis.setLabel("Meters⁻²");
yAxis.setForceZeroInRange(false);
yAxis.setAnimated(true);
return yAxis;
   }
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:AltitudeProfileView.java

示例5: initYAxis

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
private NumberAxis initYAxis() {
	final NumberAxis yAxis = new NumberAxis();
	yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {
		@Override
		public String toString(final Number object) {
			return String.format("%6.2f", object);
		}
	});
	yAxis.setTickLabelFont(Font.font("Arial", FontWeight.MEDIUM, 18));
	yAxis.setPrefWidth(120);
	yAxis.setAutoRanging(true);
	yAxis.setLabel("m/s^2");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(false);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:AccelerationProfileView.java

示例6: initYAxis

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
private NumberAxis initYAxis() {
	final NumberAxis yAxis = new NumberAxis();
	yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {
		@Override
		public String toString(final Number object) {
			return String.format("%6.2f", object);
		}
	});
	yAxis.setTickLabelFont(Font.font("Arial", FontWeight.MEDIUM, 18));
	yAxis.setPrefWidth(120);
	yAxis.setAutoRanging(true);
	yAxis.setLabel("Meters");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(true);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:EstimatedAltitudeProfileView.java

示例7: initYAxis

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
private NumberAxis initYAxis() {
	final NumberAxis yAxis = new NumberAxis(800, 802, 0.1);
	yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {
		@Override
		public String toString(final Number object) {
			return String.format("%6.2f", object);
		}
	});
	yAxis.setTickLabelFont(Font.font("Arial", FontWeight.MEDIUM, 18));
	yAxis.setPrefWidth(120);
	yAxis.setAutoRanging(false);
	yAxis.setLabel("Meters");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(true);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:AltitudeProfileView.java

示例8: initYAxis

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
private NumberAxis initYAxis() {
	final NumberAxis yAxis = new NumberAxis();
	yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {
		@Override
		public String toString(final Number object) {
			return String.format("%6.2f", object);
		}
	});
	yAxis.setTickLabelFont(Font.font("Arial", FontWeight.MEDIUM, 18));
	yAxis.setPrefWidth(120);
	yAxis.setAutoRanging(true);
	yAxis.setLabel("m/s");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(false);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:VelocityProfileView.java

示例9: AreaChartControl

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
public AreaChartControl(String name) {
	super(name, FlashboardSendableType.AREACHART);
	
	axisX = new NumberAxis();
	axisX.setForceZeroInRange(false);
	axisX.setAutoRanging(false);
	axisX.setUpperBound(maxX);
	axisX.setLowerBound(minX);
	axisY = new NumberAxis();
	axisY.setForceZeroInRange(false);
	axisY.setAutoRanging(false);
	axisY.setUpperBound(maxY);
	axisY.setLowerBound(minY);
	
	chart = new AreaChart<Number, Number>(axisX, axisY);
	chart.setLegendVisible(false);
	chart.setAnimated(false);
	
	chartSeries = new AreaChart.Series<Number, Number>();
	chart.setTitle(name);
	chart.getData().add(chartSeries);
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setMaxSize(WIDTH, HEIGHT);
	root.getChildren().add(chart);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:28,代码来源:AreaChartControl.java

示例10: BarChartControl

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
public BarChartControl(String name) {
	super(name, FlashboardSendableType.BARCHART);
	
	axisX = new CategoryAxis();
	axisX.setAutoRanging(true);
	axisY = new NumberAxis();
	axisY.setForceZeroInRange(false);
	axisY.setAutoRanging(false);
	axisY.setUpperBound(maxY);
	axisY.setLowerBound(minY);
	
	chart = new BarChart<String, Number>(axisX, axisY);
	chart.setLegendVisible(false);
	chart.setAnimated(false);
	
	chartSeries = new BarChart.Series<String, Number>();
	chart.setTitle(name);
	chart.getData().add(chartSeries);
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setMaxSize(WIDTH, HEIGHT);
	root.getChildren().add(chart);
	
	
	charts.put(name, this);
	List<BarChartSeriesControl> controls = unallocatedControls.get(name);
	if(unallocatedControls != null){
		unallocatedControls.remove(name);
		for (int i = 0; i < unallocatedControls.size(); i++)
			addControl(controls.get(i));
	}
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:34,代码来源:BarChartControl.java

示例11: LineChartControl

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
public LineChartControl(String name) {
	super(name, FlashboardSendableType.LINECHART);
	
	axisX = new NumberAxis();
	axisX.setForceZeroInRange(false);
	axisX.setAutoRanging(false);
	axisX.setUpperBound(maxX);
	axisX.setLowerBound(minX);
	axisY = new NumberAxis();
	axisY.setForceZeroInRange(false);
	axisY.setAutoRanging(false);
	axisY.setUpperBound(maxY);
	axisY.setLowerBound(minY);
	
	chart = new LineChart<Number, Number>(axisX, axisY);
	chart.setLegendVisible(false);
	chart.setAnimated(false);
	
	chartSeries = new LineChart.Series<Number, Number>();
	chart.setTitle(name);
	chart.getData().add(chartSeries);
	
	root = new VBox();
	root.setAlignment(Pos.CENTER);
	root.setMaxSize(WIDTH, HEIGHT);
	root.getChildren().add(chart);
}
 
开发者ID:Flash3388,项目名称:FlashLib,代码行数:28,代码来源:LineChartControl.java

示例12: StackedAreaChartClass

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
/**
 * the constructor is responsible for initialize the chart (lower and upper buonds, name, colors)
 * @param stackedAreaChart is the type of chart for battery performance
 */
public StackedAreaChartClass(StackedAreaChart stackedAreaChart){
    NumberAxis yaxis = (NumberAxis) stackedAreaChart.getYAxis();

    //getter and setting proprieties for y and x axes
    xAxis = (NumberAxis) stackedAreaChart.getXAxis();
    xAxis.setLowerBound(0);
    xAxis.setUpperBound(10);
    xAxis.setAutoRanging(false);
    xAxis.setTickLabelsVisible(false); //hide numbers on x axis
    stackedAreaChart.setVerticalGridLinesVisible(false);//hide vertical lines
    stackedAreaChart.animatedProperty().setValue(false);
    yaxis.setAutoRanging(false);
    yaxis.setLowerBound(0);
    yaxis.setUpperBound(100);

    //set series of content to draw chart
    series = new XYChart.Series();
    series.setName("Battery level");
    stackedAreaChart.getData().add(series);

    //setting colors of charts
    Node fill = series.getNode().lookup(".chart-series-area-fill");
    fill.setStyle("-fx-fill: #fff7ad;");
    Node line = series.getNode().lookup(".chart-series-area-line");
    line.setStyle("-fx-stroke: #8bc34a;" +
            "-fx-stroke-width: 3px;"); // set width of line
    stackedAreaChart.setStyle("CHART_COLOR_1: #8bc34a;"); //color of dots
}
 
开发者ID:andrea9293,项目名称:pcstatus,代码行数:33,代码来源:StackedAreaChartClass.java

示例13: start

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
@Override
   public void start(final Stage stage) {
stage.setTitle("Line Chart Sample");
// defining the axes
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setAutoRanging(true);
xAxis.setForceZeroInRange(false);
yAxis.setAutoRanging(true);
yAxis.setForceZeroInRange(false);
xAxis.setLabel("Number of Month");
// creating the chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(xAxis, yAxis);

lineChart.setTitle("Stock Monitoring, 2010");
// defining a series
final XYChart.Series series = new XYChart.Series();
series.setName("My portfolio");
// populating the series with data
series.getData().add(new XYChart.Data(1, 23));
series.getData().add(new XYChart.Data(2, 14));
series.getData().add(new XYChart.Data(3, 15));
series.getData().add(new XYChart.Data(4, 24));
series.getData().add(new XYChart.Data(5, 34));
series.getData().add(new XYChart.Data(6, 36));
series.getData().add(new XYChart.Data(7, 22));
series.getData().add(new XYChart.Data(8, 45));
series.getData().add(new XYChart.Data(9, 43));
series.getData().add(new XYChart.Data(10, 17));
series.getData().add(new XYChart.Data(11, 29));
series.getData().add(new XYChart.Data(12, 25));

// DO NOT ADD DATA TO CHART
// bc.getData().addAll(series1, series2, series3);
final StackPane pane = new StackPane();
pane.getChildren().add(lineChart);
final Scene scene = new Scene(pane, 500, 400);
new ZoomManager(pane, lineChart, series);
stage.setScene(scene);
stage.show();
   }
 
开发者ID:kerner1000,项目名称:javafx-chart-zooming,代码行数:42,代码来源:LineChartSample.java

示例14: createNode

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
@Override
public Node createNode() {
	xAxis = new CategoryAxis();
	xAxis.setAutoRanging(false);
	xAxis.setAnimated(false);

	yAxis = new NumberAxis();
	yAxis.setAnimated(false);
	yAxis.setPrefWidth(60d);
	yAxis.setAutoRanging(true);
	yAxis.setMaxWidth(60d);
	yAxis.setLabel("Violation Count");

	Series<String, Number> dataList = new Series<>(FXCollections.observableArrayList());
	dataList.setName("Priority");

	BarChart<String, Number> c = new BarChart<>(xAxis, yAxis);

	barChart.set(c);

	series = c.getData();

	series.add(0, dataList);
	this.dataList = dataList.getData();

	return c;
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:28,代码来源:PMDViolationbyBarChartComposite.java

示例15: buildPopulationChart

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
/**
 * Creazione del populationChart
 * 
 * @param list
 *            lista degli stati della simulazione
 * @return grafico della popolazione
 */
public final PopulationChart<T> buildPopulationChart(StateList<T> list) {
	final NumberAxis xAxis = new NumberAxis();
	final NumberAxis yAxis = new NumberAxis();
	xAxis.setAutoRanging(true);
	xAxis.setLabel("Generation");
	yAxis.setLabel("Population");
	xAxis.setAnimated(false);
	yAxis.setAnimated(false);

	// creating the chart
	final PopulationChart<T> chart = new PopulationChart<T>(xAxis, yAxis, list);

	return chart;
}
 
开发者ID:Stefn93,项目名称:CellularAutomata,代码行数:22,代码来源:CellularAutomataBuilder.java


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