Package com.adobe.xfa.layout
Class LayoutEnv
- java.lang.Object
-
- com.adobe.xfa.gfx.GFXEnv
-
- com.adobe.xfa.layout.LayoutEnv
-
public class LayoutEnv extends GFXEnv
A superclass of GFXEnv used by the layout package.
-
-
Field Summary
-
Fields inherited from class com.adobe.xfa.gfx.GFXEnv
FIT_BOTTOM, FIT_CENTRE, FIT_LEFT, FIT_MIDDLE, FIT_RIGHT, FIT_TOP
-
-
Constructor Summary
Constructors Constructor Description LayoutEnv()
Instantiates a default layout environment.LayoutEnv(FontService oFontService, Service oImageService, HrefService oHrefService, LayoutDriver oDriver)
Instantiates aLayoutEnv
from the given arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FontService
getFontService()
Gets the font service to be used with this layout env.HrefService
getHrefService()
Gets the HrefService that will resolve href content for protoable node based on their content.LayoutDriver
getLayoutDriver()
Gets the LayoutDriver associated with this environment.int
getMetaFileData(byte[] pClipData, int size, Rect oDrawArea)
Gets meta file data.Model
getModel()
Gets the model.TextContext
getTextContext()
Gets the text context.TextResolver
getTextResolver()
Gets the text resolver interface - acts as callback for xfa:embed referencesLayoutHandler
layoutHandler()
Gets the layout handler that processes output from the layout.void
layoutHandler(LayoutHandler pHandler)
Sets the layout handler that processes output from the layout.boolean
renderText(LayoutHandler oLayoutHandler, TextDisplay oDisplay, CoordPair oOffset, boolean bWrap, boolean bTruncate, Angle oAngle, Rect oInvalidatedRect)
boolean
renderText(LayoutHandler oLayoutHandler, TextDisplay oDisplay, CoordPair oOffset, boolean bWrap, boolean bTruncate, Rect oInvalidatedRect)
void
setClipRect(Rect oRect)
sets the clipping rectangle.LayoutDriver
setDriver(LayoutDriver oDriver)
Sets the driver, returning previousvoid
setFontService(FontService oFontService)
Sets the font service to be used with this layout env.void
setModel(Model oModel)
Sets the model.void
setTextResolver(TextResolver pResolver)
Sets the text resolver interface - acts as callback for xfa:embed references-
Methods inherited from class com.adobe.xfa.gfx.GFXEnv
background, background, defaultColours, defaultColours, devH, devPoint, devRect, devW, devX, devY, displayAsPages, displayAsPages, draw3dEffects, draw3dEffects, driverAttach, driverAttach, driverDetach, driverDetach, eraseBg, fit, fit, fitPage, fitSides, fontService, fontService, getDriver, height, heightInAbsUnits, infoEnv, interactive, interactive, invalidateArea, legacyPositioning, legacyPositioning, refresh, scale, unitH, unitPoint, unitRect, unitW, unitX, unitY, validDriver, visibleArea, width, widthInAbsUnits
-
-
-
-
Constructor Detail
-
LayoutEnv
public LayoutEnv()
Instantiates a default layout environment.
-
LayoutEnv
public LayoutEnv(FontService oFontService, Service oImageService, HrefService oHrefService, LayoutDriver oDriver)
Instantiates aLayoutEnv
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.
-
setDriver
public LayoutDriver setDriver(LayoutDriver oDriver)
Sets the driver, returning previous
-
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.
-
renderText
public boolean renderText(LayoutHandler oLayoutHandler, TextDisplay oDisplay, CoordPair oOffset, boolean bWrap, boolean bTruncate, Rect oInvalidatedRect)
-
renderText
public boolean renderText(LayoutHandler oLayoutHandler, TextDisplay oDisplay, CoordPair oOffset, boolean bWrap, boolean bTruncate, Angle oAngle, Rect oInvalidatedRect)
-
-