Serializable
, org.openide.util.HelpCtx.Provider
@Deprecated public abstract class IndentEngine extends org.openide.ServiceType
Constructor | Description |
---|---|
IndentEngine() |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
acceptMimeType(String mime) |
Deprecated.
Allow subclasses to decide whether they are suitable
for the given mime-type or not.
|
abstract Writer |
createWriter(Document doc,
int offset,
Writer writer) |
Deprecated.
Creates writer that formats text that is inserted into it.
|
static IndentEngine |
find(String mime) |
Deprecated.
Finds engine associated with given mime type.
|
static IndentEngine |
find(Document doc) |
Deprecated.
Finds engine associated with given document.
|
static IndentEngine |
getDefault() |
Deprecated.
Returns a simple indentation engine that does no formatting.
|
org.openide.util.HelpCtx |
getHelpCtx() |
Deprecated.
|
static Enumeration<? extends IndentEngine> |
indentEngines() |
Deprecated.
Returns enumeration of all registered indentation engines.
|
abstract int |
indentLine(Document doc,
int offset) |
Deprecated.
Indents the current line.
|
abstract int |
indentNewLine(Document doc,
int offset) |
Deprecated.
Inserts new line at given position and indents the new line with
spaces.
|
static void |
register(String mime,
IndentEngine eng) |
Deprecated.
IndentEngine now is a ServiceType
|
public org.openide.util.HelpCtx getHelpCtx()
getHelpCtx
in interface org.openide.util.HelpCtx.Provider
getHelpCtx
in class org.openide.ServiceType
public abstract int indentLine(Document doc, int offset)
doc
- the document to work onoffset
- the offset of a character on the linepublic abstract int indentNewLine(Document doc, int offset)
doc
- the document to work onoffset
- the offset of a character on the linepublic abstract Writer createWriter(Document doc, int offset, Writer writer)
The provided document and offset are only informational, should not be modified but only used to find correct indentation strategy.
doc
- documentoffset
- position to begin inserts atwriter
- writer to write toprotected boolean acceptMimeType(String mime)
mime
- mime-type string@Deprecated public static void register(String mime, IndentEngine eng)
public static Enumeration<? extends IndentEngine> indentEngines()
public static IndentEngine find(String mime)
public static IndentEngine find(Document doc)
public static IndentEngine getDefault()
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.