|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.sp.jedit.buffer.FoldHandler
Interface for obtaining the fold level of a specified line.
Plugins can add and remove fold handlers using the
registerFoldHandler(FoldHandler)
and
unregisterFoldHandler(FoldHandler)
methods.
Constructor Summary | |
protected |
FoldHandler(java.lang.String name)
|
Method Summary | |
boolean |
equals(java.lang.Object o)
Returns if the specified fold handler is equal to this one. |
static FoldHandler |
getFoldHandler(java.lang.String name)
Returns the fold handler with the specified name, or null if there is no registered handler with that name. |
static FoldHandler[] |
getFoldHandlers()
Returns an array containing the list of registered fold handlers |
abstract int |
getFoldLevel(Buffer buffer,
int lineIndex,
javax.swing.text.Segment seg)
Returns the fold level of the specified line. |
static java.lang.String[] |
getFoldModes()
Returns an array containing the names of all registered fold handlers |
java.lang.String |
getName()
Returns the internal name of this FoldHandler |
static void |
registerFoldHandler(FoldHandler handler)
Adds a fold handler to the list of registered handlers. |
static void |
unregisterFoldHandler(FoldHandler handler)
Removes a fold handler from the list of registered handlers. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected FoldHandler(java.lang.String name)
Method Detail |
public java.lang.String getName()
public abstract int getFoldLevel(Buffer buffer, int lineIndex, javax.swing.text.Segment seg)
buffer
- The buffer in questionlineIndex
- The line indexseg
- A segment the fold handler can use to obtain any
text from the buffer, if necessary
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The objectpublic static void registerFoldHandler(FoldHandler handler)
EditPlugin.start()
method.
handler
- The fold handler to addpublic static void unregisterFoldHandler(FoldHandler handler)
EditPlugin.stop()
method.
handler
- The fold handler to addpublic static FoldHandler[] getFoldHandlers()
public static FoldHandler getFoldHandler(java.lang.String name)
name
- The name of the desired fold handlerpublic static java.lang.String[] getFoldModes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |