Class InlineRun
java.lang.Object
org.apache.fop.complexscripts.bidi.InlineRun
The
InlineRun
class is a utility class, the instances of which are used
to capture a sequence of reordering levels associated with an inline area.
This work was originally authored by Glenn Adams (gadams@apache.org).
-
Constructor Summary
ConstructorDescriptionInlineRun
(InlineArea inline, int[] levels) Primary constructor.InlineRun
(InlineArea inline, int level, int count) Alternate constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Obtain inline area that generated this inline run.int
Obtain maximum bidi level for this run.int
Obtain minimum bidi level for this run.int
hashCode()
boolean
Determine if this run has homogenous (same valued) bidi levels.boolean
Determine if run needs mirroring.void
maybeReverseWord
(boolean mirror) Reverse inline area if it is a word area and it requires reversal.void
reverse()
Reverse run (by incrementing reversal count, not actually reversing).split()
Split this inline run into homogenous runs.toString()
void
updateMinMax
(int[] mm) Update a min/max array to correspond with this run's min/max values.
-
Constructor Details
-
InlineRun
Primary constructor.- Parameters:
inline
- which generated this inline runlevels
- levels array
-
InlineRun
Alternate constructor.- Parameters:
inline
- which generated this inline runlevel
- for each indexcount
- of indices
-
-
Method Details
-
getInline
Obtain inline area that generated this inline run.- Returns:
- inline area that generated this inline run.
-
getMinLevel
public int getMinLevel()Obtain minimum bidi level for this run.- Returns:
- minimum bidi level
-
getMaxLevel
public int getMaxLevel()Obtain maximum bidi level for this run.- Returns:
- maximum bidi level
-
isHomogenous
public boolean isHomogenous()Determine if this run has homogenous (same valued) bidi levels.- Returns:
- true if homogenous
-
split
Split this inline run into homogenous runs.- Returns:
- list of new runs
-
updateMinMax
public void updateMinMax(int[] mm) Update a min/max array to correspond with this run's min/max values.- Parameters:
mm
- reference to min/max array
-
maybeNeedsMirroring
public boolean maybeNeedsMirroring()Determine if run needs mirroring.- Returns:
- true if run is homogenous and (positive) odd (i.e., right to left)
-
reverse
public void reverse()Reverse run (by incrementing reversal count, not actually reversing). -
maybeReverseWord
public void maybeReverseWord(boolean mirror) Reverse inline area if it is a word area and it requires reversal.- Parameters:
mirror
- if true then also mirror characters
-
equals
-
hashCode
public int hashCode() -
toString
-