當前位置: 首頁>>代碼示例>>Java>>正文


Java UndecoratorScene類代碼示例

本文整理匯總了Java中insidefx.undecorator.UndecoratorScene的典型用法代碼示例。如果您正苦於以下問題:Java UndecoratorScene類的具體用法?Java UndecoratorScene怎麽用?Java UndecoratorScene使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


UndecoratorScene類屬於insidefx.undecorator包,在下文中一共展示了UndecoratorScene類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: quickEntry

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@FXML
public void quickEntry(ActionEvent e) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/retrospector/fxml/quickentry/QuickEntry.fxml"));
        Parent root = (Parent) fxmlLoader.load();
        Stage stage = new Stage();
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(stage, (Region) root);
        stage.setScene(undecoratorScene);
        QuickEntryController qec = fxmlLoader.getController();
        qec.setup(currentTab);
        stage.setTitle("Quick Entry");
        stage.show();
    } catch (Exception ex) {
        System.out.println("Quick Entry Failed: "+ex.getMessage());
    }
}
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:18,代碼來源:CoreController.java

示例2: preferences

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@FXML
public void preferences(ActionEvent e) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/retrospector/fxml/preferences/Preferences.fxml"));
        Parent root = (Parent) fxmlLoader.load();
        Stage stage = new Stage();
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(stage, (Region) root);
        stage.setScene(undecoratorScene);
        PreferencesController qec = fxmlLoader.getController();
        stage.setTitle("Preferences");
        stage.show();
    } catch (Exception ex) {
        System.out.println("Preferences Failed: "+ex.getMessage());
    }
}
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:17,代碼來源:CoreController.java

示例3: getNewThemedDialogStage

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
public static Stage getNewThemedDialogStage() {
    Stage newStage = new Stage();
    Region root = new Region();
    final UndecoratorScene undecoratorScene = new UndecoratorScene(newStage, root);
    newStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
        @Override
        public void handle(WindowEvent we) {
            we.consume();   // Do not hide
            undecoratorScene.setFadeOutTransition();
        }
    });
    undecoratorScene.getStylesheets().add("/com/vanomaly/superd/view/application.css");
    newStage.setScene(undecoratorScene);
    newStage.sizeToScene();
    newStage.toFront();
    
    Undecorator undecorator = undecoratorScene.getUndecorator();
    
    newStage.setMinWidth(undecorator.getMinWidth());
    newStage.setMinHeight(undecorator.getMinHeight());
    return newStage;
}
 
開發者ID:SnakeDoc,項目名稱:superD,代碼行數:23,代碼來源:ThemedStageFactory.java

示例4: showMainStage

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
private void showMainStage(Parent root) {
        mainStage = new Stage();
//        mainStage = new Stage(StageStyle.UNDECORATED);
//        Scene scene = new Scene(root, 1300, 800);
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(mainStage, (Region) root);
        mainStage.setScene(undecoratorScene);
        mainStage.setTitle("Retrospector");
        mainStage.getIcons().add(new Image(Retrospector.class.getResourceAsStream( LOGO_IMAGE ))); 
        mainStage.show();
    }
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:12,代碼來源:Retrospector.java

