Class SpaceAtom

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class SpaceAtom
    extends Atom
    An atom representing whitespace. The dimension values can be set using different unit types.
    • Constructor Summary

      Constructors 
      Constructor Description
      SpaceAtom()  
      SpaceAtom​(int type)  
      SpaceAtom​(int unit, float width, float height, float depth)  
      SpaceAtom​(int widthUnit, float width, int heightUnit, float height, int depthUnit, float depth)  
    • Method Detail

      • checkUnit

        public static void checkUnit​(int unit)
                              throws InvalidUnitException
        Check if the given unit is valid
        Parameters:
        unit - the unit's integer representation (a constant)
        Throws:
        InvalidUnitException - if the given integer value does not represent a valid unit
      • getUnit

        public static int getUnit​(java.lang.String unit)
      • getLength

        public static float[] getLength​(java.lang.String lgth)
      • createBox

        public Box createBox​(TeXEnvironment env)
        Description copied from class: Atom
        Convert this atom into a Box, using properties set by "parent" atoms, like the TeX style, the last used font, color settings, ...
        Specified by:
        createBox in class Atom
        Parameters:
        env - the current environment settings
        Returns:
        the resulting box.
      • getFactor

        public static float getFactor​(int unit,
                                      TeXEnvironment env)