Package docking.widgets.search
Class SearchLocationContextBuilder
java.lang.Object
docking.widgets.search.SearchLocationContextBuilder
A builder for
SearchLocationContext objects. Use append(String) for normal
text pieces. Use appendMatch(String) for text that is meant to be rendered specially
by the context class.-
Constructor Summary
Constructors -
Method Summary
ChangeModifier and TypeMethodDescriptionAppends the given text to this builder.appendMatch(String text) Appends the given text to this builder.build()Builds aSearchLocationContextusing the text supplied via theappendmethods.booleanisEmpty()Returns true if no text has been added to this builder.lineNumber(int line) Sets an optional line number for clients that use numbered lines.newline()Adds a newline character to the previously added text.toString()
-
Constructor Details
-
SearchLocationContextBuilder
public SearchLocationContextBuilder()
-
-
Method Details
-
append
Appends the given text to this builder.- Parameters:
text- the text- Returns:
- this builder
-
appendMatch
Appends the given text to this builder. This text represents a client-defined 'match' that will be rendered with markup whenSearchLocationContext.getBoldMatchingText()is called.- Parameters:
text- the text- Returns:
- this builder
-
lineNumber
Sets an optional line number for clients that use numbered lines. The line number will be prepended to the text form of the context.- Parameters:
line- the line number- Returns:
- this builder
-
newline
Adds a newline character to the previously added text.- Returns:
- this builder
-
build
Builds aSearchLocationContextusing the text supplied via theappendmethods.- Returns:
- the context
-
isEmpty
public boolean isEmpty()Returns true if no text has been added to this builder.- Returns:
- true if no text has been added to this builder
-
toString
-