Java 类org.eclipse.swt.custom.TextChangingEvent 实例源码

项目:kawa-mirror    文件:BufferContent.java   
private void show(TextChangingEvent changingEvent)
{
  System.out.println("start: " + changingEvent.start + "\n" +
  "newCharCount: " + changingEvent.newCharCount + "\n" +
  "newLineCount: " + changingEvent.newLineCount + "\n" +
  "replaceCharCount: " + changingEvent.replaceCharCount + "\n" +
  "replaceLineCount: " + changingEvent.replaceLineCount + "\n" +
  "text: " + printable(changingEvent.newText) + "\n");
}
项目:kawa-mirror    文件:BufferContent.java   
private TextChangingEvent makeTextChangingEvent(int start, int length, String newText)
{
  TextChangingEvent result = new TextChangingEvent(this);
  result.start =  start;
  result.newCharCount = newText.length();
  result.newLineCount = lineOffsets.countLines(newText);
  result.newText = newText;
  result.replaceCharCount = length;
  result.replaceLineCount = lineOffsets.linesInRange(pos2offset(start), pos2offset(start + length));

  return result;
}
项目:kawa-mirror    文件:BufferContent.java   
private void notifyListeners(TextChangingEvent changingEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanging(changingEvent);
  }

}
项目:kawa-fork    文件:BufferContent.java   
private void show(TextChangingEvent changingEvent)
{
  System.out.println("start: " + changingEvent.start + "\n" +
  "newCharCount: " + changingEvent.newCharCount + "\n" +
  "newLineCount: " + changingEvent.newLineCount + "\n" +
  "replaceCharCount: " + changingEvent.replaceCharCount + "\n" +
  "replaceLineCount: " + changingEvent.replaceLineCount + "\n" +
  "text: " + printable(changingEvent.newText) + "\n");
}
项目:kawa-fork    文件:BufferContent.java   
private TextChangingEvent makeTextChangingEvent(int start, int length, String newText)
{
  TextChangingEvent result = new TextChangingEvent(this);
  result.start =  start;
  result.newCharCount = newText.length();
  result.newLineCount = lineOffsets.countLines(newText);
  result.newText = newText;
  result.replaceCharCount = length;
  result.replaceLineCount = lineOffsets.linesInRange(pos2offset(start), pos2offset(start + length));

  return result;
}
项目:kawa-fork    文件:BufferContent.java   
private void notifyListeners(TextChangingEvent changingEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanging(changingEvent);
  }

}
项目:ai2-kawa    文件:BufferContent.java   
private void show(TextChangingEvent changingEvent)
{
  System.out.println("start: " + changingEvent.start + "\n" +
  "newCharCount: " + changingEvent.newCharCount + "\n" +
  "newLineCount: " + changingEvent.newLineCount + "\n" +
  "replaceCharCount: " + changingEvent.replaceCharCount + "\n" +
  "replaceLineCount: " + changingEvent.replaceLineCount + "\n" +
  "text: " + printable(changingEvent.newText) + "\n");
}
项目:ai2-kawa    文件:BufferContent.java   
/**
 * @param start
 * @param length
 * @param newText
 * @return
 */
private TextChangingEvent makeTextChangingEvent(int start, int length, String newText)
{
  TextChangingEvent result = new TextChangingEvent(this);
  result.start =  start;
  result.newCharCount = newText.length();
  result.newLineCount = lineOffsets.countLines(newText);
  result.newText = newText;
  result.replaceCharCount = length;
  result.replaceLineCount = lineOffsets.linesInRange(pos2offset(start), pos2offset(start + length));

  return result;
}
项目:ai2-kawa    文件:BufferContent.java   
/**
 * @param changingEvent
 */
private void notifyListeners(TextChangingEvent changingEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanging(changingEvent);
  }

}
项目:kawa    文件:BufferContent.java   
private void show(TextChangingEvent changingEvent)
{
  System.out.println("start: " + changingEvent.start + "\n" +
  "newCharCount: " + changingEvent.newCharCount + "\n" +
  "newLineCount: " + changingEvent.newLineCount + "\n" +
  "replaceCharCount: " + changingEvent.replaceCharCount + "\n" +
  "replaceLineCount: " + changingEvent.replaceLineCount + "\n" +
  "text: " + printable(changingEvent.newText) + "\n");
}
项目:kawa    文件:BufferContent.java   
private TextChangingEvent makeTextChangingEvent(int start, int length, String newText)
{
  TextChangingEvent result = new TextChangingEvent(this);
  result.start =  start;
  result.newCharCount = newText.length();
  result.newLineCount = lineOffsets.countLines(newText);
  result.newText = newText;
  result.replaceCharCount = length;
  result.replaceLineCount = lineOffsets.linesInRange(pos2offset(start), pos2offset(start + length));

  return result;
}
项目:kawa    文件:BufferContent.java   
private void notifyListeners(TextChangingEvent changingEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanging(changingEvent);
  }

}
项目:relations    文件:TextContent.java   
@Override
public void replaceTextRange(final int inStart, final int inReplaceLength,
        final String inText) {
    if (!isValidReplace(inStart, inReplaceLength))
        SWT.error(SWT.ERROR_INVALID_ARGUMENT);

    // inform listeners
    final TextChangingEvent lChanging = new TextChangingEvent(this);
    lChanging.start = inStart;
    lChanging.replaceLineCount = lineCount(inStart, inReplaceLength);
    lChanging.newText = inText;
    lChanging.newLineCount = lineCount(inText);
    lChanging.replaceCharCount = inReplaceLength;
    lChanging.newCharCount = inText.length();

    final Object[] lListeners = listeners.getListeners();
    for (int i = 0; i < lListeners.length; ++i) {
        ((TextChangeListener) lListeners[i]).textChanging(lChanging);
    }

    delete(inStart, inReplaceLength, lChanging.replaceLineCount + 1);
    insert(inStart, inText);

    // inform listeners again
    for (int i = 0; i < lListeners.length; ++i) {
        ((TextChangeListener) lListeners[i])
                .textChanged(new TextChangedEvent(this));
    }
}
项目:gama    文件:BoxDecoratorImpl.java   
@Override
public void textChanging(final TextChangingEvent event) {
}
项目:Pydev    文件:VerticalIndentGuidesPainter.java   
@Override
public void textChanging(TextChangingEvent event) {
    this.currClientArea = null; //will force redrawing everything
    askFullRedraw = true;
}