示例5: start

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@Override
    public void start(Stage primaryStage) {
        
        WebView web = new WebView();
//        web.getEngine().load(getClass().getResource("web/materialtable.css").toExternalForm());
        String webContent = new PumpkinEater(
                "Search Cheatsheet",
                new String[]{
                    "Symbol",
                    "Name",
                    "Example",
                    "Explanation"
                },
                new String[]{":","and","lord:rings","contains 'lord' and 'rings'"},
                new String[]{"|","or","Marvel|DC","contains 'marvel' or 'dc'"},
                new String[]{"!","not","!rebecca black","contains no 'rebecca black'"},
                new String[]{"`","cmd","[See Below]","[See Below]"},
                new String[]{"`T","title","`T~civil war","title contains 'civil war'"},
                new String[]{"`C","creator","`C=BBC","creator equals 'bbc'"},
                new String[]{"`S","season","`S=1","season equals '1'"},
                new String[]{"`E","episode","`E~13","episode contains '13'"},
                new String[]{"`A","category","`A~Book","category contains 'book'"},
                new String[]{"`U","user","`U~Adam","reviewed by a user 'Adam'"},
                new String[]{"`D","date","`D>10-21-2017","reviewed after 21 Oct 2017"},
                new String[]{"`#","rating","`#>7","rated high than a 7"},
                new String[]{"Example","-->","batman|superman:`A=Movie:!vs","contains 'batman' or 'superman',<br>category equals 'movie' and<br>contains no 'vs'"},
                new String[]{"Example","-->","sherlock:doyle:baskervilles","contains 'sherlock',<br>contains 'doyle' and<br>contains 'baskervilles'"}
        ).getHtml();
        
        web.getEngine().loadContent(webContent);
        StackPane root = new StackPane(web);
        root.setPrefHeight(500);
        root.setPrefWidth(800);
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(primaryStage, (Region) root);
        primaryStage.setScene(undecoratorScene);
        primaryStage.setTitle("Search Cheatsheet");
        primaryStage.show();
    }
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:40,代碼來源:Cheatsheet.java

示例6: server

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@FXML
public void server(ActionEvent e) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/retrospector/fxml/server/ServerTab.fxml"));
        Parent root = (Parent) fxmlLoader.load();
        Stage stage = new Stage();
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(stage, (Region) root);
        stage.setScene(undecoratorScene);
        stage.setTitle("Server");
        stage.show();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }
}
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:16,代碼來源:CoreController.java

示例7: performanceTest

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@FXML
private void performanceTest(ActionEvent event) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/retrospector/fxml/dumpster/PerformanceTester.fxml"));
        Parent root = (Parent) fxmlLoader.load();
        Stage stage = new Stage();
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(stage, (Region) root);
        stage.setScene(undecoratorScene);
        stage.setTitle("Performance Test");
        stage.show();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }
}
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:16,代碼來源:CoreController.java

示例8: about

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@FXML
public void about(ActionEvent e) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/retrospector/fxml/about/About.fxml"));
        Parent root = (Parent) fxmlLoader.load();
        Stage stage = new Stage();
        UndecoratorScene.setClassicDecoration();
        UndecoratorScene undecoratorScene = new UndecoratorScene(stage, (Region) root);
        stage.setScene(undecoratorScene);
        stage.setTitle("About");
        stage.show();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }
}
 
開發者ID:NonlinearFruit,項目名稱:Retrospector,代碼行數:16,代碼來源:CoreController.java

示例9: start

import insidefx.undecorator.UndecoratorScene; //導入依賴的package包/類
@Override
public void start(final Stage primaryStage) {
    
    this.stage = primaryStage;
    
    Region root = null;
    try {
        
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/com/vanomaly/superd/view/MainWindow.fxml"));
        
        fxmlLoader.setController(MainWindowController.getInstance());
        
        root = (Region) fxmlLoader.load();
        
    } catch (Exception e) {
        
        e.printStackTrace();
        
    }
    
    final UndecoratorScene undecoratorScene = new UndecoratorScene(primaryStage, root);
    
    if (root != null) {
        Node node = root.lookup("#draggableNode");
        undecoratorScene.setAsStageDraggable(primaryStage, node);
    }
    undecoratorScene.setFadeInTransition();

    /*
     * Fade transition on window closing request
     */
    primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
        @Override
        public void handle(WindowEvent we) {
            we.consume();   // Do not hide
            undecoratorScene.setFadeOutTransition();
        }
    });
    undecoratorScene.getStylesheets().add("/com/vanomaly/superd/view/application.css");
    primaryStage.setScene(undecoratorScene);
    primaryStage.sizeToScene();
    primaryStage.toFront();
    
    Undecorator undecorator = undecoratorScene.getUndecorator();
        
    // set icons here
        
    // set title
        
    // set close request function
        
    // set resizable
    
    primaryStage.setMinWidth(undecorator.getMinWidth());
    primaryStage.setMinHeight(undecorator.getMinHeight());
    
    primaryStage.show();
    
}
 
開發者ID:SnakeDoc,項目名稱:superD,代碼行數:60,代碼來源:Main.java


注:本文中的insidefx.undecorator.UndecoratorScene類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。