*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
final Highlighter highlighter) {
this.defaultColor = defaultColor;
this.highlighter = highlighter;
final Highlighter highlighter) {
this.defaultColor = defaultColor;
this.highlighter = highlighter;
// TODO: figure out how to handle the tab character. Do we have a
// global tab stops list and current word position?
// TODO: figure out how to handle the tab character. Do we have a
// global tab stops list and current word position?
&& Character.isWhitespace(ch)
) {
// Adding to a whitespace word, keep at it.
&& Character.isWhitespace(ch)
) {
// Adding to a whitespace word, keep at it.
return this;
}
if (!Character.isWhitespace(text.charAt(0))
&& !Character.isWhitespace(ch)
) {
// Adding to a non-whitespace word, keep at it.
return this;
}
if (!Character.isWhitespace(text.charAt(0))
&& !Character.isWhitespace(ch)
) {
// Adding to a non-whitespace word, keep at it.