fop 2.1

org.apache.fop.complexscripts.bidi
Class InlineRun

java.lang.Object
  extended by org.apache.fop.complexscripts.bidi.InlineRun

public class InlineRun
extends java.lang.Object

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
InlineRun(InlineArea inline, int[] levels)
          Primary constructor.
InlineRun(InlineArea inline, int level, int count)
          Alternate constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 InlineArea getInline()
          Obtain inline area that generated this inline run.
 int getMaxLevel()
          Obtain maximum bidi level for this run.
 int getMinLevel()
          Obtain minimum bidi level for this run.
 int hashCode()
           
 boolean isHomogenous()
          Determine if this run has homogenous (same valued) bidi levels.
 boolean maybeNeedsMirroring()
          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).
 java.util.List split()
          Split this inline run into homogenous runs.
 java.lang.String toString()
           
 void updateMinMax(int[] mm)
          Update a min/max array to correspond with this run's min/max values.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InlineRun

public InlineRun(InlineArea inline,
                 int[] levels)
Primary constructor.

Parameters:
inline - which generated this inline run
levels - levels array

InlineRun

public InlineRun(InlineArea inline,
                 int level,
                 int count)
Alternate constructor.

Parameters:
inline - which generated this inline run
level - for each index
count - of indices
Method Detail

getInline

public InlineArea 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

public java.util.List 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

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

fop 2.1

Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.