|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.editor.fold; import javax.swing.event.DocumentEvent; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import org.netbeans.api.editor.fold.Fold; import org.netbeans.api.editor.fold.FoldHierarchy; import org.netbeans.api.editor.fold.FoldHierarchyEvent; import org.netbeans.api.editor.fold.FoldStateChange; import org.netbeans.api.editor.fold.FoldType; /** * Accessor for the package-private functionality in org.netbeans.api.editor.fold. * * @author Miloslav Metelka * @version 1.00 */ public abstract class ApiPackageAccessor { private static ApiPackageAccessor INSTANCE; public static ApiPackageAccessor get() { return INSTANCE; } /** * Register the accessor. The method can only be called once * - othewise it throws IllegalStateException. * * @param accessor instance. */ public static void register(ApiPackageAccessor accessor) { if (INSTANCE != null) { throw new IllegalStateException("Already registered"); // NOI18N } INSTANCE = accessor; } public abstract FoldHierarchy createFoldHierarchy(FoldHierarchyExecution execution); public abstract Fold createFold(FoldOperationImpl operation, FoldType type, String description, boolean collapsed, Document doc, int startOffset, int endOffset, int startGuardedLength, int endGuardedLength, Object extraInfo) throws BadLocationException; public abstract FoldHierarchyEvent createFoldHierarchyEvent(FoldHierarchy source, Fold[] removedFolds, Fold[] addedFolds, FoldStateChange[] foldStateChanges, int affectedStartOffset, int affectedEndOffset); public abstract FoldStateChange createFoldStateChange(Fold fold); public abstract void foldSetCollapsed(Fold fold, boolean collapsed); public abstract void foldSetParent(Fold fold, Fold parent); public abstract void foldExtractToChildren(Fold fold, int index, int length, Fold targetFold); public abstract Fold foldReplaceByChildren(Fold fold, int index); public abstract void foldSetDescription(Fold fold, String description); public abstract void foldSetStartOffset(Fold fold, Document doc, int startOffset) throws BadLocationException; public abstract void foldSetEndOffset(Fold fold, Document doc, int endOffset) throws BadLocationException; public abstract boolean foldIsStartDamaged(Fold fold); public abstract boolean foldIsEndDamaged(Fold fold); public abstract boolean foldIsExpandNecessary(Fold fold); public abstract void foldInsertUpdate(Fold fold, DocumentEvent evt); public abstract void foldRemoveUpdate(Fold fold, DocumentEvent evt); public abstract FoldOperationImpl foldGetOperation(Fold fold); public abstract int foldGetRawIndex(Fold fold); public abstract void foldSetRawIndex(Fold fold, int rawIndex); public abstract void foldUpdateRawIndex(Fold fold, int rawIndexDelta); public abstract Object foldGetExtraInfo(Fold fold); public abstract void foldStateChangeCollapsedChanged(FoldStateChange fsc); public abstract void foldStateChangeDescriptionChanged(FoldStateChange fsc); public abstract void foldStateChangeStartOffsetChanged(FoldStateChange fsc, int originalStartOffset); public abstract void foldStateChangeEndOffsetChanged(FoldStateChange fsc, int originalEndOffset); } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.