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


Java PlatformImpl.runLater方法代码示例

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


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

示例1: createWindow

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
public void createWindow(Project project) {
    jFXPanel = new JFXPanel();
    ToolWindow toolWindow = ToolWindowManager.getInstance(project).registerToolWindow("Basis.js", false, ToolWindowAnchor.BOTTOM, false);
    toolWindow.setIcon(IconLoader.getIcon("/icons/basisjs.png"));
    ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
    Content content = contentFactory.createContent(jFXPanel, "inspector", false);
    toolWindow.getContentManager().addContent(content);

    InspectorController sceneInspectorController = new InspectorController();
    FXMLLoader fxmlLoader = new FXMLLoader();
    fxmlLoader.setLocation(getClass().getResource("/com/basisjs/ui/windows/tools/inspector/InspectorScene.fxml"));
    fxmlLoader.setController(sceneInspectorController);

    Platform.setImplicitExit(false);
    PlatformImpl.runLater(() -> {
        try {
            Scene scene = new Scene(fxmlLoader.load());
            jFXPanel.setScene(scene);
            webView = sceneInspectorController.webView;
            webView.setContextMenuEnabled(false);
        } catch (IOException e) {
            e.printStackTrace();
        }
    });
}
 
开发者ID:smelukov,项目名称:intellij-basisjs-plugin,代码行数:26,代码来源:InspectorWindow.java

示例2: showConfigurationWindow

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
/**
 * Method to show the {@link DualBuildWallConfigurationWindow}.
 */
public void showConfigurationWindow(){
   verifyState();
   PlatformImpl.runLater( () -> { 
      configurationWindowStage.show();
      configurationWindowStage.toFront();
   } );
}
 
开发者ID:DanGrew,项目名称:JttDesktop,代码行数:11,代码来源:PreferenceWindowController.java

示例3: hideAfter

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
/**
 * Hides the InfoPane after the given duration.
 *
 * @param duration the duration
 */
public InfoPaneConfigurer hideAfter(Duration duration) {
    PlatformImpl.runLater(() -> {
        try {
            InfoPane.getInstance().resetTimeline();
            InfoPane.getInstance().timeline = new Timeline(new KeyFrame(duration, e -> InfoPane.hide()));
            InfoPane.getInstance().timeline.play();
        } catch (NotAvailableException ex) {
            ExceptionPrinter.printHistory("Could not print user feedback!", ex, LOGGER);
        }
    });
    return this;
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:18,代码来源:InfoPane.java

示例4: backgroundColor

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
public InfoPaneConfigurer backgroundColor(Color color) {
    PlatformImpl.runLater(() -> {
        try {
            InfoPane.getInstance().setBackground(new Background(new BackgroundFill(color, CornerRadii.EMPTY, Insets.EMPTY)));
        } catch (NotAvailableException ex) {
            ExceptionPrinter.printHistory("Could not print user feedback!", ex, LOGGER);
        }
    });

    return this;
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:12,代码来源:InfoPane.java

示例5: run

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override public void run( Runnable runnable ) {
   PlatformImpl.runLater( runnable );
}
 
开发者ID:DanGrew,项目名称:JttDesktop,代码行数:7,代码来源:PlatformDecouplerImpl.java

示例6: hideConfigurationWindow

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
/**
 * Method to hide the {@link DualBuildWallConfigurationWindow}.
 */
public void hideConfigurationWindow(){
   verifyState();
   PlatformImpl.runLater( () -> configurationWindowStage.hide() );
}
 
开发者ID:DanGrew,项目名称:JttDesktop,代码行数:8,代码来源:PreferenceWindowController.java

示例7: manual

import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
@Ignore
@Test public void manual() throws InterruptedException {
   TestApplication.launch( () -> {
      FailureDetail detail = new FailureDetail( jenkinsJob, new BuildWallConfigurationImpl() );
      detail.setBackground( new Background( new BackgroundFill( Color.BLACK, null, null ) ) );
      return detail;
   } );
   
   Thread.sleep( 2000 );
   PlatformImpl.runLater( () -> {
      jenkinsJob.testFailureCount().set( 10 );
      jenkinsJob.testTotalCount().set( 1001 );
      jenkinsJob.commits().remove( 1 );
      jenkinsJob.failingTestCases().clear();
   } );
   
   Thread.sleep( 2000 );
   PlatformImpl.runLater( () -> {
      jenkinsJob.testFailureCount().set( 11 );
      jenkinsJob.testTotalCount().set( 23001 );
      jenkinsJob.commits().addAll( 
               makeCommitFor( new JenkinsUserImpl( "Maggie" ) ), 
               makeCommitFor( new JenkinsUserImpl( "Carol" ) )
      );
      jenkinsJob.failingTestCases().addAll( survivalTestCase, zombieKillingTestCase, spoilerTestCase, cliffHangerTestCase );
   } );
   
   Thread.sleep( 2000 );
   PlatformImpl.runLater( () -> {
      jenkinsJob.commits().addAll( 
               makeCommitFor( new JenkinsUserImpl( "Glenn" ) ), 
               makeCommitFor( new JenkinsUserImpl( "Michonne" ) )
      );
   } );
   
   Thread.sleep( 2000 );
   PlatformImpl.runLater( () -> {
      jenkinsJob.testFailureCount().set( 999 );
      jenkinsJob.testTotalCount().set( 1000 );
      jenkinsJob.commits().remove( 4 );
   } );
   
   Thread.sleep( 100000 );
}
 
开发者ID:DanGrew,项目名称:JttDesktop,代码行数:45,代码来源:FailureDetailTest.java


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