I was wondering if it is possible to use a NotificationPane with a screen built in SceneBuilder.
For example I have a dynamically loaded tab which was built with FXML.
It starts with a VBox and linked via the fx:id
@FXML
VBox vbox;
private NotificationPane np;
I attempted in the initialize of the controller to do the following;
np = new NotificationPane(vbox);
np.setText("my notification");
np.setShowFromTop(true);
Then in a clickHandler()
np.show();
I get no errors but nothing displays.
Just wondering if that is possible.
Thanks
I just wanted to add the NP to the VBox or AnchorPane, but that still didn't seen to work
Thanks for the suggestion, however I don't want to replace what I have, just append to it.
I just wanted to add the NP to the VBox or AnchorPane, but that still didn't seen to work
--
You received this message because you are subscribed to a topic in the Google Groups "ControlsFX" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/controlsfx-dev/XRIgrFbrVs8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to controlsfx-de...@googlegroups.com.
To post to this group, send email to control...@googlegroups.com.
Visit this group at http://groups.google.com/group/controlsfx-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/controlsfx-dev/02f16e15-da75-4eb0-9b76-1c7d45bb215b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
package org.sif.javafx.screen1;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.TextArea;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.VBox;
import org.controlsfx.control.NotificationPane;
public class ScreenOneController {
@FXML
TextArea ta;
@FXML
VBox vbox;
NotificationPane notificationPane;
public void initialize() {
ObservableList<Node> list = vbox.getChildren();
Node n = list.iterator().next();
AnchorPane nn = (AnchorPane)n;
notificationPane = new NotificationPane(nn);
notificationPane.getStyleClass().add(NotificationPane.STYLE_CLASS_DARK);
notificationPane.setText("New data available for review.");
notificationPane.setShowFromTop(false);
vbox.getChildren().clear();
vbox.getChildren().add(notificationPane);
}
@FXML
private void okClickHandler() {
notificationPane.show();
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/controlsfx-dev/6F3D4057-F901-43DB-8AC4-2CBB0BB16E34%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/controlsfx-dev/584B0E40-7E6B-450C-9682-F299764360AF%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/controlsfx-dev/421B87E1-57ED-4D8D-B290-82D59F217E5D%40gmail.com.
-- Jonathan
You received this message because you are subscribed to the Google Groups "ControlsFX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to controlsfx-de...@googlegroups.com.
To post to this group, send email to control...@googlegroups.com.
Visit this group at http://groups.google.com/group/controlsfx-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/controlsfx-dev/CAPOANGBcPi%3DGP5CvseUMf_%3D_FA6o%3DPOjRtrYgbv_nM71R9Cieg%40mail.gmail.com.