private Resource(Scene start, String name, int startCost, long value, long delay, double mult, final MoneyListener listener){
System.out.println(name);
this.prog = (ProgressBar) start.lookup("#" + name + "_progress");
this.made = (Label) start.lookup("#" + name + "_money");
this.buy = (Button) start.lookup("#" + name + "_buy");
this.multiply = mult;
this.name = name;
this.print = (name.charAt(0) + "").toUpperCase() + name.substring(1);
this.value = value;
this.cost = startCost;
this.delay = delay;
this.listener = listener;
setText(made, print + " Earnings: " + format.format(money));
setText(buy, "(" + miners + ") Buy Miner: " + format.format((long)cost));
this.buy.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent event) {
listener.buyMiner(Resource.this.name);
}
});
}
java类javafx.scene.control.ProgressBar的实例源码
CryptoTest.java 文件源码
项目:CryptoPayAPI
阅读 43
收藏 0
点赞 0
评论 0
LoadingStage.java 文件源码
项目:titanium
阅读 35
收藏 0
点赞 0
评论 0
public LoadingStage(String title, String noticeText) {
this.setWidth(WIDTH);
this.setHeight(HEIGHT);
this.setTitle(title);
progressBar = new ProgressBar();
this.notice = new Label(noticeText);
BorderPane mainPane = new BorderPane();
Scene s = new Scene(mainPane);
progressBar.setPrefWidth(WIDTH - 25);
mainPane.setTop(notice);
mainPane.setCenter(progressBar);
mainPane.setPadding(new Insets(15));
this.setScene(s);
}
HygenePreloader.java 文件源码
项目:hygene
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void start(final Stage primaryStage) throws IOException, UIInitialisationException {
stage = primaryStage;
primaryStage.setTitle(Hygene.TITLE);
primaryStage.initStyle(StageStyle.UNDECORATED);
progress = new ProgressBar();
final URL resource = getClass().getResource(PRELOADER_VIEW);
final Parent root = FXMLLoader.load(resource);
if (root == null) {
throw new UIInitialisationException("Root of Preloader could not be found.");
}
final Scene rootScene = new Scene(root);
primaryStage.setScene(rootScene);
primaryStage.show();
}
ProgressSample.java 文件源码
项目:marathonv5
阅读 32
收藏 0
点赞 0
评论 0
@Override
public void start(Stage stage) {
Group root = new Group();
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle("Progress Controls");
for (int i = 0; i < values.length; i++) {
final Label label = labels[i] = new Label();
label.setText("progress:" + values[i]);
final ProgressBar pb = pbs[i] = new ProgressBar();
pb.setProgress(values[i]);
final ProgressIndicator pin = pins[i] = new ProgressIndicator();
pin.setProgress(values[i]);
final HBox hb = hbs[i] = new HBox();
hb.setSpacing(5);
hb.setAlignment(Pos.CENTER);
hb.getChildren().addAll(label, pb, pin);
}
final VBox vb = new VBox();
vb.setSpacing(5);
vb.getChildren().addAll(hbs);
scene.setRoot(vb);
stage.show();
}
RFXProgressBarTest.java 文件源码
项目:marathonv5
阅读 40
收藏 0
点赞 0
评论 0
@Test public void getText() {
ProgressBar progressBar = (ProgressBar) getPrimaryStage().getScene().getRoot().lookup(".progress-bar");
LoggingRecorder lr = new LoggingRecorder();
List<String> text = new ArrayList<>();
Platform.runLater(() -> {
RFXProgressBar rfxProgressBar = new RFXProgressBar(progressBar, null, null, lr);
progressBar.setProgress(0.56);
rfxProgressBar.mouseReleased(null);
text.add(rfxProgressBar.getAttribute("text"));
});
new Wait("Waiting for progress bar text.") {
@Override public boolean until() {
return text.size() > 0;
}
};
AssertJUnit.assertEquals("0.56", text.get(0));
}
NotificationBarPane.java 文件源码
项目:creacoinj
阅读 41
收藏 0
点赞 0
评论 0
public NotificationBarPane(Node content) {
super(content);
progressBar = new ProgressBar();
label = new Label("infobar!");
bar = new HBox(label);
bar.setMinHeight(0.0);
bar.getStyleClass().add("info-bar");
bar.setFillHeight(true);
setBottom(bar);
// Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
sceneProperty().addListener(o -> {
if (getParent() == null) return;
getParent().applyCss();
getParent().layout();
barHeight = bar.getHeight();
bar.setPrefHeight(0.0);
});
items = FXCollections.observableArrayList();
items.addListener((ListChangeListener<? super Item>) change -> {
config();
showOrHide();
});
}
ProgressBarScene.java 文件源码
项目:Clipcon-Client
阅读 38
收藏 0
点赞 0
评论 0
@Override
public void initialize(URL location, ResourceBundle resources) {
ui.setProgressBarScene(this);
for (int i = 0; i < progressBarArray.length; i++) {
if (ui.getMainScene().getProgressBarStageArray()[i] == null) {
index = i;
break;
}
}
number++;
textArray[index] = text;
if (RetrofitDownloadData.isDownloading) {
textArray[index].setText("Downloading");
}
progressBarArray[index] = progressBar;
progressBarArray[index].setProgress(ProgressBar.INDETERMINATE_PROGRESS);
}
NotificationBarPane.java 文件源码
项目:legendary-guide
阅读 34
收藏 0
点赞 0
评论 0
public NotificationBarPane(Node content) {
super(content);
progressBar = new ProgressBar();
label = new Label("infobar!");
bar = new HBox(label);
bar.setMinHeight(0.0);
bar.getStyleClass().add("info-bar");
bar.setFillHeight(true);
setBottom(bar);
// Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
sceneProperty().addListener(o -> {
if (getParent() == null) return;
getParent().applyCss();
getParent().layout();
barHeight = bar.getHeight();
bar.setPrefHeight(0.0);
});
items = FXCollections.observableArrayList();
items.addListener((ListChangeListener<? super Item>) change -> {
config();
showOrHide();
});
}
ChessBotAppSplash.java 文件源码
项目:ChessBot
阅读 37
收藏 0
点赞 0
评论 0
public void init() {
ImageView splash = new ImageView(new Image(
SPLASH_IMAGE
));
loadProgress = new ProgressBar();
loadProgress.setPrefWidth(SPLASH_WIDTH - 20);
loadProgress.setStyle("-fx-padding: 10; ");
progressText = new Label("Loading Chess Bot");
splashLayout = new VBox();
splashLayout.getChildren().addAll(splash, loadProgress, progressText);
progressText.setAlignment(Pos.CENTER);
splashLayout.setStyle(
"-fx-padding: 10; "
+ "-fx-background-color: white; "
+ "-fx-border-width:3; "
+ "-fx-border-color: "
+ "linear-gradient("
+ "to bottom, "
+ "chocolate, "
+ "derive(chocolate, 50%)"
+ ");"
);
splashLayout.setEffect(new DropShadow());
}
batteryMonitorLayoutController.java 文件源码
项目:BatpackJava
阅读 44
收藏 0
点赞 0
评论 0
private void updateModule(Group group, BatteryModule module) {
//System.out.println(group.getChildren());
//voltage, percentage, progressbar, name(is ok)
Label moduleVolt = (Label) group.getChildren().get(0);
Label modulePercent = (Label) group.getChildren().get(1);
ProgressBar progress = (ProgressBar) group.getChildren().get(2);
Label averageTemperature = (Label) group.getChildren().get(4);
double progressValue = ((module.getVoltage() - 48) / (66.666 - 48));
int percentage = (int) (progressValue * 100);
moduleVolt.setText(module.getVoltageAsString());
modulePercent.setText(percentage + " %");
progress.setProgress(progressValue);
// if(module.getId()==1){
// System.out.println("module 1 average temp: "+module.getAverageTemperatureAsString());
// }
averageTemperature.setText(module.getAverageTemperatureAsString());
}
batteryMonitorLayoutController.java 文件源码
项目:BatpackJava
阅读 35
收藏 0
点赞 0
评论 0
private void updateCell(Group cellDisp, BatteryCell cell) {
//disp: V, %, progressbar, name
Label voltage = (Label) cellDisp.getChildren().get(0);
Label percentage = (Label) cellDisp.getChildren().get(1);
ProgressBar progressBar = (ProgressBar) cellDisp.getChildren().get(2);
Label temperature = (Label) cellDisp.getChildren().get(4);
double progress = (double) cell.getStateOfCharge();
int percent = (int) (progress);
voltage.setText(cell.getVoltageAsString());
percentage.setText(percent + " %");
progressBar.setProgress(progress / 100);
// System.out.println("cell id: " + cell.getId());
temperature.setText(cell.getTemperatureAsString());
}
TalkWithSMTP.java 文件源码
项目:Validation-Emails-List
阅读 36
收藏 0
点赞 0
评论 0
public TalkWithSMTP(Domain domain) {
this.domain = domain;
hbox = new HBox();
midProgress = new ProgressBar();
midProgress.setProgress(0.0d);
progresLabel = new Label(domain.getName());
List<String> inside = new ArrayList<>();
int count = 0;
for (String email : domain.getEmails()) {
if (count == 10) {
count = 0;
this.emails.add(new ArrayList<>(inside));
inside.clear();
}
inside.add(email);
count++;
}
}
LoadingProgressDisplay.java 文件源码
项目:willow-browser
阅读 36
收藏 0
点赞 0
评论 0
/**
* Creates a UI display monitor for provided worker.
*
* Assumes the worker is reporting progress as work done on a scale from 0 to 100 (other values indicate indeterminate progress).
*
* @param worker the worker whose progress is to be monitored and displayed.
*/
public LoadingProgressDisplay(Worker worker) {
setMaxWidth(Double.MAX_VALUE);
ColorAdjust bleach = new ColorAdjust();
bleach.setSaturation(-0.6);
setEffect(bleach);
HBox.setHgrow(this, Priority.ALWAYS);
visibleProperty().bind(worker.runningProperty());
// as the webview load progresses update progress.
worker.workDoneProperty().addListener((observableValue, oldNumber, newNumber) -> {
if (newNumber == null) newNumber = -1.0;
final double newValue = newNumber.doubleValue();
if (newValue < 0.0 || newValue > 100.0) {
setProgress(ProgressBar.INDETERMINATE_PROGRESS);
}
setProgress(newValue / 100.0);
});
}
App.java 文件源码
项目:FXGLGames
阅读 43
收藏 0
点赞 0
评论 0
private void createUI() {
ProgressBar hpBar = new ProgressBar();
hpBar.setTranslateX(50);
hpBar.setTranslateY(50);
hpBar.setStyle("-fx-accent: rgb(0, 255, 0);");
hpBar.progressProperty().bind(player.health.divide(10.0f));
ProgressBar gBar = new ProgressBar();
gBar.setTranslateX(50);
gBar.setTranslateY(75);
gBar.progressProperty().bind(player.power.divide(player.maxPower.multiply(1.0f)));
Text score = new Text();
score.setTranslateX(50);
score.setTranslateY(25);
score.setFont(Config.FONT);
score.setFill(Color.GOLD);
score.textProperty().bind(player.score.asString());
UI_ROOT.getChildren().setAll(score, hpBar, gBar, createInfo());
}
NotificationBarPane.java 文件源码
项目:cryptwallet
阅读 44
收藏 0
点赞 0
评论 0
public NotificationBarPane(Node content) {
super(content);
progressBar = new ProgressBar();
label = new Label("infobar!");
bar = new HBox(label);
bar.setMinHeight(0.0);
bar.getStyleClass().add("info-bar");
bar.setFillHeight(true);
setBottom(bar);
// Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
sceneProperty().addListener(o -> {
if (getParent() == null) return;
getParent().applyCss();
getParent().layout();
barHeight = bar.getHeight();
bar.setPrefHeight(0.0);
});
items = FXCollections.observableArrayList();
items.addListener((ListChangeListener<? super Item>) change -> {
config();
showOrHide();
});
}
MainPreloader.java 文件源码
项目:photometric-data-retriever
阅读 38
收藏 0
点赞 0
评论 0
@Override
public void start(Stage primaryStage) throws Exception {
logger.debug("Starting Preloader");
preloaderStage = primaryStage;
VBox loading = new VBox(20);
loading.setMaxWidth(Region.USE_PREF_SIZE);
loading.setMaxHeight(Region.USE_PREF_SIZE);
ProgressBar progressBar = new ProgressBar();
progressBar.setPrefWidth(240);
loading.getChildren().add(progressBar);
infoLabel = new Label("Initializing application...");
loading.getChildren().add(infoLabel);
BorderPane root = new BorderPane(loading);
Scene scene = new Scene(root);
primaryStage.setWidth(300);
primaryStage.setHeight(150);
primaryStage.initStyle(StageStyle.UNDECORATED);
primaryStage.setScene(scene);
primaryStage.show();
}
Retrospector.java 文件源码
项目:Retrospector
阅读 38
收藏 0
点赞 0
评论 0
@Override
public void init() {
ImageView splash = new ImageView(new Image(
SPLASH_IMAGE,
SPLASH_WIDTH,
SPLASH_HEIGHT,
true,
true
));
loadProgress = new ProgressBar(0);
loadProgress.setPrefWidth(SPLASH_WIDTH);
progressText = new Label("Initializing . . .");
progressText.setBackground(new Background(new BackgroundFill(Color.GHOSTWHITE,new CornerRadii(5),new Insets(0))));
splashLayout = new VBox();
splashLayout.getChildren().addAll(splash, loadProgress, progressText);
progressText.setAlignment(Pos.CENTER);
splashLayout.setBackground(Background.EMPTY);
}
AchievementFX.java 文件源码
项目:Retrospector
阅读 32
收藏 0
点赞 0
评论 0
public Node getDisplay() {
VBox box = new VBox();
box.setAlignment(Pos.CENTER);
Text title = new Text(achievement.getTitle());
title.setFont(Font.font(20));
Text desc = new Text(achievement.getDescription());
Integer progress = achievement.getProgress();
ProgressBar bar = new ProgressBar(progress*1.0/100);
Tooltip.install(bar,new Tooltip("["+progress+"%] "+achievement.getHint()));
box.getChildren().add(title);
box.getChildren().add(image);
if(achievement.isUnlocked())
box.getChildren().add(desc);
else
box.getChildren().add(bar);
return box;
}
Mp3ImportProgress.java 文件源码
项目:amperfi
阅读 27
收藏 0
点赞 0
评论 0
public Mp3ImportProgress() {
this.getStyleClass().add("import-progress");
setAlignment(Pos.CENTER);
setSpacing(35);
Label lblTitle = new Label("Importing mp3s");
lblTitle.getStyleClass().add("settings-page-title");
pbImporting = new ProgressBar();
pbImporting.setProgress(0.5);
pbImporting.maxWidthProperty().bind(this.widthProperty().multiply(.8));
lblPath = new Label();
lblPath.getStyleClass().add("settings-page-title2");
btnCancel = new Button("Cancel");
btnCancel.getStyleClass().add("btn-cancel");
this.getChildren().addAll(lblTitle, pbImporting, lblPath, btnCancel);
}
ProgressApp.java 文件源码
项目:openjfx-8u-dev-tests
阅读 34
收藏 0
点赞 0
评论 0
@Override
public Node drawNode() {
GridPane root = new GridPane();
root.setVgap(spacing / 2);
root.setHgap(spacing);
double d, _d = -0.25;
for (int i = 0; _d < 1; i++) {
d = _d + 0.25;
_d = d;
ProgressBar bar = progressBarCreate();
VBox box = new VBox();
box.setAlignment(Pos.CENTER);
box.getChildren().add(new Label("[" + d + "]"));
bar.setProgress(d);
if (bar.getProgress() != d) {
reportGetterFailure("progress_indicator.getProgress()");
}
box.getChildren().add(bar);
root.add(box, i % 3, i / 3);
}
return root;
}
TreeTableCellsTest.java 文件源码
项目:openjfx-8u-dev-tests
阅读 32
收藏 0
点赞 0
评论 0
@Test(timeout = 30000)
public void progressBarCellFactoryTest() {
doFactoryChange(CellType.ProgressBar);
final Lookup lookup = testedControl.as(Parent.class, Node.class).lookup(new LookupCriteria() {
public boolean check(Object cntrl) {
if (cntrl instanceof ProgressBar) {
//Some cells are created for caching purposes, ignore them.
if (!((Control) cntrl).getParent().getParent().getParent().isVisible()
|| !((Control) cntrl).getParent().getParent().isVisible()
|| !((Control) cntrl).getParent().isVisible()) {
return false;
}
return true;
}
return false;
}
});
Wrap<? extends ProgressBar> progressBar = lookup.wrap();
assertEquals("Initial value is incorrect", getProgressBarValue(progressBar), 0.5, 0.0001);
changeProgressValues(0.75);
assertEquals("Initial value is incorrect", getProgressBarValue(progressBar), 0.75, 0.0001);
assertEquals("Amount of progress bars", lookup.size(), DATA_ITEMS_SIZE);
}
BenchmarkJFX.java 文件源码
项目:benchmarkjfx
阅读 32
收藏 0
点赞 0
评论 0
@Override
public void start(Stage primaryStage) throws Exception {
List<Stage> benchmarkList = new ArrayList<>();
benchmarkList.add(new VectorBall(false));
benchmarkList.add(new VectorBall(true));
benchmarkList.add(new BitmapBall(false));
benchmarkList.add(new BitmapBall(true));
benchmarkList.add(new ListViewBenchmark(false));
benchmarkList.add(new ListViewBenchmark(true));
benchmarkList.add(new AreaChartBenchmark(false));
benchmarkList.add(new AreaChartBenchmark(true));
ProgressBar bar = getProgressBar(primaryStage);
for (int i = 0; i < benchmarkList.size(); i++) {
if (benchmarkList.size() != 0) {
bar.setProgress((double) i / (double) benchmarkList.size());
}
benchmarkList.get(i).showAndWait();
Thread.sleep(2000);
}
primaryStage.close();
}
NotificationBarPane.java 文件源码
项目:thunder
阅读 36
收藏 0
点赞 0
评论 0
public NotificationBarPane (Node content) {
super(content);
progressBar = new ProgressBar();
label = new Label("infobar!");
bar = new HBox(label);
bar.setMinHeight(0.0);
bar.getStyleClass().add("info-bar");
bar.setFillHeight(true);
setBottom(bar);
// Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
sceneProperty().addListener(o -> {
if (getParent() == null) {
return;
}
getParent().applyCss();
getParent().layout();
barHeight = bar.getHeight();
bar.setPrefHeight(0.0);
});
items = FXCollections.observableArrayList();
items.addListener((ListChangeListener<? super Item>) change -> {
config();
showOrHide();
});
}
MQTTMainNode.java 文件源码
项目:helloiot
阅读 34
收藏 0
点赞 0
评论 0
public void showConnecting() {
if (connectingdialog == null) {
Label l = new Label(resources.getString("message.waitingconnection"));
l.setAlignment(Pos.CENTER);
l.setMaxSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
ProgressBar p = new ProgressBar();
p.setMaxSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
VBox box = new VBox();
box.setSpacing(5.0);
box.setPadding(new Insets(0.0, 0.0, 50.0, 0.0));
box.getChildren().addAll(l, p);
connectingdialog = new DialogView();
connectingdialog.setMaster(true);
connectingdialog.setContent(box);
connectingdialog.show(MessageUtils.getRoot(rootpane));
}
}
DynamicCssOnlyPropertiesTest.java 文件源码
项目:JttDesktop
阅读 38
收藏 0
点赞 0
评论 0
@Ignore
@Test public void manual() throws InterruptedException{
progressBar = new ProgressBar( 0.4 );
TestApplication.launch( () -> new BorderPane( progressBar ) );
systemUnderTest = new DynamicCssOnlyProperties();
Thread.sleep( 2000 );
systemUnderTest.applyCustomColours( Color.BLACK, Color.AQUAMARINE, progressBar );
Thread.sleep( 2000 );
systemUnderTest.applyCustomColours( Color.ORANGE, Color.SEASHELL, progressBar );
Thread.sleep( 2000 );
systemUnderTest.applyCustomColours( Color.INDIGO, Color.PEACHPUFF, progressBar );
Thread.sleep( 1000000 );
}
App.java 文件源码
项目:FXGLGames
阅读 40
收藏 0
点赞 0
评论 0
private void createUI() {
ProgressBar hpBar = new ProgressBar();
hpBar.setTranslateX(50);
hpBar.setTranslateY(50);
hpBar.setStyle("-fx-accent: rgb(0, 255, 0);");
hpBar.progressProperty().bind(player.health.divide(10.0f));
ProgressBar gBar = new ProgressBar();
gBar.setTranslateX(50);
gBar.setTranslateY(75);
gBar.progressProperty().bind(player.power.divide(player.maxPower.multiply(1.0f)));
Text score = new Text();
score.setTranslateX(50);
score.setTranslateY(25);
score.setFont(Config.FONT);
score.setFill(Color.GOLD);
score.textProperty().bind(player.score.asString());
UI_ROOT.getChildren().setAll(score, hpBar, gBar, createInfo());
}
NotificationBarPane.java 文件源码
项目:namecoinj
阅读 36
收藏 0
点赞 0
评论 0
public NotificationBarPane(Node content) {
super(content);
progressBar = new ProgressBar();
label = new Label("infobar!");
bar = new HBox(label);
bar.setMinHeight(0.0);
bar.getStyleClass().add("info-bar");
bar.setFillHeight(true);
setBottom(bar);
// Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
sceneProperty().addListener(o -> {
if (getParent() == null) return;
getParent().applyCss();
getParent().layout();
barHeight = bar.getHeight();
bar.setPrefHeight(0.0);
});
items = FXCollections.observableArrayList();
items.addListener((ListChangeListener<? super Item>) change -> {
config();
showOrHide();
});
}
ProgressCreator.java 文件源码
项目:StudyGuide
阅读 39
收藏 0
点赞 0
评论 0
/**
* A util method to display a blocking progress pop-up with the given parameters.
*
* @param progressObservable the observable object that gives us the progress
* @param message the message to display while waiting
* @return the stage of the opened dialog with the progress bar
*/
public static Stage showProgress(ProgressObservable progressObservable, String message) {
Stage dialogStage = new Stage();
ProgressBar progressBar = new ProgressBar();
dialogStage.initStyle(StageStyle.DECORATED);
dialogStage.setResizable(false);
dialogStage.initModality(Modality.APPLICATION_MODAL);
final Label label = new Label();
label.setText(message);
progressBar.progressProperty().bind(progressObservable.progressProperty());
final VBox vBox = new VBox();
vBox.setAlignment(Pos.CENTER);
vBox.getChildren().addAll(label, progressBar);
Scene scene = new Scene(vBox);
dialogStage.setScene(scene);
dialogStage.toFront();
dialogStage.setOnCloseRequest(Event::consume); // prevent closing of the dialog window
dialogStage.show();
return dialogStage;
}
SplashPreloader.java 文件源码
项目:FXImgurUploader
阅读 66
收藏 0
点赞 0
评论 0
private Scene createPreloaderScene() {
splash = new ImageView(new Image(SPLASH_IMAGE));
loadProgress = new ProgressBar();
loadProgress.setPrefWidth(SPLASH_WIDTH);
progressText = new Label();
progressText.setAlignment(Pos.CENTER);
progressText.setStyle("-fx-font-weight: bold; -fx-fill: rgb(43,43,43);");
splashLayout = new VBox(10);
splashLayout.getChildren().addAll(splash, loadProgress, progressText);
splashLayout.setAlignment(Pos.CENTER);
splashLayout.setPadding(new Insets(10, 5, 5, 5));
splash.setEffect(new DropShadow());
progressText.setEffect(new DropShadow(4, Color.rgb(133, 191, 37)));
Scene scene = new Scene(splashLayout, SPLASH_WIDTH, SPLASH_HEIGHT, Color.TRANSPARENT);
scene.getStylesheets().add("css/styles.css");
return scene;
}
NotificationBarPane.java 文件源码
项目:CoinJoin
阅读 46
收藏 0
点赞 0
评论 0
public NotificationBarPane(Node content) {
super(content);
progressBar = new ProgressBar();
label = new Label("infobar!");
bar = new HBox(label);
bar.setMinHeight(0.0);
bar.getStyleClass().add("info-bar");
bar.setFillHeight(true);
setBottom(bar);
// Figure out the height of the bar based on the CSS. Must wait until after we've been added to the parent node.
sceneProperty().addListener(o -> {
if (getParent() == null) return;
getParent().applyCss();
getParent().layout();
barHeight = bar.getHeight();
bar.setPrefHeight(0.0);
});
items = FXCollections.observableArrayList();
items.addListener((ListChangeListener<? super Item>) change -> {
config();
showOrHide();
});
}