Package com.inet.jortho
Class SpellCheckerOptions
- java.lang.Object
-
- com.inet.jortho.SpellCheckerOptions
-
public class SpellCheckerOptions extends java.lang.ObjectThis 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 booleancaseSensitiveprivate booleanignoreAllCapsprivate booleanignoreCapitalizationprivate booleanignoreNumbersprivate booleanlanguageDisableVisibleprivate intsuggestionsLimitDialogprivate intsuggestionsLimitMenu
-
Constructor Summary
Constructors Constructor Description SpellCheckerOptions()Create SpellCheckerOptions with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetIgnoreCapitalization()Return whether capitalized words should be correct if the word is in the dictionary as lower-case.intgetSuggestionsLimitDialog()Get the maximun count of enties for the suggestion list in the spell checker dialog.intgetSuggestionsLimitMenu()Get the maximum count of entries for the suggestion menu.booleanisCaseSensitive()Return whether the spell checker is case-sensitive.booleanisIgnoreAllCapsWords()Whether words entirely in upper-case should be ignored for spell checking.booleanisIgnoreWordsWithNumbers()Whether words that include a number in any position should be ignored for spell checking.booleanisLanguageDisableVisible()If in the language menu the menu item disable visible.voidsetCaseSensitive(boolean caseSensitive)Set whether the spell checker is case-sensitive.voidsetIgnoreAllCapsWords(boolean ignore)Set if words that are entirely in uppercase should be ignored for spell checking.voidsetIgnoreCapitalization(boolean ignore)Set whether capitalized words should be correct if the word is in the dictionary as lower-case.voidsetIgnoreWordsWithNumbers(boolean ignore)Set if words that include a number in any position should be ignored for spell checking.voidsetLanguageDisableVisible(boolean visible)Set if the disbale menu item visble in the language menu.voidsetSuggestionsLimitDialog(int count)Set the maximun count of entries for the suggestion list in the spell checker dialog.voidsetSuggestionsLimitMenu(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
-
-