Java 类com.intellij.openapi.editor.impl.TextDrawingCallback 实例源码

项目:intellij-ce-playground    文件:TextBasedSoftWrapPainter.java   
public TextBasedSoftWrapPainter(Map<SoftWrapDrawingType, Character> symbols, Editor editor, TextDrawingCallback drawingCallback,
                                ColorProvider colorHolder)
  throws IllegalArgumentException
{
  if (symbols.size() != SoftWrapDrawingType.values().length) {
    throw new IllegalArgumentException(
      String.format("Can't create text-based soft wrap painter. Reason: given 'drawing type -> symbol' mappings "
                    + "are incomplete - expected size %d but got %d (%s)", SoftWrapDrawingType.values().length, symbols.size(), symbols)
    );
  }
  myEditor = editor;
  myDrawingCallback = drawingCallback;
  myColorHolder = colorHolder;
  for (Map.Entry<SoftWrapDrawingType, Character> entry : symbols.entrySet()) {
    mySymbols.put(entry.getKey(), new char[]{entry.getValue()});
  }
  reinit();
}
项目:consulo    文件:TextBasedSoftWrapPainter.java   
public TextBasedSoftWrapPainter(Map<SoftWrapDrawingType, Character> symbols, Editor editor, TextDrawingCallback drawingCallback,
                                ColorProvider colorHolder)
        throws IllegalArgumentException
{
  if (symbols.size() != SoftWrapDrawingType.values().length) {
    throw new IllegalArgumentException(
            String.format("Can't create text-based soft wrap painter. Reason: given 'drawing type -> symbol' mappings "
                          + "are incomplete - expected size %d but got %d (%s)", SoftWrapDrawingType.values().length, symbols.size(), symbols)
    );
  }
  myEditor = editor;
  myDrawingCallback = drawingCallback;
  myColorHolder = colorHolder;
  for (Map.Entry<SoftWrapDrawingType, Character> entry : symbols.entrySet()) {
    mySymbols.put(entry.getKey(), new char[]{entry.getValue()});
  }
  reinit();
}
项目:intellij-ce-playground    文件:CompositeSoftWrapPainter.java   
private void initDelegateIfNecessary() {
  if (myDelegate != null && myDelegate.canUse()) {
    return;
  }
  if (++mySymbolsDrawingIndex < SYMBOLS.size()) {
    TextDrawingCallback callback = myEditor.getTextDrawingCallback();
    ColorProvider colorHolder = ColorProvider.byColorScheme(myEditor, EditorColors.SOFT_WRAP_SIGN_COLOR);
    myDelegate = new TextBasedSoftWrapPainter(SYMBOLS.get(mySymbolsDrawingIndex), myEditor, callback, colorHolder);
    initDelegateIfNecessary();
    return;
  }
  myDelegate = new ArrowSoftWrapPainter(myEditor);
}
项目:tools-idea    文件:CompositeSoftWrapPainter.java   
private void initDelegateIfNecessary() {
  if (myDelegate != null && myDelegate.canUse()) {
    return;
  }
  if (++mySymbolsDrawingIndex < SYMBOLS.size()) {
    TextDrawingCallback callback = myEditor.getTextDrawingCallback();
    ColorProvider colorHolder = ColorProvider.byColorScheme(myEditor, EditorColors.SOFT_WRAP_SIGN_COLOR);
    myDelegate = new TextBasedSoftWrapPainter(SYMBOLS.get(mySymbolsDrawingIndex), myEditor, callback, colorHolder);
    initDelegateIfNecessary();
    return;
  }
  myDelegate = new ArrowSoftWrapPainter(myEditor);
}
项目:tools-idea    文件:TextBasedSoftWrapPainter.java   
public TextBasedSoftWrapPainter(Map<SoftWrapDrawingType, Character> symbols, Editor editor, TextDrawingCallback drawingCallback,
                                ColorProvider colorHolder)
  throws IllegalArgumentException
{
  if (symbols.size() != SoftWrapDrawingType.values().length) {
    throw new IllegalArgumentException(
      String.format("Can't create text-based soft wrap painter. Reason: given 'drawing type -> symbol' mappings "
                    + "are incomplete - expected size %d but got %d (%s)", SoftWrapDrawingType.values().length, symbols.size(), symbols)
    );
  }
  myDrawingCallback = drawingCallback;
  myColorHolder = colorHolder;
  myCanUse = init(symbols, editor);
}
项目:consulo    文件:CompositeSoftWrapPainter.java   
private void initDelegateIfNecessary() {
  if (myDelegate != null && myDelegate.canUse()) {
    return;
  }
  if (++mySymbolsDrawingIndex < SYMBOLS.size()) {
    TextDrawingCallback callback = myEditor.getTextDrawingCallback();
    ColorProvider colorHolder = ColorProvider.byColorScheme(myEditor, EditorColors.SOFT_WRAP_SIGN_COLOR);
    myDelegate = new TextBasedSoftWrapPainter(SYMBOLS.get(mySymbolsDrawingIndex), myEditor, callback, colorHolder);
    initDelegateIfNecessary();
    return;
  }
  myDelegate = new ArrowSoftWrapPainter(myEditor);
}
项目:intellij-ce-playground    文件:EditorWindowImpl.java   
@Override
public TextDrawingCallback getTextDrawingCallback() {
  return myDelegate.getTextDrawingCallback();
}
项目:tools-idea    文件:EditorWindow.java   
@Override
public TextDrawingCallback getTextDrawingCallback() {
  return myDelegate.getTextDrawingCallback();
}
项目:consulo    文件:EditorWindowImpl.java   
@Override
public TextDrawingCallback getTextDrawingCallback() {
  return myDelegate.getTextDrawingCallback();
}
项目:intellij-ce-playground    文件:EditorEx.java   
TextDrawingCallback getTextDrawingCallback();
项目:tools-idea    文件:EditorEx.java   
TextDrawingCallback getTextDrawingCallback();
项目:consulo    文件:EditorEx.java   
TextDrawingCallback getTextDrawingCallback();