Class ScriptStylerProvider
java.lang.Object
qupath.lib.gui.scripting.richtextfx.stylers.ScriptStylerProvider
Class with static methods to fetch all the available
ScriptStyler
s.- Since:
- v0.4.0
- Author:
- Melvin Gelbard
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ScriptStyler
Styler for Groovystatic final ScriptStyler
Styler for Javastatic final ScriptStyler
Styler for JSONstatic final ScriptStyler
Styler for markdownstatic final ScriptStyler
Plain styler (no highlighting)static final ScriptStyler
Styler for Java properties filesstatic final ScriptStyler
Styler for Pythonstatic final ScriptStyler
Styler for XMLstatic final ScriptStyler
Styler for YAML -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.fxmisc.richtext.model.StyleSpans
<Collection<String>> getLogStyling
(String text) Get styling for use with a logger.static org.fxmisc.richtext.model.StyleSpans
<Collection<String>> getPlainStyling
(String text) Get simple styling that does not apply any classes.static ScriptStyler
getStylerFromLanguage
(ScriptLanguage language) Get theScriptStyler
object corresponding to the specifiedScriptLanguage
.
-
Field Details
-
PLAIN
Plain styler (no highlighting) -
MARKDOWN
Styler for markdown -
GROOVY
Styler for Groovy -
JAVA
Styler for Java -
JSON
Styler for JSON -
PROPERTIES
Styler for Java properties files -
PYTHON
Styler for Python -
XML
Styler for XML -
YAML
Styler for YAML
-
-
Constructor Details
-
ScriptStylerProvider
public ScriptStylerProvider()
-
-
Method Details
-
getStylerFromLanguage
Get theScriptStyler
object corresponding to the specifiedScriptLanguage
. If the language cannot be matched,PlainStyler
is returned.- Parameters:
language
-- Returns:
- corresponding stylers, or
PlainStyler
if no match.
-
getPlainStyling
Get simple styling that does not apply any classes.- Parameters:
text
- the text to process styling for- Returns:
-
getLogStyling
Get styling for use with a logger.- Parameters:
text
- the text to process styling for- Returns:
-