Class AbstractMarker

java.lang.Object
org.omegat.gui.editor.mark.AbstractMarker
All Implemented Interfaces:
IMarker
Direct Known Subclasses:
AltTranslationsMarker, BidiMarkers, NBSPMarker, RemoveTagMarker

public abstract class AbstractMarker extends Object implements IMarker
Abstract marker class that marks source and target text according to some 'pattern' and paints them according to some 'PAINTER' and 'ATTRIBUTES' (all of them defined by implementing classes)
  • Constructor Details

  • Method Details

    • getMarksForEntry

      public List<Mark> getMarksForEntry(SourceTextEntry ste, String sourceText, String translationText, boolean isActive) throws Exception
      Description copied from interface: IMarker
      Calculate marks for specific entry.

      Method will be called NOT in Swing thread.

      Note to implementers: Both sourceText and translationText might be null!

      Specified by:
      getMarksForEntry in interface IMarker
      Parameters:
      ste - entry to calculate marks for
      sourceText - might be null!
      translationText - might be null!
      isActive - is this an active segment in the document?
      Returns:
      null if nothing changed, or list of new marks. Empty list must be returned if marks shouldn't be displayed
      Throws:
      Exception - if something went wrong