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


Java Stage.setY方法代码示例

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


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

示例1: createControlView

import javafx.stage.Stage; //导入方法依赖的package包/类
private void createControlView(TreeMap... treeMaps) {
    Stage stage = new Stage();
    try {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("DataControl.fxml"));
        Parent root = loader.load();
        DataControlController controller = loader.getController();
        for (TreeMap t : treeMaps) {
            addTab(t);
            controller.addData(t);
        }
        Scene scene = new Scene(root);
        stage.setTitle("FxTreeMap Data control view");
        stage.setScene(scene);
    } catch (IOException e) {
        LOG.log(Level.SEVERE, "Exception while loading control view: {0}", e);
    }
    stage.show();
    stage.setX(stage.getX() + DELTA_SCREEN_POSITION);
    stage.setY(stage.getY() + DELTA_SCREEN_POSITION);
}
 
开发者ID:PtitNoony,项目名称:FxTreeMap,代码行数:21,代码来源:SampleViewController.java

示例2: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
	logger.info(getRuntimeDetails());

	Point mousePosition = MouseInfo.getPointerInfo().getLocation();
	stage.setX(mousePosition.getX());
	stage.setY(mousePosition.getY());

	try {
		dataStorage = new DataStorage();
	} catch (IOException ex) {
		logger.error("Could not initialize working directory", ex);

		ExceptionDialog exceptionDialog = new ExceptionDialog(ex);
		exceptionDialog.setTitle("Error");
		exceptionDialog.setHeaderText("Could not initialize working directory");
		exceptionDialog.show();

		return;
	}

	new MainWindow(stage);

	stage.setMaximized(true);
}
 
开发者ID:Quantencomputer,项目名称:cyoastudio,代码行数:26,代码来源:Application.java

示例3: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("menuSample.fxml"));
    primaryStage.setTitle("Hello World");

    Screen screen = Screen.getPrimary();
    Rectangle2D bounds = screen.getVisualBounds();
    primaryStage.setX(bounds.getMinX());
    primaryStage.setY(bounds.getMinY());
    primaryStage.setWidth(bounds.getWidth());
    primaryStage.setHeight(bounds.getHeight());
    primaryStage.setMaximized(true);
    Scene menuScene = new Scene(root, 1080, 720);
    //primaryStage.setFullScreen(true);
    primaryStage.setScene(menuScene);


    //primaryStage.setFullScreen(true);
    primaryStage.show();
}
 
开发者ID:gokcan,项目名称:Mafia-TCoS-CS319-Group2A,代码行数:21,代码来源:Main.java

示例4: showSplash

import javafx.stage.Stage; //导入方法依赖的package包/类
private void showSplash(final Stage initStage, Task<?> task, InitCompletionHandler initCompletionHandler) {
    progressText.textProperty().bind(task.messageProperty());
    loadProgress.progressProperty().bind(task.progressProperty());
    task.stateProperty().addListener((observableValue, oldState, newState) -> {
        if (newState == Worker.State.SUCCEEDED) {
            loadProgress.progressProperty().unbind();
            loadProgress.setProgress(1);
            initStage.toFront();
            FadeTransition fadeSplash = new FadeTransition(Duration.seconds(1.2), splashLayout);
            fadeSplash.setFromValue(1.0);
            fadeSplash.setToValue(0.0);
            fadeSplash.setOnFinished(actionEvent -> initStage.hide());
            fadeSplash.play();

            initCompletionHandler.complete();
        }
    });

    Scene splashScene = new Scene(splashLayout);
    initStage.initStyle(StageStyle.UNDECORATED);
    final Rectangle2D bounds = Screen.getPrimary().getBounds();
    initStage.setScene(splashScene);
    initStage.setX(bounds.getMinX() + bounds.getWidth() / 2 - SPLASH_WIDTH / 2);
    initStage.setY(bounds.getMinY() + bounds.getHeight() / 2 - SPLASH_HEIGHT / 2);
    initStage.show();
}
 
开发者ID:mhusam,项目名称:ChessBot,代码行数:27,代码来源:ChessBotAppSplash.java

示例5: goToSettings

