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

项目:kawa-mirror    文件:BufferContent.java   
public void addTextChangeListener(TextChangeListener textChangeListener)
{
  if (textChangeListener != null) 
  {
    textChangeListeners.add(textChangeListener);
  }

}
项目: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);
  }

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

}
项目:SPELL    文件:TextViewContent.java   
/**************************************************************************
 * Constructor
 *************************************************************************/
public TextViewContent( int capacity )
{
    m_listeners = new ArrayList<TextChangeListener>();
    m_text = new TextViewLine[1];
    m_showTimestamp = false;
    m_text[0] = new TextViewLine("", null, Scope.OTHER, ParagraphType.NORMAL, 0, m_showTimestamp);
    m_ranges = null;
    m_viewWindowLength = 0;
    m_viewWindowStart = 0;
    m_buffer = new TextBuffer(capacity);
    m_buffer.addBufferListener(this);
    makeLineIndex();
}
项目:SPELL    文件:TextViewContent.java   
@Override
/**************************************************************************
 * Register a text change listener
 *************************************************************************/
public void addTextChangeListener(TextChangeListener listener)
{
    m_listeners.add(listener);
}
项目:SPELL    文件:TextViewContent.java   
@Override
/**************************************************************************
 * De-register a text change listener
 *************************************************************************/
public void removeTextChangeListener(TextChangeListener listener)
{
    m_listeners.remove(listener);
}
项目: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 addTextChangeListener(TextChangeListener textChangeListener)
{
  if (textChangeListener != null) 
  {
    textChangeListeners.add(textChangeListener);
  }

}
项目: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);
  }

}
项目: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   
/**
 * @see org.eclipse.swt.custom.StyledTextContent#addTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
 */
public void addTextChangeListener(TextChangeListener textChangeListener)
{
  if (textChangeListener != null) 
  {
    textChangeListeners.add(textChangeListener);
  }

}
项目: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);
  }

}
项目: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   
public void addTextChangeListener(TextChangeListener textChangeListener)
{
  if (textChangeListener != null) 
  {
    textChangeListeners.add(textChangeListener);
  }

}
项目: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);
  }

}
项目: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));
    }
}
项目: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));
    }
}
项目:kawa-mirror    文件:BufferContent.java   
public void removeTextChangeListener(TextChangeListener textChangeListener)
{
  textChangeListeners.remove(textChangeListener);
}
项目:kawa-fork    文件:BufferContent.java   
public void removeTextChangeListener(TextChangeListener textChangeListener)
{
  textChangeListeners.remove(textChangeListener);
}
项目:ai2-kawa    文件:BufferContent.java   
/**
 * @see org.eclipse.swt.custom.StyledTextContent#removeTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
 */
public void removeTextChangeListener(TextChangeListener textChangeListener)
{
  textChangeListeners.remove(textChangeListener);
}
项目:kawa    文件:BufferContent.java   
public void removeTextChangeListener(TextChangeListener textChangeListener)
{
  textChangeListeners.remove(textChangeListener);
}
项目:relations    文件:TextContent.java   
@Override
public void addTextChangeListener(final TextChangeListener inListener) {
    if (inListener == null)
        error(SWT.ERROR_NULL_ARGUMENT);
    listeners.add(inListener);
}
项目:relations    文件:TextContent.java   
@Override
public void removeTextChangeListener(final TextChangeListener inListener) {
    listeners.remove(inListener);
}