Package com.adobe.xfa.gfx
Class GFXEnv
- java.lang.Object
-
- com.adobe.xfa.gfx.GFXEnv
-
- Direct Known Subclasses:
LayoutEnv
public abstract class GFXEnv extends java.lang.ObjectA base class to position, align, etc, objects within a given environment.
-
-
Field Summary
Fields Modifier and Type Field Description static intFIT_BOTTOMstatic intFIT_CENTREstatic intFIT_LEFTstatic intFIT_MIDDLEstatic intFIT_RIGHTstatic intFIT_TOP
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GFXFillAttrbackground()voidbackground(GFXFillAttr oBackground)booleandefaultColours()voiddefaultColours(boolean bDefaultColours)intdevH(UnitSpan oHeight)GFXDevPointdevPoint(CoordPair oPoint)GFXDevRectdevRect(Rect oRect)intdevW(UnitSpan oWidth)intdevX(UnitSpan oX)intdevY(UnitSpan oY)booleandisplayAsPages()voiddisplayAsPages(boolean bDisplayAsPages)booleandraw3dEffects()voiddraw3dEffects(boolean b3dEffects)GFXDriverdriverAttach()GFXDriverdriverAttach(GFXModelContext poModelContext)Attach/create a driver instance to render the given model context in this view.voiddriverDetach()voiddriverDetach(GFXModelContext poModelContext)Detach/release a driver instance previously created to render the given model context in this view.booleaneraseBg()voidfit(double dScale, CoordPair oOrigin, int nFit)voidfit(double dScale, CoordPair oOrigin, int nFit, boolean bInvalidate)voidfitPage(Rect oPageRect)voidfitSides(UnitSpan oLeft, UnitSpan oRight, UnitSpan oY, int nFit)FontServicefontService()voidfontService(FontService poNewService)GFXDrivergetDriver()intheight()UnitSpanheightInAbsUnits()booleaninfoEnv()booleaninteractive()voidinteractive(boolean bInteractive)voidinvalidateArea(GFXModelContext poModelContext, Rect oInvalidArea, boolean bEraseBG)Invalidate some part of a given model context in this view.booleanlegacyPositioning()voidlegacyPositioning(boolean bLegacyPositioning)voidrefresh()doublescale()UnitSpanunitH(int lHeight)CoordPairunitPoint(int lX, int lY)RectunitRect(int lLeft, int lTop, int lRight, int lBottom)UnitSpanunitW(int lWidth)UnitSpanunitX(int lX)UnitSpanunitY(int lY)GFXDrivervalidDriver()RectvisibleArea()intwidth()UnitSpanwidthInAbsUnits()
-
-
-
Field Detail
-
FIT_LEFT
public static final int FIT_LEFT
- See Also:
- Constant Field Values
-
FIT_CENTRE
public static final int FIT_CENTRE
- See Also:
- Constant Field Values
-
FIT_RIGHT
public static final int FIT_RIGHT
- See Also:
- Constant Field Values
-
FIT_TOP
public static final int FIT_TOP
- See Also:
- Constant Field Values
-
FIT_MIDDLE
public static final int FIT_MIDDLE
- See Also:
- Constant Field Values
-
FIT_BOTTOM
public static final int FIT_BOTTOM
- See Also:
- Constant Field Values
-
-
Method Detail
-
background
public GFXFillAttr background()
-
background
public void background(GFXFillAttr oBackground)
-
defaultColours
public boolean defaultColours()
-
defaultColours
public void defaultColours(boolean bDefaultColours)
-
draw3dEffects
public boolean draw3dEffects()
-
draw3dEffects
public void draw3dEffects(boolean b3dEffects)
-
displayAsPages
public boolean displayAsPages()
-
displayAsPages
public void displayAsPages(boolean bDisplayAsPages)
-
devH
public int devH(UnitSpan oHeight)
-
devPoint
public GFXDevPoint devPoint(CoordPair oPoint)
-
devRect
public GFXDevRect devRect(Rect oRect)
-
devW
public int devW(UnitSpan oWidth)
-
devX
public int devX(UnitSpan oX)
-
devY
public int devY(UnitSpan oY)
-
driverAttach
public GFXDriver driverAttach()
-
driverAttach
public GFXDriver driverAttach(GFXModelContext poModelContext)
Attach/create a driver instance to render the given model context in this view.Attaching with different model contexts will likely produce different driver instances--instances that are aware of the co-ordinate spaces of their respective model contexts.
The default implementation simply calls the existing overload of DriverAttach() that has no parameters.
- Parameters:
poModelContext- - Pointer to model context for the driver instance.- Returns:
- Pointer to a driver instance the client can use to render the given model context in this view.
-
driverDetach
public void driverDetach()
-
driverDetach
public void driverDetach(GFXModelContext poModelContext)
Detach/release a driver instance previously created to render the given model context in this view.The default implementation simply calls the existing overload of DriverDetach() that has no parameters.
- Parameters:
poModelContext- - Pointer to model context for the driver instance.
-
eraseBg
public boolean eraseBg()
-
fit
public void fit(double dScale, CoordPair oOrigin, int nFit, boolean bInvalidate)
-
fit
public void fit(double dScale, CoordPair oOrigin, int nFit)
-
fitPage
public void fitPage(Rect oPageRect)
-
fontService
public FontService fontService()
-
fontService
public void fontService(FontService poNewService)
-
getDriver
public GFXDriver getDriver()
-
height
public int height()
-
heightInAbsUnits
public UnitSpan heightInAbsUnits()
-
infoEnv
public boolean infoEnv()
-
interactive
public boolean interactive()
-
interactive
public void interactive(boolean bInteractive)
-
legacyPositioning
public boolean legacyPositioning()
-
legacyPositioning
public void legacyPositioning(boolean bLegacyPositioning)
-
invalidateArea
public void invalidateArea(GFXModelContext poModelContext, Rect oInvalidArea, boolean bEraseBG)
Invalidate some part of a given model context in this view.The default implementation simply calls the existing overload of InvalidateArea() that is not model context aware.
- Parameters:
poModelContext- - Pointer to model context for the driver instance.oInvalidArea- - Rectangular area to invalidate. This will be in the co-ordinate space of the given model context.bEraseBG- - True if the background is to be erased first; false if not.
-
refresh
public void refresh()
-
scale
public double scale()
-
unitH
public UnitSpan unitH(int lHeight)
-
unitPoint
public CoordPair unitPoint(int lX, int lY)
-
unitRect
public Rect unitRect(int lLeft, int lTop, int lRight, int lBottom)
-
unitW
public UnitSpan unitW(int lWidth)
-
unitX
public UnitSpan unitX(int lX)
-
unitY
public UnitSpan unitY(int lY)
-
visibleArea
public Rect visibleArea()
-
width
public int width()
-
widthInAbsUnits
public UnitSpan widthInAbsUnits()
-
validDriver
public GFXDriver validDriver()
-
-