use of javafx.scene.layout.AnchorPane in project jphp by jphp-compiler.
the class UXForm method __construct.
@Signature
public void __construct(@Nullable Stage stage) {
__wrappedObject = stage == null ? new Stage() : stage;
AnchorPane layout = new AnchorPane();
Scene scene = new Scene(layout);
getWrappedObject().setScene(scene);
}
use of javafx.scene.layout.AnchorPane in project JFoenix by jfoenixadmin.
the class PopupDemo method start.
@Override
public void start(Stage primaryStage) throws Exception {
JFXHamburger show = new JFXHamburger();
show.setPadding(new Insets(10, 5, 10, 5));
JFXRippler rippler = new JFXRippler(show, RipplerMask.CIRCLE, RipplerPos.BACK);
JFXListView<Label> list = new JFXListView<>();
for (int i = 1; i < 5; i++) {
list.getItems().add(new Label("Item " + i));
}
AnchorPane container = new AnchorPane();
container.getChildren().add(rippler);
AnchorPane.setLeftAnchor(rippler, 200.0);
AnchorPane.setTopAnchor(rippler, 210.0);
StackPane main = new StackPane();
main.getChildren().add(container);
JFXPopup popup = new JFXPopup(list);
rippler.setOnMouseClicked(e -> popup.show(rippler, PopupVPosition.TOP, PopupHPosition.LEFT));
final Scene scene = new Scene(main, 800, 800);
scene.getStylesheets().add(PopupDemo.class.getResource("/css/jfoenix-components.css").toExternalForm());
primaryStage.setTitle("JFX Popup Demo");
primaryStage.setScene(scene);
primaryStage.setResizable(false);
primaryStage.show();
}
use of javafx.scene.layout.AnchorPane in project BachelorPraktikum by lucasbuschlinger.
the class ConflictedLocations method initRootLayout.
/**
* Initiates the view.
*/
private void initRootLayout() {
try {
FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource("views/ConflictView.fxml"));
AnchorPane rootLayout = (AnchorPane) loader.load();
Scene scene = new Scene(rootLayout);
primaryStage.setScene(scene);
primaryStage.show();
} catch (IOException e) {
e.printStackTrace();
}
}
use of javafx.scene.layout.AnchorPane in project dwoss by gg-net.
the class RightsManagmentController method openOperatorManagment.
/**
* This open a Stage to edit the {@link Operator} if the {@link Operator} is not null, if is null it will be a creation of a {@link Operator}.
* <p>
* @param op is the {@link Operator} which is edited, can be null to create a new.
*/
private void openOperatorManagment(Operator op) {
try {
FXMLLoader fxmlLoader = new FXMLLoader();
AnchorPane page = (AnchorPane) fxmlLoader.load(getClass().getResource("OperatorManagmentView.fxml").openStream());
OperatorManagmentController controller = (OperatorManagmentController) fxmlLoader.getController();
controller.setOperator(op);
Stage stage = new Stage();
stage.setTitle("Nutzer Managment");
Scene scene = new Scene(page, Color.ALICEBLUE);
stage.setScene(scene);
stage.showAndWait();
} catch (IOException ex) {
Ui.handle(ex);
}
}
use of javafx.scene.layout.AnchorPane in project trex-stateless-gui by cisco-system-traffic-generator.
the class TrexApp method start.
@Override
public void start(Stage stage) throws Exception {
speedupTooltip();
primaryStage = stage;
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/MainView.fxml"));
AnchorPane page = fxmlLoader.load();
MainViewController mainviewcontroller = fxmlLoader.getController();
Scene scene = new Scene(page);
scene.getStylesheets().add(TrexApp.class.getResource("/styles/mainStyle.css").toExternalForm());
stage.setScene(scene);
stage.setTitle("TRex");
stage.setResizable(true);
stage.setMinWidth(780);
stage.setMinHeight(700);
stage.getIcons().add(new Image("/icons/trex.png"));
packetBuilderAppController = injector.getInstance(AppController.class);
PreferencesManager.getInstance().setPacketEditorConfigurations(packetBuilderAppController.getConfigurations());
packetBuilderAppController.registerEventBusHandler(mainviewcontroller);
stage.show();
}
Aggregations