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


Java NumberAxis.setPrefWidth方法代码示例

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


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

示例1: 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

示例2: 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

示例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("Meters");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(true);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:EstimatedAltitudeProfileView.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("factor");
	yAxis.setForceZeroInRange(false);
	yAxis.setAnimated(false);
	return yAxis;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:17,代码来源:ErrorProfileView.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(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

示例7: createIntegerTimingDiagram

import javafx.scene.chart.NumberAxis; //导入方法依赖的package包/类
/**
 * Generates an integer timing diagram.
 *
 * @param concreteSpec the concrete specification which should be used to extract the needed
 *        information
 * @param specIoVar the variable for which a diagram should be generated
 * @param globalXAxis  global x axis used for all diagrams
 * @param selection selection that should be updated when hovering with mouse
 * @param activated only update selection if true
 * @return A {@link Pair} which holds a {@link TimingDiagramController} and a {@link NumberAxis}
 */
public static Pair<TimingDiagramController, Axis> createIntegerTimingDiagram(
    ConcreteSpecification concreteSpec, ValidIoVariable specIoVar, NumberAxis globalXAxis,
    Selection selection, BooleanProperty activated) {
  NumberAxis yaxis = new NumberAxis(0, 10, 1);
  yaxis.setPrefWidth(30);
  yaxis.setSide(Side.LEFT);
  yaxis.setTickLabelFormatter(new IntegerTickLabelConverter());
  yaxis.setMinorTickVisible(false);
  TimingDiagramController timingDiagramController = new TimingDiagramController(globalXAxis,
      yaxis, concreteSpec, specIoVar, selection, activated);
  return new ImmutablePair<>(timingDiagramController, yaxis);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:24,代码来源:TimingDiagramController.java

示例8: 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


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