Class LayoutEnv


  • public class LayoutEnv
    extends GFXEnv
    A superclass of GFXEnv used by the layout package.
    • Constructor Detail

      • LayoutEnv

        public LayoutEnv()
        Instantiates a default layout environment.
      • LayoutEnv

        public LayoutEnv​(FontService oFontService,
                         Service oImageService,
                         HrefService oHrefService,
                         LayoutDriver oDriver)
        Instantiates a LayoutEnv from the given arguments.
        Parameters:
        oFontService - a font service.
        oImageService - an image service.
        oHrefService - an href service.
        oDriver - a layout driver.
    • Method Detail

      • layoutHandler

        public void layoutHandler​(LayoutHandler pHandler)
        Sets the layout handler that processes output from the layout.
        Parameters:
        pHandler - the object to redirect the draw responsibilities to.
      • layoutHandler

        public LayoutHandler layoutHandler()
        Gets the layout handler that processes output from the layout.
        Returns:
        LayoutHandler, the object to redirect the draw responsibilities to.
      • getHrefService

        public HrefService getHrefService()
        Gets the HrefService that will resolve href content for protoable node based on their content. It will load href urls and provide accessors to the required href information.
        Returns:
        the HrefService to resolve hrefs with.
      • setFontService

        public void setFontService​(FontService oFontService)
        Sets the font service to be used with this layout env.
      • getFontService

        public FontService getFontService()
        Gets the font service to be used with this layout env.
      • getTextContext

        public TextContext getTextContext()
        Gets the text context. The text context is an opaque AXTE object that allows the layout of multiple text to share a number of serially-reusable objects. These objects are expensive to create. layout code uses this common text context object when creating text objects, in order to effect that sharing.
        Returns:
        The text context object.
      • setModel

        public void setModel​(Model oModel)
        Sets the model. We will use this for creating new nodes.
        Parameters:
        oModel - a model.
      • getModel

        public Model getModel()
        Gets the model. We will use this for creating new nodes.
        Returns:
        a model.
      • setTextResolver

        public void setTextResolver​(TextResolver pResolver)
        Sets the text resolver interface - acts as callback for xfa:embed references
      • getTextResolver

        public TextResolver getTextResolver()
        Gets the text resolver interface - acts as callback for xfa:embed references
      • getLayoutDriver

        public LayoutDriver getLayoutDriver()
        Gets the LayoutDriver associated with this environment.
        Returns:
        a LayoutDriver.
      • getMetaFileData

        public int getMetaFileData​(byte[] pClipData,
                                   int size,
                                   Rect oDrawArea)
        Gets meta file data.
      • setClipRect

        public void setClipRect​(Rect oRect)
        sets the clipping rectangle.