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 aLayoutEnvfrom the given arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FontServicegetFontService()Gets the font service to be used with this layout env.HrefServicegetHrefService()Gets the HrefService that will resolve href content for protoable node based on their content.LayoutDrivergetLayoutDriver()Gets the LayoutDriver associated with this environment.intgetMetaFileData(byte[] pClipData, int size, Rect oDrawArea)Gets meta file data.ModelgetModel()Gets the model.TextContextgetTextContext()Gets the text context.TextResolvergetTextResolver()Gets the text resolver interface - acts as callback for xfa:embed referencesLayoutHandlerlayoutHandler()Gets the layout handler that processes output from the layout.voidlayoutHandler(LayoutHandler pHandler)Sets the layout handler that processes output from the layout.booleanrenderText(LayoutHandler oLayoutHandler, TextDisplay oDisplay, CoordPair oOffset, boolean bWrap, boolean bTruncate, Angle oAngle, Rect oInvalidatedRect)booleanrenderText(LayoutHandler oLayoutHandler, TextDisplay oDisplay, CoordPair oOffset, boolean bWrap, boolean bTruncate, Rect oInvalidatedRect)voidsetClipRect(Rect oRect)sets the clipping rectangle.LayoutDriversetDriver(LayoutDriver oDriver)Sets the driver, returning previousvoidsetFontService(FontService oFontService)Sets the font service to be used with this layout env.voidsetModel(Model oModel)Sets the model.voidsetTextResolver(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 aLayoutEnvfrom 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)
-
-