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

项目:kawa-mirror    文件:BufferContent.java   
public void replaceTextRange(int start, int length, String newText)
{
  newText = newText == null ? "" : newText; 
  notifyListeners(makeTextChangingEvent(start, length, newText));
  delete(start, start+length);
  insert(start, newText);
  notifyListeners(new TextChangedEvent(this));
}
项目:kawa-mirror    文件:BufferContent.java   
public void setText(String newText)
{
  delete(0, size());
  insert(0, newText);
  TextChangedEvent evt = new TextChangedEvent(this);
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
   ((TextChangeListener) iter.next()).textSet(evt);
  }
}
项目:kawa-mirror    文件:BufferContent.java   
private void notifyListeners(TextChangedEvent changedEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanged(changedEvent);
  }

}
项目:SPELL    文件:TextViewContent.java   
/**************************************************************************
 * Fire a text-set event
 *************************************************************************/
private void fireTextSet()
{
    for (TextChangeListener lst : m_listeners)
    {
        lst.textSet(new TextChangedEvent(this));
    }
}
项目:SPELL    文件:TextViewContent.java   
/**************************************************************************
 * Fire a text-moved event
 *************************************************************************/
private void fireTextMoved()
{
    for (TextChangeListener lst : m_listeners)
    {
        lst.textSet(new TextChangedEvent(this));
    }
}
项目:kawa-fork    文件:BufferContent.java   
public void replaceTextRange(int start, int length, String newText)
{
  newText = newText == null ? "" : newText; 
  notifyListeners(makeTextChangingEvent(start, length, newText));
  delete(start, start+length);
  insert(start, newText);
  notifyListeners(new TextChangedEvent(this));
}
项目:kawa-fork    文件:BufferContent.java   
public void setText(String newText)
{
  delete(0, size());
  insert(0, newText);
  TextChangedEvent evt = new TextChangedEvent(this);
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
   ((TextChangeListener) iter.next()).textSet(evt);
  }
}
项目:kawa-fork    文件:BufferContent.java   
private void notifyListeners(TextChangedEvent changedEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanged(changedEvent);
  }

}
项目:ai2-kawa    文件:BufferContent.java   
/**
 * @see org.eclipse.swt.custom.StyledTextContent#replaceTextRange(int, int, java.lang.String)
 */
public void replaceTextRange(int start, int length, String newText)
{
  newText = newText == null ? "" : newText; 
  notifyListeners(makeTextChangingEvent(start, length, newText));
  delete(start, length);
  insert(start, newText);
  notifyListeners(new TextChangedEvent(this));
}
项目:ai2-kawa    文件:BufferContent.java   
/**
 * @see org.eclipse.swt.custom.StyledTextContent#setText(java.lang.String)
 */
public void setText(String newText)
{
  delete(0, size());
  insert(0, newText);
  TextChangedEvent evt = new TextChangedEvent(this);
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
   ((TextChangeListener) iter.next()).textSet(evt);
  }
}
项目:ai2-kawa    文件:BufferContent.java   
/**
 * @param changedEvent
 */
private void notifyListeners(TextChangedEvent changedEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanged(changedEvent);
  }

}
项目:kawa    文件:BufferContent.java   
public void replaceTextRange(int start, int length, String newText)
{
  newText = newText == null ? "" : newText; 
  notifyListeners(makeTextChangingEvent(start, length, newText));
  delete(start, length);
  insert(start, newText);
  notifyListeners(new TextChangedEvent(this));
}
项目:kawa    文件:BufferContent.java   
public void setText(String newText)
{
  delete(0, size());
  insert(0, newText);
  TextChangedEvent evt = new TextChangedEvent(this);
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
   ((TextChangeListener) iter.next()).textSet(evt);
  }
}
项目:kawa    文件:BufferContent.java   
private void notifyListeners(TextChangedEvent changedEvent)
{
  for (Iterator iter = textChangeListeners.iterator(); iter.hasNext();)
  {
    TextChangeListener element = (TextChangeListener) iter.next();
    element.textChanged(changedEvent);
  }

}
项目: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));
    }
}
项目:relations    文件:TextContent.java   
@Override
public void setText(final String inText) {
    textStore = inText.toCharArray();
    gapStart = -1;
    gapEnd = -1;
    expandExp = 1;
    indexLines();

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