Package org.omegat.gui.editor
Class EditorSettings
- java.lang.Object
-
- org.omegat.gui.editor.EditorSettings
-
- All Implemented Interfaces:
IEditorSettings
public class EditorSettings extends java.lang.Object implements IEditorSettings
Editor behavior control settings.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDISPLAY_MODIFICATION_INFO_ALLstatic java.lang.StringDISPLAY_MODIFICATION_INFO_NONEstatic java.lang.StringDISPLAY_MODIFICATION_INFO_SELECTED
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description chargetAdvancerChar()javax.swing.text.AttributeSetgetAttributeSet(boolean isSource, boolean isPlaceholder, boolean isRemoveText, SourceTextEntry.DUPLICATE duplicate, boolean active, boolean translationExists, boolean hasNote, boolean isNBSP)Choose segment's attributes based on rules.java.lang.StringgetDisplayModificationInfo()returns the setting for display the modification information or not Either DISPLAY_MODIFICATION_INFO_NONE, DISPLAY_MODIFICATION_INFO_SELECTED, DISPLAY_MODIFICATION_INFO_ALLjavax.swing.text.AttributeSetgetModificationInfoAttributeSet()Returns font attributes for the modification info line.javax.swing.text.AttributeSetgetOtherLanguageTranslationAttributeSet()Returns font attributes for other languages translation.javax.swing.text.AttributeSetgetParagraphStartAttributeSet()Returns font attributes for paragraph startjavax.swing.text.AttributeSetgetSegmentMarkerAttributeSet()Returns font attributes for the segment marker.booleanisAutoSpellChecking()need to check spell or notbooleanisDisplaySegmentSources()display the segment sources or notbooleanisDoFontFallback()booleanisHideDuplicateSegments()booleanisMarkAutoPopulated()booleanisMarkBidi()mark Bidirectional control charactersbooleanisMarkGlossaryMatches()booleanisMarkLanguageChecker()booleanisMarkNBSP()mark non-breakable spaces?booleanisMarkNonUniqueSegments()booleanisMarkNotedSegments()booleanisMarkParagraphDelimitations()booleanisMarkTranslated()booleanisMarkUntranslated()booleanisMarkWhitespace()mark whitespace?booleanisUseTabForAdvance()voidsetAutoSpellChecking(boolean autoSpellChecking)voidsetDisplayModificationInfo(java.lang.String displayModificationInfo)Sets the setting for display the modification information or notvoidsetDisplaySegmentSources(boolean displaySegmentSources)voidsetDoFontFallback(boolean doFontFalback)voidsetMarkAutoPopulated(boolean val)voidsetMarkBidi(boolean markBidi)voidsetMarkGlossaryMatches(boolean markGlossaryMatches)voidsetMarkLanguageChecker(boolean markLanguageChecker)voidsetMarkNBSP(boolean markNBSP)voidsetMarkNonUniqueSegments(boolean markNonUniqueSegments)voidsetMarkNotedSegments(boolean markNotedSegments)voidsetMarkParagraphDelimitations(boolean delimitations)voidsetMarkTranslated(boolean markTranslated)voidsetMarkUntranslated(boolean markUntranslated)voidsetMarkWhitespace(boolean markWhitespace)voidsetUseTabForAdvance(boolean useTabForAdvance)voidupdateTagValidationPreferences()repaint segments in editor according to new view tag validation options.voidupdateViewPreferences()repaint segments in editor according to new view options.
-
-
-
Field Detail
-
DISPLAY_MODIFICATION_INFO_NONE
public static final java.lang.String DISPLAY_MODIFICATION_INFO_NONE
- See Also:
- Constant Field Values
-
DISPLAY_MODIFICATION_INFO_SELECTED
public static final java.lang.String DISPLAY_MODIFICATION_INFO_SELECTED
- See Also:
- Constant Field Values
-
DISPLAY_MODIFICATION_INFO_ALL
public static final java.lang.String DISPLAY_MODIFICATION_INFO_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAdvancerChar
public char getAdvancerChar()
-
isUseTabForAdvance
public boolean isUseTabForAdvance()
- Specified by:
isUseTabForAdvancein interfaceIEditorSettings
-
setUseTabForAdvance
public void setUseTabForAdvance(boolean useTabForAdvance)
- Specified by:
setUseTabForAdvancein interfaceIEditorSettings
-
isMarkTranslated
public boolean isMarkTranslated()
- Specified by:
isMarkTranslatedin interfaceIEditorSettings
-
setMarkTranslated
public void setMarkTranslated(boolean markTranslated)
- Specified by:
setMarkTranslatedin interfaceIEditorSettings
-
isMarkUntranslated
public boolean isMarkUntranslated()
- Specified by:
isMarkUntranslatedin interfaceIEditorSettings
-
isMarkAutoPopulated
public boolean isMarkAutoPopulated()
- Specified by:
isMarkAutoPopulatedin interfaceIEditorSettings
-
setMarkAutoPopulated
public void setMarkAutoPopulated(boolean val)
- Specified by:
setMarkAutoPopulatedin interfaceIEditorSettings
-
setMarkUntranslated
public void setMarkUntranslated(boolean markUntranslated)
- Specified by:
setMarkUntranslatedin interfaceIEditorSettings
-
isDisplaySegmentSources
public boolean isDisplaySegmentSources()
display the segment sources or not- Specified by:
isDisplaySegmentSourcesin interfaceIEditorSettings
-
isMarkNonUniqueSegments
public boolean isMarkNonUniqueSegments()
- Specified by:
isMarkNonUniqueSegmentsin interfaceIEditorSettings
-
isHideDuplicateSegments
public boolean isHideDuplicateSegments()
-
isMarkNotedSegments
public boolean isMarkNotedSegments()
- Specified by:
isMarkNotedSegmentsin interfaceIEditorSettings
-
isMarkNBSP
public boolean isMarkNBSP()
mark non-breakable spaces?- Specified by:
isMarkNBSPin interfaceIEditorSettings- Returns:
- true when set, false otherwise
-
isMarkWhitespace
public boolean isMarkWhitespace()
mark whitespace?- Specified by:
isMarkWhitespacein interfaceIEditorSettings- Returns:
- true when set, false otherwise
-
isMarkBidi
public boolean isMarkBidi()
mark Bidirectional control characters- Specified by:
isMarkBidiin interfaceIEditorSettings- Returns:
- true when set, false otherwise
-
isDoFontFallback
public boolean isDoFontFallback()
- Specified by:
isDoFontFallbackin interfaceIEditorSettings
-
setDisplaySegmentSources
public void setDisplaySegmentSources(boolean displaySegmentSources)
- Specified by:
setDisplaySegmentSourcesin interfaceIEditorSettings
-
setMarkNonUniqueSegments
public void setMarkNonUniqueSegments(boolean markNonUniqueSegments)
- Specified by:
setMarkNonUniqueSegmentsin interfaceIEditorSettings
-
setMarkNotedSegments
public void setMarkNotedSegments(boolean markNotedSegments)
- Specified by:
setMarkNotedSegmentsin interfaceIEditorSettings
-
setMarkNBSP
public void setMarkNBSP(boolean markNBSP)
- Specified by:
setMarkNBSPin interfaceIEditorSettings
-
setMarkWhitespace
public void setMarkWhitespace(boolean markWhitespace)
- Specified by:
setMarkWhitespacein interfaceIEditorSettings
-
setMarkParagraphDelimitations
public void setMarkParagraphDelimitations(boolean delimitations)
- Specified by:
setMarkParagraphDelimitationsin interfaceIEditorSettings
-
isMarkParagraphDelimitations
public boolean isMarkParagraphDelimitations()
- Specified by:
isMarkParagraphDelimitationsin interfaceIEditorSettings
-
setMarkBidi
public void setMarkBidi(boolean markBidi)
- Specified by:
setMarkBidiin interfaceIEditorSettings
-
setDoFontFallback
public void setDoFontFallback(boolean doFontFalback)
- Specified by:
setDoFontFallbackin interfaceIEditorSettings
-
isMarkGlossaryMatches
public boolean isMarkGlossaryMatches()
- Specified by:
isMarkGlossaryMatchesin interfaceIEditorSettings
-
setMarkGlossaryMatches
public void setMarkGlossaryMatches(boolean markGlossaryMatches)
- Specified by:
setMarkGlossaryMatchesin interfaceIEditorSettings
-
isMarkLanguageChecker
public boolean isMarkLanguageChecker()
- Specified by:
isMarkLanguageCheckerin interfaceIEditorSettings
-
setMarkLanguageChecker
public void setMarkLanguageChecker(boolean markLanguageChecker)
- Specified by:
setMarkLanguageCheckerin interfaceIEditorSettings
-
getDisplayModificationInfo
public java.lang.String getDisplayModificationInfo()
returns the setting for display the modification information or not Either DISPLAY_MODIFICATION_INFO_NONE, DISPLAY_MODIFICATION_INFO_SELECTED, DISPLAY_MODIFICATION_INFO_ALL- Specified by:
getDisplayModificationInfoin interfaceIEditorSettings
-
setDisplayModificationInfo
public void setDisplayModificationInfo(java.lang.String displayModificationInfo)
Sets the setting for display the modification information or not- Specified by:
setDisplayModificationInfoin interfaceIEditorSettings- Parameters:
displayModificationInfo- Either DISPLAY_MODIFICATION_INFO_NONE , DISPLAY_MODIFICATION_INFO_SELECTED , DISPLAY_MODIFICATION_INFO_ALL
-
isAutoSpellChecking
public boolean isAutoSpellChecking()
need to check spell or not- Specified by:
isAutoSpellCheckingin interfaceIEditorSettings
-
setAutoSpellChecking
public void setAutoSpellChecking(boolean autoSpellChecking)
- Specified by:
setAutoSpellCheckingin interfaceIEditorSettings
-
updateViewPreferences
public void updateViewPreferences()
repaint segments in editor according to new view options. Use when options change to make them effective immediately.- Specified by:
updateViewPreferencesin interfaceIEditorSettings
-
updateTagValidationPreferences
public void updateTagValidationPreferences()
repaint segments in editor according to new view tag validation options. Use when options change to make them effective immediately.- Specified by:
updateTagValidationPreferencesin interfaceIEditorSettings
-
getAttributeSet
public javax.swing.text.AttributeSet getAttributeSet(boolean isSource, boolean isPlaceholder, boolean isRemoveText, SourceTextEntry.DUPLICATE duplicate, boolean active, boolean translationExists, boolean hasNote, boolean isNBSP)Choose segment's attributes based on rules.- Parameters:
isSource- is it a source segment or a target segmentisPlaceholder- is it for a placeholder (OmegaT tag or sprintf-variable etc.) or regular text inside the segment?isRemoveText- is it text that should be removed from translation?duplicate- is the sourceTextEntry a duplicate or not? values: DUPLICATE.NONE, DUPLICATE.FIRST or DUPLICATE.NEXT. See sourceTextEntryste.getDuplicate()active- is it an active segment?translationExists- does a translation already existisNBSP- is the text a non-breakable space- Returns:
- proper AttributeSet to use on displaying the segment.
-
getParagraphStartAttributeSet
public javax.swing.text.AttributeSet getParagraphStartAttributeSet()
Returns font attributes for paragraph start- Returns:
-
getModificationInfoAttributeSet
public javax.swing.text.AttributeSet getModificationInfoAttributeSet()
Returns font attributes for the modification info line.- Returns:
-
getSegmentMarkerAttributeSet
public javax.swing.text.AttributeSet getSegmentMarkerAttributeSet()
Returns font attributes for the segment marker.- Returns:
-
getOtherLanguageTranslationAttributeSet
public javax.swing.text.AttributeSet getOtherLanguageTranslationAttributeSet()
Returns font attributes for other languages translation.- Returns:
-
-