Class Area

    • Field Detail

      • ORIENT_90

        public static final int ORIENT_90
        Rotated 90 degrees clockwise
        See Also:
        Constant Field Values
      • ORIENT_270

        public static final int ORIENT_270
        Rotated 270 degrees clockwise
        See Also:
        Constant Field Values
      • CLASS_ABSOLUTE

        public static final int CLASS_ABSOLUTE
        Absolute position class
        See Also:
        Constant Field Values
      • CLASS_BEFORE_FLOAT

        public static final int CLASS_BEFORE_FLOAT
        Before float class
        See Also:
        Constant Field Values
      • CLASS_SIDE_FLOAT

        public static final int CLASS_SIDE_FLOAT
        Side float class
        See Also:
        Constant Field Values
      • areaClass

        private int areaClass
      • ipd

        protected int ipd
        the area's inline-progression-dimension
      • bpd

        protected int bpd
        the area's block-progression-dimension
      • effectiveIPD

        protected int effectiveIPD
      • bidiLevel

        protected int bidiLevel
        Resolved bidirectional level for area.
      • traits

        protected java.util.TreeMap<java.lang.Integer,​java.lang.Object> traits
        Traits for this area.
      • log

        protected static final org.apache.commons.logging.Log log
        logging instance
      • changeBarList

        private java.util.List<ChangeBar> changeBarList
        The active change bar list
    • Constructor Detail

      • Area

        public Area()
    • Method Detail

      • getChangeBarList

        public java.util.List<ChangeBar> getChangeBarList()
        Returns the active change bar list.
        Returns:
        The active change bar list
      • setChangeBarList

        public void setChangeBarList​(java.util.List<ChangeBar> changeBarList)
        Sets the active change bar list.
        Parameters:
        changeBarList - The active change bar list
      • getAreaClass

        public int getAreaClass()
        Get the area class of this area.
        Returns:
        the area class
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class AreaTreeObject
        Throws:
        java.lang.CloneNotSupportedException
      • setAreaClass

        public void setAreaClass​(int areaClass)
        Set the area class of this area.
        Parameters:
        areaClass - the area class
      • setIPD

        public void setIPD​(int ipd)
        Set the inline progression dimension of content rectangle for this area.
        Parameters:
        ipd - the new inline progression dimension
        See Also:
        ipd
      • getIPD

        public int getIPD()
        Get the inline progression dimension of the content rectangle for this area.
        Returns:
        the inline progression dimension
        See Also:
        ipd
      • setBPD

        public void setBPD​(int bpd)
        Set the block progression dimension of the content rectangle for this area.
        Parameters:
        bpd - the new block progression dimension
        See Also:
        bpd
      • getBPD

        public int getBPD()
        Get the block progression dimension of the content rectangle for this area.
        Returns:
        the block progression dimension
        See Also:
        bpd
      • getAllocIPD

        public int getAllocIPD()
        Get the allocation inline progression dimension of this area. This adds the content, borders and the padding to find the total allocated IPD.
        Returns:
        the total IPD allocation for this area
      • getEffectiveAllocIPD

        public int getEffectiveAllocIPD()
      • getAllocBPD

        public int getAllocBPD()
        Get the allocation block progression dimension of this area. This adds the content, borders, padding and spaces to find the total allocated BPD.
        Returns:
        the total BPD allocation for this area
      • setBidiLevel

        public void setBidiLevel​(int bidiLevel)
        Set the bidirectional embedding level.
        Parameters:
        bidiLevel - the bidirectional embedding level
      • resetBidiLevel

        public void resetBidiLevel()
        Reset the bidirectional embedding level to default value (-1).
      • getBidiLevel

        public int getBidiLevel()
        Get the bidirectional embedding level.
        Returns:
        the bidirectional embedding level
      • getBorderAndPaddingWidthBefore

        public int getBorderAndPaddingWidthBefore()
        Return the sum of region border- and padding-before
        Returns:
        width in millipoints
      • getBorderAndPaddingWidthAfter

        public int getBorderAndPaddingWidthAfter()
        Return the sum of region border- and padding-after
        Returns:
        width in millipoints
      • getBorderAndPaddingWidthStart

        public int getBorderAndPaddingWidthStart()
        Return the sum of region border- and padding-start
        Returns:
        width in millipoints
      • getBorderAndPaddingWidthEnd

        public int getBorderAndPaddingWidthEnd()
        Return the sum of region border- and padding-end
        Returns:
        width in millipoints
      • getSpaceBefore

        public int getSpaceBefore()
        Returns the space before
        Returns:
        width in millipoints
      • getSpaceAfter

        public int getSpaceAfter()
        Returns the space after
        Returns:
        width in millipoints
      • getSpaceStart

        public int getSpaceStart()
        Returns the space start
        Returns:
        width in millipoints
      • getSpaceEnd

        public int getSpaceEnd()
        Returns the space end
        Returns:
        width in millipoints
      • addChildArea

        public void addChildArea​(Area child)
        Add a child to this area. The default is to do nothing. Subclasses must override to do something if they can have child areas.
        Parameters:
        child - the child area to add
      • addTrait

        public void addTrait​(java.lang.Integer traitCode,
                             java.lang.Object prop)
        Add a trait to this area.
        Parameters:
        traitCode - the trait key
        prop - the value of the trait
      • setTraits

        public void setTraits​(java.util.Map traits)
        Set traits on this area, copying from an existing traits map.
        Parameters:
        traits - the map of traits
      • getTraits

        public java.util.Map<java.lang.Integer,​java.lang.Object> getTraits()
        Get the map of all traits on this area.
        Returns:
        the map of traits
      • hasTraits

        public boolean hasTraits()
        Returns:
        true if the area has traits
      • getTrait

        public java.lang.Object getTrait​(java.lang.Integer traitCode)
        Get a trait from this area.
        Parameters:
        traitCode - the trait key
        Returns:
        the trait value
      • hasTrait

        public boolean hasTrait​(java.lang.Integer traitCode)
        Checks whether a certain trait is set on this area.
        Parameters:
        traitCode - the trait key
        Returns:
        true if the trait is set
      • getTraitAsBoolean

        public boolean getTraitAsBoolean​(java.lang.Integer traitCode)
        Get a boolean trait from this area.
        Parameters:
        traitCode - the trait key
        Returns:
        the trait value
      • getTraitAsInteger

        public int getTraitAsInteger​(java.lang.Integer traitCode)
        Get a trait from this area as an integer.
        Parameters:
        traitCode - the trait key
        Returns:
        the trait value
      • setWritingModeTraits

        public void setWritingModeTraits​(WritingModeTraitsGetter wmtg)
        Sets the writing mode traits for this area. Default implementation does nothing.
        Parameters:
        wmtg - a WM traits getter
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        ipd and bpd of area
      • getEffectiveIPD

        public int getEffectiveIPD()
      • activateEffectiveIPD

        public void activateEffectiveIPD()