Class TextSelection.Spans
java.lang.Object
com.codename1.ui.TextSelection.Spans
- All Implemented Interfaces:
Iterable<TextSelection.Span>
- Enclosing class:
TextSelection
Encapsulates a collection of Spans.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TextSelection.Span span) Adds the given span to the collection, if it is non-empty.voidadd(TextSelection.Spans spans) Adds all of the non-empty spans in the given spans collection to the current spans collection.charAt(int x, int y) voidclear()Removes all spans.first()Gets the first span in the collection.getIntersection(Rectangle bounds, boolean b) getText()Gets the text contained in this spans collection.booleanisEmpty()iterator()last()Gets the last span in the collection.spanOfCharAt(int x, int y) toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
Spans
public Spans()
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<TextSelection.Span>
-
add
Adds all of the non-empty spans in the given spans collection to the current spans collection.
Parameters
spans
-
clear
public void clear()Removes all spans. -
add
Adds the given span to the collection, if it is non-empty.
Parameters
span
-
first
Gets the first span in the collection. -
last
Gets the last span in the collection. -
getText
Gets the text contained in this spans collection. -
toString
-
getIntersection
-
isEmpty
public boolean isEmpty() -
charAt
-
spanOfCharAt
-