Enum Class Direction
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<Direction>
,Constable
PangoDirection
represents a direction in the Unicode bidirectional
algorithm.
Not every value in this enumeration makes sense for every usage of
PangoDirection
; for example, the return value of Pango.unicharDirection(int)
and Pango.findBaseDir(java.lang.String, int)
cannot be PANGO_DIRECTION_WEAK_LTR
or
PANGO_DIRECTION_WEAK_RTL
, since every character is either neutral
or has a strong direction; on the other hand PANGO_DIRECTION_NEUTRAL
doesn't make sense to pass to Pango.itemizeWithBaseDir(org.gnome.pango.Context, org.gnome.pango.Direction, java.lang.String, int, int, org.gnome.pango.AttrList, org.gnome.pango.AttrIterator)
.
The PANGO_DIRECTION_TTB_LTR
, PANGO_DIRECTION_TTB_RTL
values come from
an earlier interpretation of this enumeration as the writing direction
of a block of text and are no longer used. See PangoGravity
for how
vertical text is handled in Pango.
If you are interested in text direction, you should really use fribidi
directly. PangoDirection
is only retained because it is used in some
public apis.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA strong left-to-right directionNo direction specifiedA strong right-to-left directionDeprecated value; treated the same asPANGO_DIRECTION_RTL
.Deprecated value; treated the same asPANGO_DIRECTION_LTR
A weak left-to-right directionA weak right-to-left direction -
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the Direction classint
getValue()
Get the numeric value of this enumstatic Direction
of
(int value) Create a new Direction for the provided valuestatic Direction
Returns the enum constant of this class with the specified name.static Direction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LTR
A strong left-to-right direction -
RTL
A strong right-to-left direction -
TTB_LTR
Deprecated value; treated the same asPANGO_DIRECTION_RTL
. -
TTB_RTL
Deprecated value; treated the same asPANGO_DIRECTION_LTR
-
WEAK_LTR
A weak left-to-right direction -
WEAK_RTL
A weak right-to-left direction -
NEUTRAL
No direction specified
-
-
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
-
of
Create a new Direction for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-