Package docking.widgets.search
Class SearchLocationContext
java.lang.Object
docking.widgets.search.SearchLocationContext
A class to hold context representation for
SearchLocations.- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchLocationContextget(SearchLocationContext context) A factory method to provided as a convenience to handle null context objects.static SearchLocationContextA factory method to create a context instance with the given text.Returns HTML text for this context.Returns text that is helpful for debugging, such as printing to a console.Returns any sub-strings of this context's overall text that match client-defined input See theSearchLocationContextBuilderfor how to define matching text piecesThe full plain text of this context.toString()
-
Field Details
-
EMPTY_CONTEXT
-
-
Method Details
-
get
A factory method to create a context instance with the given text. The context created this way will have no special HTML formatting applied bygetBoldMatchingText(), as no matching parts will be defined.- Parameters:
text- the text- Returns:
- the context
-
get
A factory method to provided as a convenience to handle null context objects.- Parameters:
context- the context to verify is not null- Returns:
- the given context or the
EMPTY_CONTEXTif the given context is null
-
getPlainText
The full plain text of this context.- Returns:
- the text
-
getDebugText
Returns text that is helpful for debugging, such as printing to a console.- Returns:
- the text
-
getBoldMatchingText
Returns HTML text for this context. Any matching items embedded in the returned string will be bold.- Returns:
- the text
-
getMatches
Returns any sub-strings of this context's overall text that match client-defined input See theSearchLocationContextBuilderfor how to define matching text pieces- Returns:
- the matching strings
-
toString
-