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.Object
A base class to position, align, etc, objects within a given environment.
-
-
Field Summary
Fields Modifier and Type Field Description static int
FIT_BOTTOM
static int
FIT_CENTRE
static int
FIT_LEFT
static int
FIT_MIDDLE
static int
FIT_RIGHT
static int
FIT_TOP
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GFXFillAttr
background()
void
background(GFXFillAttr oBackground)
boolean
defaultColours()
void
defaultColours(boolean bDefaultColours)
int
devH(UnitSpan oHeight)
GFXDevPoint
devPoint(CoordPair oPoint)
GFXDevRect
devRect(Rect oRect)
int
devW(UnitSpan oWidth)
int
devX(UnitSpan oX)
int
devY(UnitSpan oY)
boolean
displayAsPages()
void
displayAsPages(boolean bDisplayAsPages)
boolean
draw3dEffects()
void
draw3dEffects(boolean b3dEffects)
GFXDriver
driverAttach()
GFXDriver
driverAttach(GFXModelContext poModelContext)
Attach/create a driver instance to render the given model context in this view.void
driverDetach()
void
driverDetach(GFXModelContext poModelContext)
Detach/release a driver instance previously created to render the given model context in this view.boolean
eraseBg()
void
fit(double dScale, CoordPair oOrigin, int nFit)
void
fit(double dScale, CoordPair oOrigin, int nFit, boolean bInvalidate)
void
fitPage(Rect oPageRect)
void
fitSides(UnitSpan oLeft, UnitSpan oRight, UnitSpan oY, int nFit)
FontService
fontService()
void
fontService(FontService poNewService)
GFXDriver
getDriver()
int
height()
UnitSpan
heightInAbsUnits()
boolean
infoEnv()
boolean
interactive()
void
interactive(boolean bInteractive)
void
invalidateArea(GFXModelContext poModelContext, Rect oInvalidArea, boolean bEraseBG)
Invalidate some part of a given model context in this view.boolean
legacyPositioning()
void
legacyPositioning(boolean bLegacyPositioning)
void
refresh()
double
scale()
UnitSpan
unitH(int lHeight)
CoordPair
unitPoint(int lX, int lY)
Rect
unitRect(int lLeft, int lTop, int lRight, int lBottom)
UnitSpan
unitW(int lWidth)
UnitSpan
unitX(int lX)
UnitSpan
unitY(int lY)
GFXDriver
validDriver()
Rect
visibleArea()
int
width()
UnitSpan
widthInAbsUnits()
-
-
-
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()
-
-