Package limn.graphics
Enum Class ShapedText.Affinity
- All Implemented Interfaces:
Serializable,Comparable<ShapedText.Affinity>,Constable
- Enclosing class:
ShapedText
Which side of a char index a caret sits on, and so which of the two points that index can
occupy is meant.
A widget that stores this alongside the index is a widget whose caret survives a click on either side of a direction boundary and two arrow presses in a row. One that does not should draw both positions rather than pick one.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe caret belongs to the character at the index and draws at its leading edge.The caret belongs to the character before the index and draws at its trailing edge. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShapedText.AffinityReturns the enum constant of this class with the specified name.static ShapedText.Affinity[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UPSTREAM
The caret belongs to the character before the index and draws at its trailing edge. This is the side a caret takes after typing: the text just inserted is what the caret trails, so the next character of the same script appears where the caret is. -
DOWNSTREAM
The caret belongs to the character at the index and draws at its leading edge. The side to take when there is nothing better to go on — a caret placed programmatically, or restored with the text.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-