org.fxmisc.richtext.demo.ExecutorHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of richtextfx Show documentation
Show all versions of richtextfx Show documentation
FX-Text-Area for formatted text and other special effects.
package org.fxmisc.richtext.demo;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Name: ExecutorHelper
* Description: .
*
* Comment: ...
*
* Copyright: Copyright (c) 2018, 2019
* Company: >StA-Soft<
* @author StA
* @version 1.0
*/
public class ExecutorHelper
{
/**
* Executor-Service.
*/
private static ExecutorService executor;
/**
* Get Executor-Service.
* @return Executor-Service
*/
public static synchronized ExecutorService getExecutor()
{
if (executor == null)
{
executor = Executors.newSingleThreadExecutor();
}
return executor;
}
/**
* Stop Executor-Service.
*/
public static synchronized void stopExecutor()
{
if (executor != null)
{
executor.shutdown();
executor = null;
}
}
/**
* Dummy-Constructor.
*/
protected ExecutorHelper()
{
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy