javafx.application.Application.Parameters Java Examples

The following examples show how to use javafx.application.Application.Parameters. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DesignerParams.java    From pmd-designer with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Build from JavaFX parameters.
 */
public DesignerParams(Parameters params) {
    List<String> raw = params.getRaw();
    // error output is disabled by default
    if (raw.contains("-v") || raw.contains("--verbose")) {
        isDeveloperMode = true;
    }

    params.getNamed().forEach(
        (name, value) -> {
            switch (name) {
            case SETTINGS_INPUT:
                persistedInputFile = Paths.get(value);
                break;
            case SETTINGS_OUTPUT:
                persistedOutputFile = Paths.get(value);
                break;
            default:
                break;
            }
        }
    );

}
 
Example #2
Source File: MainManagerClient.java    From helloiot with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void construct(StackPane root, Parameters params) {
    this.root = root;
    
    boolean status = Boolean.parseBoolean(HelloPlatform.getInstance().getProperty("window.status", "false"));
    if (status) {
        try {                
            showApplication();      
        } catch (HelloIoTException ex) {
            MessageUtils.showException(MessageUtils.getRoot(root), resources.getString("exception.topicinfotitle"), ex, ev -> {
                showLogin();
            });
        }
    } else {
        showLogin();
    }
}
 
Example #3
Source File: SceneModule.java    From greenbeans with Apache License 2.0 5 votes vote down vote up
@Override
protected void configure() {
	bind(Parameters.class).toInstance(parameters);
	bind(MainScene.class).in(Scopes.SINGLETON);
	bind(WebApplicationRegion.class).in(Scopes.SINGLETON);
	bind(ServiceLocator.class).in(Scopes.SINGLETON);
}
 
Example #4
Source File: WebApplicationRegion.java    From greenbeans with Apache License 2.0 4 votes vote down vote up
@Inject
WebApplicationRegion(ServiceLocator serviceLocator, Parameters parameters, ConsoleBridge consoleBridge) {
	this.serviceLocator = checkNotNull(serviceLocator);
	this.parameters = checkNotNull(parameters);
	this.consoleBridge = checkNotNull(consoleBridge);
}
 
Example #5
Source File: Constants.java    From greenbeans with Apache License 2.0 4 votes vote down vote up
public static boolean isExternalUi(Parameters parameters) {
	return parameters.getUnnamed().contains(Constants.PARAM_EXTERNAL_UI);
}
 
Example #6
Source File: SceneModule.java    From greenbeans with Apache License 2.0 4 votes vote down vote up
public SceneModule(Parameters parameters) {
	this.parameters = checkNotNull(parameters);
}
 
Example #7
Source File: SceneModuleTest.java    From greenbeans with Apache License 2.0 4 votes vote down vote up
@Test
public void providesParameters() {
	Parameters params = assertSingletonBinding(createInjector(), Parameters.class);
	assertSame(parameters, params);
}
 
Example #8
Source File: MainManager.java    From helloiot with GNU General Public License v3.0 votes vote down vote up
public void construct(StackPane root, Parameters params);