Package com.inet.jortho
Class SpellCheckerOptions
- java.lang.Object
-
- com.inet.jortho.SpellCheckerOptions
-
public class SpellCheckerOptions extends java.lang.Object
This class contains some options for spell checking. You can change it globally(see (SpellChecker.getOptions()
) or for every JTextComponent individually on registering.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
caseSensitive
private boolean
ignoreAllCaps
private boolean
ignoreCapitalization
private boolean
ignoreNumbers
private boolean
languageDisableVisible
private int
suggestionsLimitDialog
private int
suggestionsLimitMenu
-
Constructor Summary
Constructors Constructor Description SpellCheckerOptions()
Create SpellCheckerOptions with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getIgnoreCapitalization()
Return whether capitalized words should be correct if the word is in the dictionary as lower-case.int
getSuggestionsLimitDialog()
Get the maximun count of enties for the suggestion list in the spell checker dialog.int
getSuggestionsLimitMenu()
Get the maximum count of entries for the suggestion menu.boolean
isCaseSensitive()
Return whether the spell checker is case-sensitive.boolean
isIgnoreAllCapsWords()
Whether words entirely in upper-case should be ignored for spell checking.boolean
isIgnoreWordsWithNumbers()
Whether words that include a number in any position should be ignored for spell checking.boolean
isLanguageDisableVisible()
If in the language menu the menu item disable visible.void
setCaseSensitive(boolean caseSensitive)
Set whether the spell checker is case-sensitive.void
setIgnoreAllCapsWords(boolean ignore)
Set if words that are entirely in uppercase should be ignored for spell checking.void
setIgnoreCapitalization(boolean ignore)
Set whether capitalized words should be correct if the word is in the dictionary as lower-case.void
setIgnoreWordsWithNumbers(boolean ignore)
Set if words that include a number in any position should be ignored for spell checking.void
setLanguageDisableVisible(boolean visible)
Set if the disbale menu item visble in the language menu.void
setSuggestionsLimitDialog(int count)
Set the maximun count of entries for the suggestion list in the spell checker dialog.void
setSuggestionsLimitMenu(int count)
Set the maximun count of entries for the suggestion menu.
-
-
-
Field Detail
-
suggestionsLimitMenu
private int suggestionsLimitMenu
-
suggestionsLimitDialog
private int suggestionsLimitDialog
-
caseSensitive
private boolean caseSensitive
-
ignoreCapitalization
private boolean ignoreCapitalization
-
ignoreAllCaps
private boolean ignoreAllCaps
-
ignoreNumbers
private boolean ignoreNumbers
-
languageDisableVisible
private boolean languageDisableVisible
-
-
Method Detail
-
setSuggestionsLimitMenu
public void setSuggestionsLimitMenu(int count)
Set the maximun count of entries for the suggestion menu. The default is 15.- Parameters:
count
- the suggestion limit for the suggestion menu
-
getSuggestionsLimitMenu
public int getSuggestionsLimitMenu()
Get the maximum count of entries for the suggestion menu.- Returns:
- the suggestion limit
-
setSuggestionsLimitDialog
public void setSuggestionsLimitDialog(int count)
Set the maximun count of entries for the suggestion list in the spell checker dialog. The default is 15.- Parameters:
count
- the suggestion limit for the spell checker dialog
-
getSuggestionsLimitDialog
public int getSuggestionsLimitDialog()
Get the maximun count of enties for the suggestion list in the spell checker dialog.- Returns:
- the suggestions limit
-
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)
Set whether the spell checker is case-sensitive. This only has an effect on the first letter of a word. The default value is true.- Parameters:
caseSensitive
- whether the spell checker is to be case-sensitive for the first letter of each word.
-
isCaseSensitive
public boolean isCaseSensitive()
Return whether the spell checker is case-sensitive. This only has an effect on the first letter of a word.- Returns:
- whether the spell checker is case-sensitive.
-
setIgnoreCapitalization
public void setIgnoreCapitalization(boolean ignore)
Set whether capitalized words should be correct if the word is in the dictionary as lower-case. This is often used in a title or in names. The first word of a sentence will always ignore the capitalization. The default is false.- Parameters:
ignore
- the new value
-
getIgnoreCapitalization
public boolean getIgnoreCapitalization()
Return whether capitalized words should be correct if the word is in the dictionary as lower-case.- Returns:
- true, if capitalization is to be ignored
-
setIgnoreAllCapsWords
public void setIgnoreAllCapsWords(boolean ignore)
Set if words that are entirely in uppercase should be ignored for spell checking. This is most often used for abbreviations such DNS or HTTP. The default value is true.- Parameters:
ignore
- the new value
-
isIgnoreAllCapsWords
public boolean isIgnoreAllCapsWords()
Whether words entirely in upper-case should be ignored for spell checking.- Returns:
- true, if all entirely upper-case words are to be ignored
-
setIgnoreWordsWithNumbers
public void setIgnoreWordsWithNumbers(boolean ignore)
Set if words that include a number in any position should be ignored for spell checking. The default is false.- Parameters:
ignore
- the new value
-
isIgnoreWordsWithNumbers
public boolean isIgnoreWordsWithNumbers()
Whether words that include a number in any position should be ignored for spell checking.- Returns:
- true, if words with numbers in any position are to be ignored
-
setLanguageDisableVisible
public void setLanguageDisableVisible(boolean visible)
Set if the disbale menu item visble in the language menu. The default is false.- Parameters:
visible
- the new value
-
isLanguageDisableVisible
public boolean isLanguageDisableVisible()
If in the language menu the menu item disable visible.- Returns:
- true, if visible
-
-