本文整理汇总了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();
}
});
}
示例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();
} );
}
示例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;
}
示例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;
}
示例5: run
import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override public void run( Runnable runnable ) {
PlatformImpl.runLater( runnable );
}
示例6: hideConfigurationWindow
import com.sun.javafx.application.PlatformImpl; //导入方法依赖的package包/类
/**
* Method to hide the {@link DualBuildWallConfigurationWindow}.
*/
public void hideConfigurationWindow(){
verifyState();
PlatformImpl.runLater( () -> configurationWindowStage.hide() );
}
示例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 );
}