public static class SimpleEditor.PosToHighlightMapBuilder extends Object
| Constructor and Description |
|---|
PosToHighlightMapBuilder() |
PosToHighlightMapBuilder(SortedMap<Integer,SimpleEditor.HighlightEntry> pPosToStylesMap) |
| Modifier and Type | Method and Description |
|---|---|
SimpleEditor.PosToHighlightMapBuilder |
addStyle(int pStart,
int pEnd,
String pStyle) |
SimpleEditor.PosToHighlightMapBuilder |
addStyle(int pStart,
int pEnd,
String pStyle,
boolean pOverride) |
SimpleEditor.PosToHighlightMapBuilder |
addStyles(int pStart,
int pEnd,
Collection<String> pStyles) |
SimpleEditor.PosToHighlightMapBuilder |
addStyles(int pStart,
int pEnd,
Collection<String> pStyles,
boolean pOverride) |
SimpleEditor.PosToHighlightMapBuilder |
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.
|
SimpleEditor.PosToHighlightMapBuilder |
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.
|
NavigableMap<Integer,SimpleEditor.HighlightEntry> |
createPosToHighlightMap() |
int |
getEndPosition() |
static int |
getEndPosition(NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToStylesMap) |
int |
getStartPosition() |
static int |
getStartPosition(NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToStylesMap) |
static NavigableMap<Integer,SimpleEditor.HighlightEntry> |
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.
|
public PosToHighlightMapBuilder()
public PosToHighlightMapBuilder(SortedMap<Integer,SimpleEditor.HighlightEntry> pPosToStylesMap)
public SimpleEditor.PosToHighlightMapBuilder addStyle(int pStart, int pEnd, String pStyle)
public SimpleEditor.PosToHighlightMapBuilder addStyle(int pStart, int pEnd, String pStyle, boolean pOverride)
public SimpleEditor.PosToHighlightMapBuilder addStyles(int pStart, int pEnd, Collection<String> pStyles)
public SimpleEditor.PosToHighlightMapBuilder addStyles(int pStart, int pEnd, Collection<String> pStyles, boolean pOverride)
public SimpleEditor.PosToHighlightMapBuilder addStyles(NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToHighlightMap, int pFromPos, int pToPos)
UnsupportedOperationException - if overlapping of styles occurs.public SimpleEditor.PosToHighlightMapBuilder addStyles(int pStart, NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToHighlightMap, int pFromPos, int pToPos)
pStart - the position at which the styles will be addedUnsupportedOperationException - if overlapping of styles occurspublic int getStartPosition()
public static int getStartPosition(NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToStylesMap)
public int getEndPosition()
public static int getEndPosition(NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToStylesMap)
public NavigableMap<Integer,SimpleEditor.HighlightEntry> createPosToHighlightMap()
public static NavigableMap<Integer,SimpleEditor.HighlightEntry> subMap(NavigableMap<Integer,SimpleEditor.HighlightEntry> pPosToHighlightMap, int pFromPos, int pToPos)
pPosToHighlightMap - mappFromPos - (inclusive)pToPos - (exclusive)IllegalArgumentException - if pFromPos is greater than pToPospublic static void subMap(NavigableMap<Integer,SimpleEditor.HighlightEntry> pInputMap, int pFromPos, int pToPos, NavigableMap<Integer,SimpleEditor.HighlightEntry> pResultMap, int pStart)
pInputMap - input mappFromPos - frompToPos - topResultMap - result mappStart - Offset at which the styles will be added to the result map.UnsupportedOperationException - If overlapping of styles between mapsCopyright © 2023. All rights reserved.