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
TokenMakers capable of splitting
text into tokens for those syntax styles.- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static TokenMakerFactoryThe singleton defaultTokenMakerFactoryinstance.static final StringIf this system property is set, a customTokenMakerFactoryof the specified class will be used as the default token maker factory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenMakerFactoryReturns the defaultTokenMakerFactoryinstance.final TokenMakergetTokenMaker(String key) Returns aTokenMakerfor the specified key.protected abstract TokenMakergetTokenMakerImpl(String key) Returns aTokenMakerfor the specified key.keySet()Returns the set of keys that this factory maps to token makers.static voidSets the defaultTokenMakerFactoryinstance.
-
Field Details
-
PROPERTY_DEFAULT_TOKEN_MAKER_FACTORY
If this system property is set, a customTokenMakerFactoryof the specified class will be used as the default token maker factory.- See Also:
-
DEFAULT_INSTANCE
The singleton defaultTokenMakerFactoryinstance.
-
-
Constructor Details
-
TokenMakerFactory
public TokenMakerFactory()
-
-
Method Details
-
getDefaultInstance
Returns the defaultTokenMakerFactoryinstance. This is the factory used by allRSyntaxDocuments by default.- Returns:
- The factory.
- See Also:
-
getTokenMaker
Returns aTokenMakerfor the specified key.- Parameters:
key- The key.- Returns:
- The corresponding
TokenMaker, orPlainTextTokenMakerif none matches the specified key.
-
getTokenMakerImpl
Returns aTokenMakerfor the specified key.- Parameters:
key- The key.- Returns:
- The corresponding
TokenMaker, ornullif 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 defaultTokenMakerFactoryinstance. This is the factory used by all futureRSyntaxDocuments by default.RSyntaxDocuments that have already been created are not affected.- Parameters:
tmf- The factory.- Throws:
IllegalArgumentException- Iftmfisnull.- See Also:
-