Class EditorSettings

  • All Implemented Interfaces:
    IEditorSettings

    public class EditorSettings
    extends java.lang.Object
    implements IEditorSettings
    Editor behavior control settings.
    • 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()
      • isHideDuplicateSegments

        public boolean isHideDuplicateSegments()
      • isMarkNBSP

        public boolean isMarkNBSP()
        mark non-breakable spaces?
        Specified by:
        isMarkNBSP in interface IEditorSettings
        Returns:
        true when set, false otherwise
      • isMarkWhitespace

        public boolean isMarkWhitespace()
        mark whitespace?
        Specified by:
        isMarkWhitespace in interface IEditorSettings
        Returns:
        true when set, false otherwise
      • isMarkBidi

        public boolean isMarkBidi()
        mark Bidirectional control characters
        Specified by:
        isMarkBidi in interface IEditorSettings
        Returns:
        true when set, false otherwise
      • 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:
        getDisplayModificationInfo in interface IEditorSettings
      • setDisplayModificationInfo

        public void setDisplayModificationInfo​(java.lang.String displayModificationInfo)
        Sets the setting for display the modification information or not
        Specified by:
        setDisplayModificationInfo in interface IEditorSettings
        Parameters:
        displayModificationInfo - Either DISPLAY_MODIFICATION_INFO_NONE , DISPLAY_MODIFICATION_INFO_SELECTED , DISPLAY_MODIFICATION_INFO_ALL
      • updateViewPreferences

        public void updateViewPreferences()
        repaint segments in editor according to new view options. Use when options change to make them effective immediately.
        Specified by:
        updateViewPreferences in interface IEditorSettings
      • 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:
        updateTagValidationPreferences in interface IEditorSettings
      • 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 segment
        isPlaceholder - 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 exist
        isNBSP - 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: