當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。