Package org.fife.ui.rsyntaxtextarea
Class TokenMakerFactory
java.lang.Object
org.fife.ui.rsyntaxtextarea.TokenMakerFactory
- Direct Known Subclasses:
AbstractTokenMakerFactory
A factory that maps syntax styles to
TokenMaker
s capable of splitting
text into tokens for those syntax styles.- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static TokenMakerFactory
The singleton defaultTokenMakerFactory
instance.static final String
If this system property is set, a customTokenMakerFactory
of the specified class will be used as the default token maker factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenMakerFactory
Returns the defaultTokenMakerFactory
instance.final TokenMaker
getTokenMaker
(String key) Returns aTokenMaker
for the specified key.protected abstract TokenMaker
getTokenMakerImpl
(String key) Returns aTokenMaker
for the specified key.keySet()
Returns the set of keys that this factory maps to token makers.static void
Sets the defaultTokenMakerFactory
instance.
-
Field Details
-
PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY
If this system property is set, a customTokenMakerFactory
of the specified class will be used as the default token maker factory.- See Also:
-
DEFAULT_INSTANCE
The singleton defaultTokenMakerFactory
instance.
-
-
Constructor Details
-
TokenMakerFactory
public TokenMakerFactory()
-
-
Method Details
-
getDefaultInstance
Returns the defaultTokenMakerFactory
instance. This is the factory used by allRSyntaxDocument
s by default.- Returns:
- The factory.
- See Also:
-
getTokenMaker
Returns aTokenMaker
for the specified key.- Parameters:
key
- The key.- Returns:
- The corresponding
TokenMaker
, orPlainTextTokenMaker
if none matches the specified key.
-
getTokenMakerImpl
Returns aTokenMaker
for the specified key.- Parameters:
key
- The key.- Returns:
- The corresponding
TokenMaker
, ornull
if none matches the specified key.
-
keySet
Returns the set of keys that this factory maps to token makers.- Returns:
- The set of keys.
-
setDefaultInstance
Sets the defaultTokenMakerFactory
instance. This is the factory used by all futureRSyntaxDocument
s by default.RSyntaxDocument
s that have already been created are not affected.- Parameters:
tmf
- The factory.- Throws:
IllegalArgumentException
- Iftmf
isnull
.- See Also:
-