当前位置: 首页>>代码示例>>Java>>正文


Java DocumentEvent.EventType方法代码示例

本文整理汇总了Java中javax.swing.event.DocumentEvent.EventType方法的典型用法代码示例。如果您正苦于以下问题:Java DocumentEvent.EventType方法的具体用法?Java DocumentEvent.EventType怎么用?Java DocumentEvent.EventType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.event.DocumentEvent的用法示例。


在下文中一共展示了DocumentEvent.EventType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: appendEvent

import javax.swing.event.DocumentEvent; //导入方法依赖的package包/类
/**
 * Get string representation of an offset for debugging purposes
 * in form "offset[line:column]". Both lines and columns start counting from 1
 * like in the editor's status bar. Tabs are expanded when counting the column.
 *
 * @param sb valid string builder to which text will be appended or null in which case
 *  the method itself will create a string builder and it will return it.
 * @param evt non-null document event.
 * @return non-null string builder to which the description was added.
 * @since 1.27
 */
public static StringBuilder appendEvent(StringBuilder sb, DocumentEvent evt) {
    if (sb == null) {
        sb = new StringBuilder(100);
    }
    DocumentEvent.EventType type = evt.getType();
    sb.append(type).append(", ");
    appendOffset(sb, evt.getDocument(), evt.getOffset());
    sb.append(", l=").append(evt.getLength());
    // Possibly append the modification text
    String modText;
    if ((modText = getModificationText(evt)) != null) {
        sb.append(", modText=\"");
        CharSequenceUtilities.debugText(sb, modText);
        sb.append('"');
    }
    return sb;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:DocumentUtilities.java

示例2: BaseDocumentEvent

import javax.swing.event.DocumentEvent; //导入方法依赖的package包/类
/** Construct document event instance.
   * @param offset position in the document where the insert/remove/change
   *   occured
   * @param length number of the characters affected by the event
   * @param type type of the event - INSERT/REMOVE/CHANGE
   */
   public BaseDocumentEvent(BaseDocument doc, int offset, int length,
                            DocumentEvent.EventType type) {
       ((AbstractDocument)doc).super(offset, length, type);

hasBeenDone2 = true;
alive2 = true;
       inProgress2 = true;
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:BaseDocumentEvent.java

示例3: createDocumentEvent

import javax.swing.event.DocumentEvent; //导入方法依赖的package包/类
protected BaseDocumentEvent createDocumentEvent(int pos, int length,
        DocumentEvent.EventType type) {
    return new BaseDocumentEvent(this, pos, length, type);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:BaseDocument.java

示例4: getDocumentEvent

import javax.swing.event.DocumentEvent; //导入方法依赖的package包/类
final BaseDocumentEvent getDocumentEvent(int pos, int length, DocumentEvent.EventType type, AttributeSet attribs) {
    BaseDocumentEvent bde = createDocumentEvent(pos, length, type);
    bde.attachChangeAttribs(attribs);
    return bde;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:BaseDocument.java

示例5: createDocumentEvent

import javax.swing.event.DocumentEvent; //导入方法依赖的package包/类
protected @Override BaseDocumentEvent createDocumentEvent(int offset, int length,
        DocumentEvent.EventType type) {
    return new GuardedDocumentEvent(this, offset, length, type);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:GuardedDocument.java

示例6: GuardedDocumentEvent

import javax.swing.event.DocumentEvent; //导入方法依赖的package包/类
public GuardedDocumentEvent(GuardedDocument doc, int offset, int length,
                            DocumentEvent.EventType type) {
    super(doc, offset, length, type);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:GuardedDocumentEvent.java


注:本文中的javax.swing.event.DocumentEvent.EventType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。