|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fife.ui.rsyntaxtextarea.TokenMakerFactory
public abstract class TokenMakerFactory
A factory that maps syntax styles to TokenMaker
s capable of splitting
text into tokens for those syntax styles.
Field Summary | |
---|---|
static String |
PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY
If this system property is set, a custom TokenMakerFactory
of the specified class will be used as the default token maker factory. |
Constructor Summary | |
---|---|
TokenMakerFactory()
|
Method Summary | |
---|---|
protected abstract Map |
createTokenMakerKeyToClassNameMap()
Creates and returns a mapping from keys to the names of TokenMaker implementation classes. |
static TokenMakerFactory |
getDefaultInstance()
Returns the default TokenMakerFactory instance. |
TokenMaker |
getTokenMaker(String key)
Returns a TokenMaker for the specified key. |
protected abstract TokenMaker |
getTokenMakerImpl(String key)
Returns a TokenMaker for the specified key. |
abstract Set |
keySet()
Returns the set of keys that this factory maps to token makers. |
static void |
setDefaultInstance(TokenMakerFactory tmf)
Sets the default TokenMakerFactory instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY
TokenMakerFactory
of the specified class will be used as the default token maker factory.
Constructor Detail |
---|
public TokenMakerFactory()
Method Detail |
---|
protected abstract Map createTokenMakerKeyToClassNameMap()
TokenMaker
implementation classes. When
getTokenMaker(String)
is called with a key defined in this
map, a TokenMaker
of the corresponding type is returned.
public static TokenMakerFactory getDefaultInstance()
TokenMakerFactory
instance. This is
the factory used by all RSyntaxDocument
s by default.
setDefaultInstance(TokenMakerFactory)
public final TokenMaker getTokenMaker(String key)
TokenMaker
for the specified key.
key
- The key.
TokenMaker
, or
PlainTextTokenMaker
if none matches the specified key.protected abstract TokenMaker getTokenMakerImpl(String key)
TokenMaker
for the specified key.
key
- The key.
TokenMaker
, or null
if none matches the specified key.public abstract Set keySet()
public static void setDefaultInstance(TokenMakerFactory tmf)
TokenMakerFactory
instance. This is
the factory used by all future RSyntaxDocument
s by default.
RSyntaxDocument
s that have already been created are not
affected.
tmf
- The factory.
IllegalArgumentException
- If tmf
is
null
.getDefaultInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |