public abstract class AbstractMarker extends java.lang.Object implements IMarker
Modifier and Type | Field and Description |
---|---|
protected javax.swing.text.AttributeSet |
attributes |
protected javax.swing.text.Highlighter.HighlightPainter |
painter |
protected java.util.regex.Pattern |
pattern
Regexp for mark.
|
protected int |
patternChar
char for mark.
|
protected java.lang.String |
toolTip |
Constructor and Description |
---|
AbstractMarker() |
Modifier and Type | Method and Description |
---|---|
java.util.List<Mark> |
getMarksForEntry(SourceTextEntry ste,
java.lang.String sourceText,
java.lang.String translationText,
boolean isActive)
Calculate marks for specific entry.
|
protected void |
initDrawers(boolean isSource,
boolean isActive)
Marker can override this method for define different PAINTER, ATTRIBUTES
and PATTERN, based on source/translation, active/inactive and other.
|
protected abstract boolean |
isEnabled()
Is the marker enabled?
|
protected javax.swing.text.Highlighter.HighlightPainter painter
protected java.lang.String toolTip
protected javax.swing.text.AttributeSet attributes
protected java.util.regex.Pattern pattern
protected int patternChar
public AbstractMarker() throws java.lang.Exception
java.lang.Exception
protected abstract boolean isEnabled()
public java.util.List<Mark> getMarksForEntry(SourceTextEntry ste, java.lang.String sourceText, java.lang.String translationText, boolean isActive) throws java.lang.Exception
IMarker
Method will be called NOT in Swing thread.
Note to implementers: Both sourceText
and translationText
might be null!
getMarksForEntry
in interface IMarker
sourceText
- might be null!translationText
- might be null!isActive
- is this an active segment in the document?java.lang.Exception
protected void initDrawers(boolean isSource, boolean isActive)