Module com.iamsoft.util.ui
Class SimpleEditor.PosToHighlightMapBuilder
java.lang.Object
com.iamsoft.util.ui.javafx.codearea.SimpleEditor.PosToHighlightMapBuilder
- Enclosing class:
- SimpleEditor
Used for building position-to-highlight maps, which are used to
apply highlights.
-
Constructor Summary
ConstructorsConstructorDescriptionPosToHighlightMapBuilder
(SortedMap<Integer, SimpleEditor.HighlightEntry> pPosToStylesMap) -
Method Summary
Modifier and TypeMethodDescriptionaddStyles
(int pStart, int pEnd, Collection<String> pStyles) addStyles
(int pStart, int pEnd, Collection<String> pStyles, boolean pOverride) addStyles
(int pStart, NavigableMap<Integer, SimpleEditor.HighlightEntry> pPosToHighlightMap, int pFromPos, int pToPos) Adds the styles (from the specified map), which are within the specified range.addStyles
(NavigableMap<Integer, SimpleEditor.HighlightEntry> pPosToHighlightMap, int pFromPos, int pToPos) Adds the styles (from the specified map), which are within the specified range, at the end.int
static int
getEndPosition
(NavigableMap<Integer, SimpleEditor.HighlightEntry> pPosToStylesMap) int
static int
getStartPosition
(NavigableMap<Integer, SimpleEditor.HighlightEntry> pPosToStylesMap) subMap
(NavigableMap<Integer, SimpleEditor.HighlightEntry> pPosToHighlightMap, int pFromPos, int pToPos) Offsets are recalculated relative to the specified start position.static void
subMap
(NavigableMap<Integer, SimpleEditor.HighlightEntry> pInputMap, int pFromPos, int pToPos, NavigableMap<Integer, SimpleEditor.HighlightEntry> pResultMap, int pStart) Adds the styles in the specified range from the input map to the result map.
-
Constructor Details
-
PosToHighlightMapBuilder
public PosToHighlightMapBuilder() -
PosToHighlightMapBuilder
-
-
Method Details
-
addStyle
-
addStyle
public SimpleEditor.PosToHighlightMapBuilder addStyle(int pStart, int pEnd, String pStyle, boolean pOverride) -
addStyles
public SimpleEditor.PosToHighlightMapBuilder addStyles(int pStart, int pEnd, Collection<String> pStyles) -
addStyles
public SimpleEditor.PosToHighlightMapBuilder addStyles(int pStart, int pEnd, Collection<String> pStyles, boolean pOverride) -
getStartPosition
public int getStartPosition() -
getEndPosition
public int getEndPosition() -
createPosToHighlightMap
-