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


Java Stage.setResizable方法代码示例

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


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

示例1: goToAbout

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

示例2: showAppEditDialog

import javafx.stage.Stage; //导入方法依赖的package包/类
public boolean showAppEditDialog(Entry e) throws Exception {
	FXMLLoader loader = new FXMLLoader();
	loader.setLocation(MainApp.class.getResource("view/AppEditDialog.fxml"));
	AnchorPane page = (AnchorPane) loader.load();
	
	// Create the dialog Stage.
       Stage dialogStage = new Stage();
       dialogStage.setTitle("Edit Entry");
       dialogStage.initModality(Modality.WINDOW_MODAL);
       dialogStage.initOwner(primaryStage);
       Scene scene = new Scene(page);
       dialogStage.setScene(scene);

       // Set the person into the controller.
       AppEditDialogController controller = loader.getController();
       controller.setDialogStage(dialogStage);
       controller.setEntry(e);

       // Show the dialog and wait until the user closes it
       dialogStage.setResizable(false);
       dialogStage.showAndWait();
       
       return controller.isOkClicked();
}
 
开发者ID:yc45,项目名称:kanphnia2,代码行数:25,代码来源:MainApp.java

示例3: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception{
    //fxinit
    Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
    primaryStage.setTitle("Hello World");
    primaryStage.setScene(new Scene(root, 600, 400));
    primaryStage.setResizable(false);
    primaryStage.sizeToScene();
    primaryStage.show();
    System.out.println("INITIALIZED");
    //------

    
    
    
    m.init(this, primaryStage);
    m.go();
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:19,代码来源:App.java

示例4: openGameWindow

import javafx.stage.Stage; //导入方法依赖的package包/类
/**
 * Creates Game window
 * @param game game core
 * @param songURIstring path to the song
 */
private void openGameWindow(Game game, String songURIstring) {
    try {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("/Game.fxml"));
        Parent root = loader.load();
        gameController = (GameController) loader.getController();
        gameController.setGame(game);
        gameController.setSongURIstring(songURIstring);
        Stage gameStage = new Stage();
        gameStage.setTitle("Clone Hero");
        gameStage.setScene(new Scene(root));
        gameStage.setResizable(false);
        gameStage.getIcons().add(new Image(getClass().getResource("/icon.png").toString()));
        gameStage.show();
        gameController.start();
        //((Node)(event.getSource())).getScene().getWindow().hide();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
开发者ID:JavaMugs,项目名称:CloneHero,代码行数:25,代码来源:MenuController.java

示例5: loadImageArchiveEditor

import javafx.stage.Stage; //导入方法依赖的package包/类
@FXML
private void loadImageArchiveEditor() {
	try {
		FXMLLoader loader = new FXMLLoader(App.class.getResource("/ImageArchiveUI.fxml"));

		Parent root = loader.load();

		ImageArchiveController controller = loader.getController();

		Stage stage = new Stage();

		controller.setStage(stage);
		stage.setTitle("Image Archive Editor");
		Scene scene = new Scene(root);
		scene.getStylesheets().add(App.class.getResource("/style.css").toExternalForm());
		stage.getIcons().add(new Image(getClass().getResourceAsStream("/icons/app_icon_128.png")));
		stage.setScene(scene);
		stage.initStyle(StageStyle.TRANSPARENT);
		stage.setResizable(false);
		stage.centerOnScreen();
		stage.setTitle("Archive Editor");
		stage.show();
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:nshusa,项目名称:rsam-gui,代码行数:27,代码来源:StoreController.java

示例6: onStaffModeButtonClicked

import javafx.stage.Stage; //导入方法依赖的package包/类
/**
 * Displays the pop-up dialog which prompts staff members to log in to the system.
 *
 * @throws IOException
 */
@FXML
public void onStaffModeButtonClicked() throws IOException {
    Stage staffLoginDialogStage = new Stage();
    Parent staffLoginDialogRoot = FXMLLoader.load(
        getClass().getResource("/fxml/StaffLoginDialog.fxml")
    );
    Scene staffLoginDialog = new Scene(staffLoginDialogRoot);

    staffLoginDialogStage.getIcons().add(new Image("images/Logo.png"));
    staffLoginDialogStage.setScene(staffLoginDialog);
    staffLoginDialogStage.initModality(Modality.APPLICATION_MODAL);
    staffLoginDialogStage.initOwner(staffModeButton.getScene().getWindow());
    staffLoginDialogStage.setResizable(false);
    staffLoginDialogStage.setTitle("Authentication Required");
    staffLoginDialogStage.centerOnScreen();
    staffLoginDialogStage.show();
}
 
开发者ID:maillouxc,项目名称:git-rekt,代码行数:23,代码来源:HomeScreenController.java

示例7: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
	try {
		Scene scene = new Scene(new LoginView().getView());
		scene.getStylesheets().add("css/application.css");

		primaryStage.setTitle(Constants.APP_NAME);
		primaryStage.setResizable(false);
		primaryStage.setScene(scene);
		primaryStage.getIcons().add(Constants.APP_LOGO);
		primaryStage.show();

		createShortcut();

	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:coding-dream,项目名称:Notebook,代码行数:19,代码来源:App.java

示例8: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {
	try {
		GridPane root = (GridPane)FXMLLoader.load(getClass().getClassLoader().getResource("mainMenu.fxml"));
		Scene scene = new Scene(root,400,400);
		//scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
		primaryStage.setTitle("Vier Gewinnt: Hauptmenu");
		primaryStage.setScene(scene);
		primaryStage.setResizable(false);
		primaryStage.setOnCloseRequest(event -> {
			closeAppl();
		});
		primaryStage.show();
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:lukasbischof,项目名称:Orsum-occulendi,代码行数:18,代码来源:Main.java

示例9: init

import javafx.stage.Stage; //导入方法依赖的package包/类
private void init(Stage primaryStage) {
    Group root = new Group();
    primaryStage.setResizable(false);
    primaryStage.setScene(new Scene(root, 250, 90));

    //create circles by method createMovingCircle listed below
    Circle circle1 = createMovingCircle(Interpolator.LINEAR); //default interpolator
    circle1.setOpacity(0.7);
    Circle circle2 = createMovingCircle(Interpolator.EASE_BOTH); //circle slows down when reached both ends of trajectory
    circle2.setOpacity(0.45);
    Circle circle3 = createMovingCircle(Interpolator.EASE_IN);
    Circle circle4 = createMovingCircle(Interpolator.EASE_OUT);
    Circle circle5 = createMovingCircle(Interpolator.SPLINE(0.5, 0.1, 0.1, 0.5)); //one can define own behaviour of interpolator by spline method
    
    root.getChildren().addAll(
            circle1,
            circle2,
            circle3,
            circle4,
            circle5
    );
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:TimelineInterpolator.java

示例10: 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

示例11: goToReRegistration

import javafx.stage.Stage; //导入方法依赖的package包/类
public void goToReRegistration(double positionX, double positionY) {
	try {
		Stage RegistrationIssueStage = new Stage();
		Parent root = FXMLLoader.load(getClass().getResource("/view/RegistrationIssue.fxml"));
		Scene scene = new Scene(root,800,550);
		RegistrationIssueStage.setScene(scene);
		RegistrationIssueStage.setResizable(false);
		RegistrationIssueStage.setTitle("Registration Issue");
		RegistrationIssueStage.setX(positionX);
		RegistrationIssueStage.setY(positionY);
		RegistrationIssueStage.show();
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:krHasan,项目名称:Money-Manager,代码行数:16,代码来源:GoToRegistration.java

示例12: loadFXMLPage

import javafx.stage.Stage; //导入方法依赖的package包/类
public BaseController loadFXMLPage(String title, FXMLPage fxmlPage, boolean cache) {
    SoftReference<? extends BaseController> parentNodeRef = cacheNodeMap.get(fxmlPage);
    if (cache && parentNodeRef != null) {
        return parentNodeRef.get();
    }
    URL skeletonResource = Thread.currentThread().getContextClassLoader().getResource(fxmlPage.getFxml());
    
    FXMLLoader loader = new FXMLLoader(skeletonResource);
   
    Parent loginNode;
    try {
        loginNode = loader.load();
        BaseController controller = loader.getController();
        dialogStage = new Stage();
        dialogStage.setTitle(title);
        dialogStage.getIcons().add(new Image("image/icon.png"));
        dialogStage.initModality(Modality.APPLICATION_MODAL);
        dialogStage.initOwner(getPrimaryStage());
        dialogStage.setScene(new Scene(loginNode));
        dialogStage.setMaximized(false);
        dialogStage.setResizable(false);
        dialogStage.show();
        controller.setDialogStage(dialogStage);
        SoftReference<BaseController> softReference = new SoftReference<>(controller);
        cacheNodeMap.put(fxmlPage, softReference);
        return controller;
    } catch (IOException e) {
        AlertUtil.showErrorAlert(e.getMessage());
    }
    return null;
}
 
开发者ID:shenzhenMirren,项目名称:vertx-generator,代码行数:32,代码来源:BaseController.java

示例13: create

import javafx.stage.Stage; //导入方法依赖的package包/类
private BaseDialog create() {
        mStage = new Stage();
        mStage.initModality(Modality.WINDOW_MODAL);
        mStage.initOwner(getOwner());
        mStage.initStyle(StageStyle.DECORATED);
        mStage.setResizable(false);
        viewTuple = createContent();
        BaseView view = null;
        if(viewTuple.getView() instanceof BaseView){
            view = (BaseView) viewTuple.getView();
            view.onDialogSet(this);
            root = (Pane) viewTuple.getRoot();
            alignCenter(root.getPrefWidth(), root.getPrefHeight());
            if(isDragable)
                dragDialogAbleNode(root);
        } else {
            try {
                throw new Exception("your view is not a BaseView!");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        mScene = new Scene(viewTuple.getRoot());
//        mScene.getStylesheets().setAll(TestinStage.getInstance().getStylesheet());
        mStage.setScene(mScene);
        mStage.setTitle(view.getTitle());
        return this;
    }
 
开发者ID:cmlanche,项目名称:javafx-qiniu-tinypng-client,代码行数:29,代码来源:BaseDialog.java

示例14: joinNow

import javafx.stage.Stage; //导入方法依赖的package包/类
public void joinNow(ActionEvent actionEvent) {
    try {
        FXMLLoader fxmlLoader2 = new FXMLLoader(getClass().getResource("../../Resources/Layouts/register_stage.fxml"));
        Parent root2 = (Parent) fxmlLoader2.load();
        Stage stage2 = new Stage();
        stage2.setScene(new Scene(root2));
        stage2.setResizable(false);
        stage2.initModality(Modality.WINDOW_MODAL);
        stage2.initOwner(ApplicationLauncher.primaryStage);
        stage2.initStyle(StageStyle.UNDECORATED);
        stage2.showAndWait();
    } catch (Exception e1) {
    }
}
 
开发者ID:alchemsynergy,项目名称:alchem,代码行数:15,代码来源:LoginController.java

示例15: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
    Scene scene = new Scene(root);
 
    String css = FloydWarshall.class.getResource("main.css").toExternalForm();
    scene.getStylesheets().add(css);
    stage.setScene(scene);
    stage.setTitle("Floyd Warshall Simulation");
    stage.setResizable(false);
    stage.show();
}
 
开发者ID:afifaniks,项目名称:FloydWarshallSimulation,代码行数:13,代码来源:FloydWarshall.java


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