當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。