Java Code Examples for javafx.scene.control.Label#setMinSize()
The following examples show how to use
javafx.scene.control.Label#setMinSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LineChartSample.java From StockInference-Spark with Apache License 2.0 | 6 votes |
private Label createDataThresholdLabel(int priorValue, int value) { final Label label = new Label(value + ""); label.getStyleClass().addAll("default-color0", "chart-line-symbol", "chart-series-line"); label.setStyle("-fx-font-size: 20; -fx-font-weight: bold;"); if (priorValue == 0) { label.setTextFill(Color.DARKGRAY); } else if (value > priorValue) { label.setTextFill(Color.FORESTGREEN); } else { label.setTextFill(Color.FIREBRICK); } label.setMinSize(Label.USE_PREF_SIZE, Label.USE_PREF_SIZE); return label; }
Example 2
Source File: LineChartSample.java From StockPrediction with Apache License 2.0 | 6 votes |
private Label createDataThresholdLabel(int priorValue, int value) { final Label label = new Label(value + ""); label.getStyleClass().addAll("default-color0", "chart-line-symbol", "chart-series-line"); label.setStyle("-fx-font-size: 20; -fx-font-weight: bold;"); if (priorValue == 0) { label.setTextFill(Color.DARKGRAY); } else if (value > priorValue) { label.setTextFill(Color.FORESTGREEN); } else { label.setTextFill(Color.FIREBRICK); } label.setMinSize(Label.USE_PREF_SIZE, Label.USE_PREF_SIZE); return label; }
Example 3
Source File: ChartUtil.java From DevToolBox with GNU Lesser General Public License v2.1 | 5 votes |
private Label createDataThresholdLabel(Double priorValue, Double value) { final Label label = new Label(value + ""); label.getStyleClass().addAll("default-color0", "chart-line-symbol", "chart-series-line"); label.setStyle("-fx-font-size: 20; -fx-font-weight: bold;"); if (priorValue == 0) { label.setTextFill(Color.DARKGRAY); } else if (value > priorValue) { label.setTextFill(Color.FORESTGREEN); } else { label.setTextFill(Color.FIREBRICK); } label.setMinSize(Label.USE_PREF_SIZE, Label.USE_PREF_SIZE); return label; }