public class Configuration extends Object
Modifier and Type | Field and Description |
---|---|
static short |
UNDERLINE_BOLD |
static short |
UNDERLINE_BOLDWAVE |
static short |
UNDERLINE_DASH |
static short |
UNDERLINE_WAVE |
Constructor and Description |
---|
Configuration(File baseDir,
Language lang) |
Configuration(File baseDir,
String filename,
File oldConfigFile,
Language lang,
boolean isOffice) |
Configuration(File baseDir,
String filename,
Language lang) |
Configuration(Language lang)
Uses the configuration file from the default location.
|
Modifier and Type | Method and Description |
---|---|
void |
addDisabledRuleIds(Set<String> ruleIds) |
void |
addProfile(String profile)
add a new profile
|
void |
addProfiles(List<String> profiles)
add a list of profiles
|
boolean |
doRemoteCheck() |
void |
exportProfile(String profile,
File exportFile) |
boolean |
getAutoDetect() |
int |
getConfigurableValue(String ruleID)
Get the configurable value of a rule by ruleID
returns -1 if no value is set by configuration
|
Map<String,Integer> |
getConfigurableValues()
returns all configured values
|
String |
getCurrentProfile()
get the current profile
|
Language |
getDefaultLanguage() |
List<String> |
getDefinedProfiles()
get the current profile
|
Set<String> |
getDisabledCategoryNames() |
Set<String> |
getDisabledRuleIds() |
Set<String> |
getEnabledCategoryNames() |
Set<String> |
getEnabledRuleIds() |
boolean |
getEnabledRulesOnly() |
Map<ITSIssueType,Color> |
getErrorColors() |
String |
getExternalRuleDirectory() |
Language |
getFixedLanguage() |
String |
getFontName()
Returns the name of the GUI's editing textarea font.
|
int |
getFontSize()
Returns the size of the GUI's editing textarea font.
|
int |
getFontStyle()
Returns the style of the GUI's editing textarea font.
|
Language |
getLanguage() |
String |
getlogLevel() |
String |
getLookAndFeelName()
Returns the name of the GUI's LaF.
|
Language |
getMotherTongue() |
File |
getNgramDirectory()
Directory with ngram data or null.
|
int |
getNumParasToCheck()
get the number of paragraphs to be checked for TextLevelRules
|
String |
getRemoteApiKey() |
String |
getRemoteUsername() |
boolean |
getRunServer() |
int |
getServerPort() |
String |
getServerUrl() |
Set<String> |
getSpecialTabCategories(String tabName) |
String[] |
getSpecialTabNames() |
boolean |
getTaggerShowsDisambigLog()
Determines whether the tagger window will also print the disambiguation
log.
|
Color |
getUnderlineColor(String category,
String ruleId) |
Map<String,Color> |
getUnderlineColors() |
Map<String,Color> |
getUnderlineRuleColors() |
Map<String,Short> |
getUnderlineRuleTypes() |
Short |
getUnderlineType(String category,
String ruleId) |
Map<String,Short> |
getUnderlineTypes() |
boolean |
getUseDocLanguage() |
boolean |
getUseGUIConfig() |
void |
importProfile(File importFile) |
void |
initOptions()
Initialize variables and clears Maps, Sets and Lists
|
void |
initStyleCategories(List<Rule> allRules) |
boolean |
isInSpecialTab(String category,
String tabName) |
boolean |
isMultiThread()
shall LO run in multi thread mode
|
boolean |
isPremium() |
boolean |
isResetCheck()
will all paragraphs check after every change of text?
|
boolean |
isSpecialTabCategory(String category) |
boolean |
isStyleCategory(String category) |
boolean |
isValidServerUrl(String url)
Test if http-server URL is correct
|
void |
loadConfiguration(String profile) |
boolean |
markSingleCharBold() |
boolean |
noBackgroundCheck()
return true if background check is switched of
(no marks inside of document)
|
boolean |
noSynonymsAsSuggestions() |
boolean |
onlySingleParagraphMode()
only single paragraph mode can be used (for OO and old LO
|
void |
removeDisabledRuleId(String ruleId) |
void |
removeDisabledRuleIds(Set<String> ruleIds) |
void |
removeEnabledRuleId(String ruleId) |
void |
removeProfile(String profile)
remove an existing profile
|
void |
saveConfiguration(Language lang) |
boolean |
saveLoCache() |
void |
saveNoBackgroundCheck(boolean noBackgroundCheck,
Language lang)
set option to switch off background check
and save configuration
|
void |
setAutoDetect(boolean autoDetect) |
void |
setConfigFile(File configFile) |
void |
setConfigurableValue(String ruleID,
int value)
Set the value for a rule with ruleID
|
void |
setCurrentProfile(String profile)
set the current profile
|
void |
setDefaultUnderlineColor(String category) |
void |
setDefaultUnderlineRuleColor(String ruleId) |
void |
setDefaultUnderlineRuleType(String ruleID) |
void |
setDefaultUnderlineType(String category) |
void |
setDisabledCategoryNames(Set<String> categoryNames) |
void |
setDisabledRuleIds(Set<String> ruleIds) |
void |
setDoResetCheck(boolean resetCheck)
set all paragraphs to be checked after every change of text
|
void |
setEnabledCategoryNames(Set<String> categoryNames) |
void |
setEnabledRuleIds(Set<String> ruleIds) |
void |
setExternalRuleDirectory(String path) |
void |
setFixedLanguage(Language fixedLanguage) |
void |
setFontName(String fontName)
Sets the name of the GUI's editing textarea font.
|
void |
setFontSize(int fontSize)
Sets the size of the GUI's editing textarea font.
|
void |
setFontStyle(int fontStyle)
Sets the style of the GUI's editing textarea font.
|
void |
setLanguage(Language language) |
void |
setLookAndFeelName(String lookAndFeelName)
Sets the name of the GUI's LaF.
|
void |
setMarkSingleCharBold(boolean markSingleCharBold) |
void |
setMotherTongue(Language motherTongue) |
void |
setMultiThreadLO(boolean isMultiThread)
run LO in multi thread mode
|
void |
setNgramDirectory(File dir)
Sets the directory with ngram data (may be null).
|
void |
setNoBackgroundCheck(boolean noBackgroundCheck)
set option to switch off background check
if true: LT engine is switched of (no marks inside of document)
|
void |
setNoSynonymsAsSuggestions(boolean noSynonymsAsSuggestions) |
void |
setNumParasToCheck(int numParas)
set the number of paragraphs to be checked for TextLevelRules
|
void |
setOtherServerUrl(String otherServerUrl) |
void |
setPremium(boolean isPremium) |
void |
setRemoteApiKey(String remoteApiKey) |
void |
setRemoteCheck(boolean doRemoteCheck) |
void |
setRemoteUsername(String remoteUsername) |
void |
setRunServer(boolean runServer) |
void |
setSaveLoCache(boolean saveLoCache) |
void |
setServerPort(int serverPort) |
void |
setTaggerShowsDisambigLog(boolean taggerShowsDisambigLog)
Enables or disables the disambiguation log on the tagger window,
depending on the value of the parameter taggerShowsDisambigLog.
|
void |
setUnderlineColor(String category,
Color col) |
void |
setUnderlineRuleColor(String ruleId,
Color col) |
void |
setUnderlineRuleType(String ruleID,
short type) |
void |
setUnderlineType(String category,
short type) |
void |
setUseDocLanguage(boolean useDocLang) |
void |
setUseGUIConfig(boolean useGUIConfig) |
void |
setUseLtDictionary(boolean useLtDictionary) |
void |
setUseOtherServer(boolean useOtherServer) |
void |
setUseTextLevelQueue(boolean useTextLevelQueue)
set all paragraphs to be not checked after every change of text
if more than one document loaded?
|
boolean |
useLtDictionary() |
boolean |
useOtherServer() |
boolean |
useTextLevelQueue()
will all paragraphs not checked after every change of text
if more than one document loaded?
|
public static final short UNDERLINE_WAVE
public static final short UNDERLINE_BOLDWAVE
public static final short UNDERLINE_BOLD
public static final short UNDERLINE_DASH
public Configuration(Language lang) throws IOException
lang
- The language for the configuration, used to distinguish
rules that are enabled or disabled per language.IOException
public Configuration(File baseDir, Language lang) throws IOException
IOException
public Configuration(File baseDir, String filename, Language lang) throws IOException
IOException
public Configuration(File baseDir, String filename, File oldConfigFile, Language lang, boolean isOffice) throws IOException
IOException
public void initOptions()
public void setConfigFile(File configFile)
public void removeDisabledRuleId(String ruleId)
public void removeEnabledRuleId(String ruleId)
public boolean getEnabledRulesOnly()
public Language getLanguage()
public void setLanguage(Language language)
public Language getMotherTongue()
public void setMotherTongue(Language motherTongue)
public Language getFixedLanguage()
public void setFixedLanguage(Language fixedLanguage)
public Language getDefaultLanguage()
public void setUseDocLanguage(boolean useDocLang)
public boolean getUseDocLanguage()
public boolean getAutoDetect()
public void setAutoDetect(boolean autoDetect)
public void setRemoteCheck(boolean doRemoteCheck)
public boolean doRemoteCheck()
public void setUseOtherServer(boolean useOtherServer)
public boolean useOtherServer()
public void setPremium(boolean isPremium)
public boolean isPremium()
public void setOtherServerUrl(String otherServerUrl)
public String getServerUrl()
public void setRemoteUsername(String remoteUsername)
public String getRemoteUsername()
public void setRemoteApiKey(String remoteApiKey)
public String getRemoteApiKey()
public String getlogLevel()
public void setMarkSingleCharBold(boolean markSingleCharBold)
public boolean markSingleCharBold()
public void setUseLtDictionary(boolean useLtDictionary)
public boolean useLtDictionary()
public void setNoSynonymsAsSuggestions(boolean noSynonymsAsSuggestions)
public boolean noSynonymsAsSuggestions()
public void setSaveLoCache(boolean saveLoCache)
public boolean saveLoCache()
public boolean getTaggerShowsDisambigLog()
public void setTaggerShowsDisambigLog(boolean taggerShowsDisambigLog)
taggerShowsDisambigLog
- If true, the tagger window will print thepublic boolean getRunServer()
public void setRunServer(boolean runServer)
public int getServerPort()
public void setUseGUIConfig(boolean useGUIConfig)
public boolean getUseGUIConfig()
public void setServerPort(int serverPort)
public String getExternalRuleDirectory()
public void setExternalRuleDirectory(String path)
public int getNumParasToCheck()
public void setNumParasToCheck(int numParas)
public boolean isResetCheck()
public void setDoResetCheck(boolean resetCheck)
public boolean useTextLevelQueue()
public void setUseTextLevelQueue(boolean useTextLevelQueue)
public void setNoBackgroundCheck(boolean noBackgroundCheck)
public void saveNoBackgroundCheck(boolean noBackgroundCheck, Language lang) throws IOException
IOException
public boolean noBackgroundCheck()
public String getCurrentProfile()
public void setCurrentProfile(String profile)
public void addProfile(String profile)
public void removeProfile(String profile)
public void setMultiThreadLO(boolean isMultiThread)
public boolean isMultiThread()
public String getFontName()
Font.getFamily()
public void setFontName(String fontName)
fontName
- the name of the font.Font.getFamily()
public int getFontStyle()
Font.getStyle()
public void setFontStyle(int fontStyle)
fontStyle
- the style of the font.Font.getStyle()
public int getFontSize()
Font.getSize()
public void setFontSize(int fontSize)
fontSize
- the size of the font.Font.getSize()
public String getLookAndFeelName()
UIManager.LookAndFeelInfo.getName()
public void setLookAndFeelName(String lookAndFeelName)
lookAndFeelName
- the name of the LaF.UIManager.LookAndFeelInfo.getName()
@Nullable public File getNgramDirectory()
public void setNgramDirectory(File dir)
public Map<ITSIssueType,Color> getErrorColors()
public boolean isStyleCategory(String category)
public void initStyleCategories(List<Rule> allRules)
public boolean isSpecialTabCategory(String category)
public boolean isInSpecialTab(String category, String tabName)
public String[] getSpecialTabNames()
public Set<String> getSpecialTabCategories(String tabName)
public Color getUnderlineColor(String category, String ruleId)
public void setUnderlineColor(String category, Color col)
public void setUnderlineRuleColor(String ruleId, Color col)
public void setDefaultUnderlineColor(String category)
public void setDefaultUnderlineRuleColor(String ruleId)
public Short getUnderlineType(String category, String ruleId)
public void setUnderlineType(String category, short type)
public void setUnderlineRuleType(String ruleID, short type)
public void setDefaultUnderlineType(String category)
public void setDefaultUnderlineRuleType(String ruleID)
public Map<String,Integer> getConfigurableValues()
public int getConfigurableValue(String ruleID)
public void setConfigurableValue(String ruleID, int value)
public boolean onlySingleParagraphMode()
public boolean isValidServerUrl(String url)
public void loadConfiguration(String profile) throws IOException
IOException
public void saveConfiguration(Language lang) throws IOException
IOException
public void importProfile(File importFile) throws IOException
IOException
public void exportProfile(String profile, File exportFile) throws IOException
IOException