import javafx.stage.Stage; //导入方法依赖的package包/类
public void goToSettings(double positionX, double positionY) {
	try {
		Stage SettingsStage = new Stage();
		Parent root = FXMLLoader.load(getClass().getResource("/view/Settings.fxml"));
		Scene scene = new Scene(root,800,550);
		SettingsStage.setScene(scene);
		SettingsStage.setResizable(false);
		SettingsStage.getIcons().add(new Image(getClass().getResourceAsStream("/imges/purse.png")));
		SettingsStage.setTitle("Settings");
		SettingsStage.setX(positionX);
		SettingsStage.setY(positionY);
		SettingsStage.show();
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:17,代码来源:GoToOperation.java

示例6: goToTransactionHistory

import javafx.stage.Stage; //导入方法依赖的package包/类
public void goToTransactionHistory(double positionX, double positionY) {
	try {
		Stage TransactionHistoryStage = new Stage();
		Parent root = FXMLLoader.load(getClass().getResource("/view/TransactionHistory.fxml"));
		Scene scene = new Scene(root,800,550);
		TransactionHistoryStage.setScene(scene);
		TransactionHistoryStage.setResizable(false);
		TransactionHistoryStage.getIcons().add(new Image(getClass().getResourceAsStream("/imges/purse.png")));
		TransactionHistoryStage.setTitle("Transaction History");
		TransactionHistoryStage.setX(positionX);
		TransactionHistoryStage.setY(positionY);
		TransactionHistoryStage.show();
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:17,代码来源:GoToOperation.java

示例7: goToCashCalculate

import javafx.stage.Stage; //导入方法依赖的package包/类
public void goToCashCalculate(double positionX, double positionY) {
	try {
		Stage CashCalculateStage = new Stage();
		Parent root = FXMLLoader.load(getClass().getResource("/view/CashCalculate.fxml"));
		Scene scene = new Scene(root,800,550);
		CashCalculateStage.setScene(scene);
		CashCalculateStage.setResizable(false);
		CashCalculateStage.getIcons().add(new Image(getClass().getResourceAsStream("/imges/purse.png")));
		CashCalculateStage.setTitle("Cash Calculate");
		CashCalculateStage.setX(positionX);
		CashCalculateStage.setY(positionY);
		CashCalculateStage.show();
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:17,代码来源:GoToOperation.java

示例8: clickItem

import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void clickItem(MouseEvent event) throws IOException {
    if (event.getClickCount() == 2) {
        stage = (Stage) label.getScene().getWindow();
        FXMLLoader loader = new FXMLLoader(getClass().getResource("/callib/Views/SearchDetails.fxml"));
        Stage modal  = new Stage();
        modal.initModality(Modality.APPLICATION_MODAL);
        modal.setScene(
                new Scene((Pane) loader.load())
        );
        modal.setX(stage.getX() + 50);
        modal.setY(stage.getY() + 50);
        SearchDetailsController controller = (SearchDetailsController) loader.getController();
        controller.initData(table.getSelectionModel().getSelectedItem().getId());
        
        modal.showAndWait();
        this.displayData();
    }
}
 
开发者ID:bartoszgajda55,项目名称:IP1,代码行数:20,代码来源:SearchController.java

示例9: goToHelp

import javafx.stage.Stage; //导入方法依赖的package包/类
public void goToHelp(double positionX, double positionY) {
	try {
		Stage HelpStage = new Stage();
		Parent root = FXMLLoader.load(getClass().getResource("/view/Help.fxml"));
		Scene scene = new Scene(root,800,550);
		HelpStage.setScene(scene);
		HelpStage.setResizable(false);
		HelpStage.getIcons().add(new Image(getClass().getResourceAsStream("/imges/purse.png")));
		HelpStage.setTitle("Help");
		HelpStage.setX(positionX);
		HelpStage.setY(positionY);
		HelpStage.show();
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:17,代码来源:GoToOperation.java

示例10: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(final Stage primaryStage) throws Exception
{

    this.preloaderStage = primaryStage;

    final ImageView splash = new ImageView(new Image(Constant.IMG_DIR + "banner.png"));

    this.loadProgressPhase = new JFXProgressBar();
    this.loadProgressPhase.setPrefWidth(Constant.SPLASH_WIDTH);

    this.splashLayout = new VBox();
    this.splashLayout.getChildren().addAll(splash, this.loadProgressPhase);

    this.splashLayout.setStyle("-fx-padding: 5; " + "-fx-background-color: gainsboro; " + "-fx-border-width:2; "
            + "-fx-border-color: " + "linear-gradient(" + "to bottom, " + "MediumSeaGreen, "
            + "derive(MediumSeaGreen, 50%)" + ");");
    this.splashLayout.setEffect(new DropShadow());

    final Scene splashScene = new Scene(this.splashLayout, Color.TRANSPARENT);
    final Rectangle2D bounds = Screen.getPrimary().getBounds();

    primaryStage.setScene(splashScene);
    primaryStage.setX(bounds.getMinX() + bounds.getWidth() / 2 - Constant.SPLASH_WIDTH / 2);
    primaryStage.setY(bounds.getMinY() + bounds.getHeight() / 2 - Constant.SPLASH_HEIGHT / 2);
    primaryStage.getIcons().add(new Image(Constant.IMG_DIR + "icon.png"));
    primaryStage.setTitle(Constant.APP_NAME);

    primaryStage.initStyle(StageStyle.UNDECORATED);
    primaryStage.setAlwaysOnTop(true);
    primaryStage.show();

}
 
开发者ID:Leviathan-Studio,项目名称:MineIDE,代码行数:34,代码来源:MineIDEPreloader.java

示例11: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start() {
    stage = new Stage();
    stage.initModality(Modality.APPLICATION_MODAL);
    stage.setTitle("Rename File");
    stage.setWidth(400);
    stage.setHeight(150);
    stage.setResizable(false);

    Screen screen = new Screen();
    Point point = screen.calculateCenter(400, 150);
    stage.setX(point.getX());
    stage.setY(point.getY());

    CustomIcons customIcons = new CustomIcons();
    stage.getIcons().add(customIcons.getLogo());

    RenameFolderView renameFolderView = new RenameFolderView();
    Scene scene = new Scene(renameFolderView.getView());
    stage.setScene(scene);
    stage.show();
}
 
开发者ID:MrChebik,项目名称:Coconut-IDE,代码行数:22,代码来源:RenameFolderPlace.java

示例12: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start() {
    stage = new Stage();
    stage.initModality(Modality.APPLICATION_MODAL);
    stage.setTitle("Create File");
    stage.setWidth(400);
    stage.setHeight(150);
    stage.setResizable(false);

    Screen screen = new Screen();
    Point point = screen.calculateCenter(400, 150);
    stage.setX(point.getX());
    stage.setY(point.getY());

    CustomIcons customIcons = new CustomIcons();
    stage.getIcons().add(customIcons.getLogo());

    CreateFileView createFileView = new CreateFileView();
    Scene scene = new Scene(createFileView.getView());
    stage.setScene(scene);
    stage.show();
}
 
开发者ID:MrChebik,项目名称:Coconut-IDE,代码行数:22,代码来源:CreateFilePlace.java

示例13: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start() {
    stage = new Stage();
    stage.initModality(Modality.APPLICATION_MODAL);
    stage.setTitle("New Project");
    stage.setWidth(500);
    stage.setHeight(200);
    stage.setResizable(false);

    Screen screen = new Screen();
    Point point = screen.calculateCenter(500, 200);
    stage.setX(point.getX());
    stage.setY(point.getY());

    CustomIcons customIcons = new CustomIcons();
    stage.getIcons().add(customIcons.getLogo());

    CreateProjectView createProjectView = new CreateProjectView();
    Scene scene = new Scene(createProjectView.getView());
    stage.setScene(scene);
    stage.show();
}
 
开发者ID:MrChebik,项目名称:Coconut-IDE,代码行数:22,代码来源:CreateProjectPlace.java

示例14: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start() {
    stage = new Stage();
    stage.initModality(Modality.APPLICATION_MODAL);
    stage.setTitle("Create Folder");
    stage.setWidth(400);
    stage.setHeight(150);
    stage.setResizable(false);

    Screen screen = new Screen();
    Point point = screen.calculateCenter(400, 150);
    stage.setX(point.getX());
    stage.setY(point.getY());

    CustomIcons customIcons = new CustomIcons();
    stage.getIcons().add(customIcons.getLogo());

    CreateFolderView createFolderView = new CreateFolderView();
    Scene scene = new Scene(createFolderView.getView());
    stage.setScene(scene);
    stage.show();
}
 
开发者ID:MrChebik,项目名称:Coconut-IDE,代码行数:22,代码来源:CreateFolderPlace.java

示例15: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage stage) {
  super.start(stage);
  scene = createScene();
  setMenuBar(createMenuBar(scene, app));
  showMenuBar(scene, getMenuBar(), true);
  stage.setScene(scene);
  setUpStatusBar();
  this.setupXyTabPane();
  setupDashBoard();
  setup(app);
  setupSettings();
  this.setActiveTabPane(DASH_BOARD_GROUP);
  stage.setX(sceneBounds.getMinX());
  stage.setY(sceneBounds.getMinY());
  stage.show();
  available = true;
  if (!testMode) {
    // if this is the first Start then show the Welcome Wizard
    if (prefs != null && prefs.getAutoStart()) {
      // switch to fullscreen
      Platform.runLater(() -> switchFullScreen(true));
      // hide menu bar
      Platform.runLater(() -> showMenuBar(scene, getMenuBar(), false));
      this.startMonitoring(prefs.getDebug());
    } else {
      optionalShowWelcomeWizard();
    }
  }
}
 
开发者ID:BITPlan,项目名称:can4eve,代码行数:31,代码来源:JavaFXDisplay.java


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