public class TesseractVersionRetriever extends Thread implements PreferenceComponentManager, WindowListener
PreferenceComponentManager
interface so that it can be
used to update a message pane displayed in the preferences or in a parameter
list.T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static String |
START_HTML |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
TesseractVersionRetriever(JEditorPane component,
int delayMs) |
Modifier and Type | Method and Description |
---|---|
void |
componentCreated(Preference p,
Object component,
Object container)
Called when the preference GUI component gets created.
|
static String |
getTesseractVersion(boolean forceCheck)
Get the Tesseract version string as it is printed out by the engine when
called with the
-v CLI option, such as for example "3.00" or
"3.02-02". |
void |
goingToLoad(Preference p,
Object component,
Object container,
Object configuration)
Called when the component is about to be loaded with the preference
value.
|
void |
run() |
void |
savePerformed(Preference p,
Object component,
Object container,
Object configuration)
Called after the preference value is retrieved from the component and
saved back to the configuration object.
|
void |
windowActivated(WindowEvent e) |
void |
windowClosed(WindowEvent e) |
void |
windowClosing(WindowEvent e) |
void |
windowDeactivated(WindowEvent e) |
void |
windowDeiconified(WindowEvent e) |
void |
windowIconified(WindowEvent e) |
void |
windowOpened(WindowEvent e) |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final String START_HTML
public TesseractVersionRetriever(JEditorPane component, int delayMs)
public void componentCreated(Preference p, Object component, Object container)
PreferenceComponentManager
componentCreated
in interface PreferenceComponentManager
p
- the preference.component
- the GUI component which will be used to display and edit
the preference value.container
- the preference container.public void goingToLoad(Preference p, Object component, Object container, Object configuration)
PreferenceComponentManager
goingToLoad
in interface PreferenceComponentManager
p
- the preference.component
- the GUI component which will be used to display and edit
the preference value.container
- the preference container.configuration
- the configuration (map of params and values) which
contains the preference value.public void savePerformed(Preference p, Object component, Object container, Object configuration)
PreferenceComponentManager
savePerformed
in interface PreferenceComponentManager
p
- the preference.component
- the GUI component which will be used to display and edit
the preference value.container
- the preference container.configuration
- the configuration (map of params and values) which
contains the preference value.public static String getTesseractVersion(boolean forceCheck)
-v
CLI option, such as for example "3.00" or
"3.02-02". The path to Tesseract is defined through the preferences.forceCheck
- when set to false the class will return the cached
result (if available) instead of calling the engine.public void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
public void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
public void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
public void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
public void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener