Class DesignerRootImpl
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.app.DesignerRootImpl
-
- All Implemented Interfaces:
DesignerRoot
public final class DesignerRootImpl extends java.lang.Object implements DesignerRoot
Interface for the singleton of the app.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Field Summary
-
Fields inherited from interface net.sourceforge.pmd.util.fxdesigner.app.DesignerRoot
APP_GLOBAL_LANGUAGE, AST_MANAGER, DISK_MANAGER, HOST_SERVICES, IS_NODE_BEING_DRAGGED, LATEST_XPATH, LOGGER, NODE_SELECTION_CHANNEL, PERSISTENCE_MANAGER, RICH_TEXT_MAPPER, TEST_CREATOR, TEST_LOADER, TREE_EXPORT_WIZARD, TREE_RENDERER_REGISTRY
-
-
Constructor Summary
Constructors Constructor Description DesignerRootImpl(javafx.stage.Stage mainStage, DesignerParams params, javafx.application.HostServices hostServices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.stage.Stage
getMainStage()
Gets the main stage of the application.<T> T
getService(AppServiceDescriptor<T> descriptor)
Gets the instance of a service shared by the app.org.reactfx.value.Val<java.lang.Boolean>
isCtrlDownProperty()
Returns true if the ctrl key is being pressed.boolean
isDeveloperMode()
If true, some more events are pushed to the event log, and console streams are open.<T> void
registerService(AppServiceDescriptor<T> descriptor, T component)
Register a service for the given descriptor.void
shutdownServices()
Shutdown all registered service components that implementCloseableService
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.util.fxdesigner.app.DesignerRoot
spawnScope
-
-
-
-
Constructor Detail
-
DesignerRootImpl
public DesignerRootImpl(javafx.stage.Stage mainStage, DesignerParams params, javafx.application.HostServices hostServices)
-
-
Method Detail
-
getMainStage
public javafx.stage.Stage getMainStage()
Description copied from interface:DesignerRoot
Gets the main stage of the application.- Specified by:
getMainStage
in interfaceDesignerRoot
- Returns:
- The main stage
-
isDeveloperMode
public boolean isDeveloperMode()
Description copied from interface:DesignerRoot
If true, some more events are pushed to the event log, and console streams are open. This is enabled by the -v or --verbose option on command line for now.- Specified by:
isDeveloperMode
in interfaceDesignerRoot
-
getService
public <T> T getService(AppServiceDescriptor<T> descriptor)
Description copied from interface:DesignerRoot
Gets the instance of a service shared by the app.- Specified by:
getService
in interfaceDesignerRoot
- Parameters:
descriptor
- Service descriptor
-
registerService
public <T> void registerService(AppServiceDescriptor<T> descriptor, T component)
Description copied from interface:DesignerRoot
Register a service for the given descriptor.- Specified by:
registerService
in interfaceDesignerRoot
-
isCtrlDownProperty
public org.reactfx.value.Val<java.lang.Boolean> isCtrlDownProperty()
Description copied from interface:DesignerRoot
Returns true if the ctrl key is being pressed. Vetoed by any other key press.- Specified by:
isCtrlDownProperty
in interfaceDesignerRoot
-
shutdownServices
public void shutdownServices()
Description copied from interface:DesignerRoot
Shutdown all registered service components that implementCloseableService
. Called when the app exits.- Specified by:
shutdownServices
in interfaceDesignerRoot
-
-