com.jniwrapper.win32.com
Class AbstractOleControl
java.lang.Object
com.jniwrapper.win32.com.server.IUnknownServer
com.jniwrapper.win32.com.server.IDispatchServer
com.jniwrapper.win32.com.DispatchComServer
com.jniwrapper.win32.com.AbstractOleControl
- All Implemented Interfaces:
- AutoDeleteParameter, IDispatch, IOleControl, IOleInPlaceActiveObject, IOleInPlaceObject, IOleObject, IOleWindow, IUnknown, IViewObject, IViewObject2
- public abstract class AbstractOleControl
- extends DispatchComServer
- implements IOleControl, IOleObject, IOleWindow, IViewObject, IViewObject2, IOleInPlaceObject, IOleInPlaceActiveObject
An abstract implementation of OLE control, which allows to create new OLE control from a Swing component.
This is a helper class that provides a basic implementation of IOleObject
, IViewObject2
and IOleInPlaceObject
interfaces which
are required for implpementation of an OLE control.
Any derived class should implement initUI()
method. It is designed to create a Swing UI of the OLE component.
The getContentWindow()
provides an access to a content window.
Method Summary |
Int32 |
advise(IAdviseSink adviseSink)
|
void |
close(OleClose saveOption)
|
void |
contextSensitiveHelp(VariantBool fEnterMode)
|
void |
doVerb(LongInt verb,
Msg msg,
IOleClientSite activeSite,
LongInt lindex,
Wnd parent,
Rect posRect)
|
void |
draw(DvAspect dwDrawAspect,
Int32 lindex,
DvAspectInfo pvAspect,
DvTargetDevice ptd,
Int32 hdcTargetDev,
Int32 hdcDraw,
Rect lprcBounds,
Rect lprcWBounds,
Int32 pfnContinue,
Int32 dwContinue)
|
void |
enableModeless(VariantBool fEnable)
|
IEnumStatData |
enumAdvise()
|
IEnumOleVerb |
enumVerbs()
|
Int32 |
freeze(DvAspect dwDrawAspect,
Int32 lindex,
DvAspectInfo pvAspect)
|
void |
freezeEvents(VariantBool bFreeze)
|
void |
getAdvise(DvAspect pAspects,
AdviceFlags pAdvf,
IAdviseSink pIAdviseSink)
|
IOleClientSite |
getClientSite()
|
IDataObject |
getClipboardData(Int32 dwReserved)
|
Pointer |
getColorSet(DvAspect dwDrawAspect,
Int32 lindex,
DvAspectInfo pvAspect,
DvTargetDevice ptd,
Int32 hicTargetDev)
|
java.awt.Container |
getContentPane()
Returns container window. |
java.awt.Container |
getContentWindow()
Deprecated. use getContentPane() |
ControlInfo |
getControlInfo()
|
Size |
getExtent(DvAspect drawAspect)
|
Size |
getExtent(DvAspect dwDrawAspect,
Int32 lindex,
DvTargetDevice ptd)
|
OleMisc |
getMiscStatus(DvAspect aspect)
|
IMoniker |
getMoniker(OleGetMoniker assign,
OleWhichMk whichMoniker)
|
OleStr |
getUserType(UserClassType formOfType)
|
Wnd |
getWindow()
|
void |
initFromData(IDataObject dataObject,
VariantBool creation,
Int32 reserved)
|
protected abstract void |
initUI()
Initialize Swing UI. |
void |
inPlaceDeactivate()
|
void |
isUpToDate()
|
void |
onAmbientPropertyChange(DispID dispID)
|
void |
onDocWindowActivate(VariantBool fActivate)
|
void |
onFrameWindowActivate(VariantBool fActivate)
|
void |
onMnemonic(Msg pMsg)
|
void |
reactivateAndUndo()
|
void |
resizeBorder(Rect prcBorder,
IOleInPlaceUIWindow pUIWindow,
VariantBool fFrameWindow)
|
void |
setAdvise(DvAspect aspects,
AdviceFlags advf,
IAdviseSink pIAdviseSink)
|
void |
setClientSite(IOleClientSite clientSite)
|
void |
setColorScheme(LogPalette logPal)
|
void |
setExtent(DvAspect drawAspect,
Size size)
|
void |
setHostNames(OleStr containerApp,
OleStr containerObj)
|
void |
setMoniker(OleWhichMk whichMoniker,
IMoniker moniker)
|
void |
setObjectRects(Rect lprcPosRect,
Rect lprcClipRect)
|
HResult |
translateAccelerator(Msg lpmsg)
|
void |
UIDeactivate()
|
void |
unadvise(Int32 connection)
|
void |
unfreeze(Int32 dwFreeze)
|
void |
update()
|
Methods inherited from class com.jniwrapper.win32.com.server.IUnknownServer |
addRef, addRefAggregated, create, destroy, doDestroy, doQueryInterface, getClassImpl, getRefCount, isAutoDelete, isNull, queryInterface, queryInterfaceAggregated, releaseAggregated, setAutoDelete, setNull |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractOleControl
public AbstractOleControl(CoClassMetaInfo classImpl)
initUI
protected abstract void initUI()
- Initialize Swing UI.
getContentWindow
public java.awt.Container getContentWindow()
- Deprecated. use
getContentPane()
- Returns container window.
- Returns:
- container window
getContentPane
public java.awt.Container getContentPane()
- Returns container window.
- Returns:
- container window
setClientSite
public void setClientSite(IOleClientSite clientSite)
throws ComException
- Specified by:
setClientSite
in interface IOleObject
- Parameters:
clientSite
- [in]
- Throws:
ComException
getClientSite
public IOleClientSite getClientSite()
throws ComException
- Specified by:
getClientSite
in interface IOleObject
- Throws:
ComException
setHostNames
public void setHostNames(OleStr containerApp,
OleStr containerObj)
throws ComException
- Specified by:
setHostNames
in interface IOleObject
- Parameters:
containerApp
- [in]
containerObj
- [in]
- Throws:
ComException
close
public void close(OleClose saveOption)
throws ComException
- Specified by:
close
in interface IOleObject
- Parameters:
saveOption
- [in]
- Throws:
ComException
setMoniker
public void setMoniker(OleWhichMk whichMoniker,
IMoniker moniker)
throws ComException
- Specified by:
setMoniker
in interface IOleObject
- Parameters:
whichMoniker
- [in]
moniker
- [in]
- Throws:
ComException
getMoniker
public IMoniker getMoniker(OleGetMoniker assign,
OleWhichMk whichMoniker)
throws ComException
- Specified by:
getMoniker
in interface IOleObject
- Parameters:
assign
- [in]
whichMoniker
- [in]
- Throws:
ComException
initFromData
public void initFromData(IDataObject dataObject,
VariantBool creation,
Int32 reserved)
throws ComException
- Specified by:
initFromData
in interface IOleObject
- Parameters:
dataObject
- [in]
creation
- [in]
reserved
- [in]
- Throws:
ComException
getClipboardData
public IDataObject getClipboardData(Int32 dwReserved)
throws ComException
- Specified by:
getClipboardData
in interface IOleObject
- Parameters:
dwReserved
- [in]
- Throws:
ComException
doVerb
public void doVerb(LongInt verb,
Msg msg,
IOleClientSite activeSite,
LongInt lindex,
Wnd parent,
Rect posRect)
throws ComException
- Specified by:
doVerb
in interface IOleObject
- Parameters:
verb
- [in]
msg
- [in]
activeSite
- [in]
lindex
- [in]
parent
- [in]
posRect
- [in]
- Throws:
ComException
enumVerbs
public IEnumOleVerb enumVerbs()
throws ComException
- Specified by:
enumVerbs
in interface IOleObject
- Throws:
ComException
update
public void update()
throws ComException
- Specified by:
update
in interface IOleObject
- Throws:
ComException
isUpToDate
public void isUpToDate()
throws ComException
- Specified by:
isUpToDate
in interface IOleObject
- Throws:
ComException
getUserType
public OleStr getUserType(UserClassType formOfType)
throws ComException
- Specified by:
getUserType
in interface IOleObject
- Parameters:
formOfType
- [in]
- Throws:
ComException
setExtent
public void setExtent(DvAspect drawAspect,
Size size)
throws ComException
- Specified by:
setExtent
in interface IOleObject
- Parameters:
drawAspect
- [in]
size
- [in]
- Throws:
ComException
getExtent
public Size getExtent(DvAspect drawAspect)
throws ComException
- Specified by:
getExtent
in interface IOleObject
- Parameters:
drawAspect
- [in]
- Throws:
ComException
advise
public Int32 advise(IAdviseSink adviseSink)
throws ComException
- Specified by:
advise
in interface IOleObject
- Parameters:
adviseSink
- [in]
- Throws:
ComException
unadvise
public void unadvise(Int32 connection)
throws ComException
- Specified by:
unadvise
in interface IOleObject
- Parameters:
connection
- [in]
- Throws:
ComException
enumAdvise
public IEnumStatData enumAdvise()
throws ComException
- Specified by:
enumAdvise
in interface IOleObject
- Throws:
ComException
getMiscStatus
public OleMisc getMiscStatus(DvAspect aspect)
throws ComException
- Specified by:
getMiscStatus
in interface IOleObject
- Parameters:
aspect
- [in]
- Throws:
ComException
setColorScheme
public void setColorScheme(LogPalette logPal)
throws ComException
- Specified by:
setColorScheme
in interface IOleObject
- Parameters:
logPal
- [in]
- Throws:
ComException
inPlaceDeactivate
public void inPlaceDeactivate()
throws ComException
- Specified by:
inPlaceDeactivate
in interface IOleInPlaceObject
- Throws:
ComException
UIDeactivate
public void UIDeactivate()
throws ComException
- Specified by:
UIDeactivate
in interface IOleInPlaceObject
- Throws:
ComException
setObjectRects
public void setObjectRects(Rect lprcPosRect,
Rect lprcClipRect)
throws ComException
- Specified by:
setObjectRects
in interface IOleInPlaceObject
- Parameters:
lprcPosRect
- [in]
lprcClipRect
- [in]
- Throws:
ComException
reactivateAndUndo
public void reactivateAndUndo()
throws ComException
- Specified by:
reactivateAndUndo
in interface IOleInPlaceObject
- Throws:
ComException
getWindow
public Wnd getWindow()
throws ComException
- Specified by:
getWindow
in interface IOleWindow
- Throws:
ComException
contextSensitiveHelp
public void contextSensitiveHelp(VariantBool fEnterMode)
throws ComException
- Specified by:
contextSensitiveHelp
in interface IOleWindow
- Parameters:
fEnterMode
- [in]
- Throws:
ComException
getExtent
public Size getExtent(DvAspect dwDrawAspect,
Int32 lindex,
DvTargetDevice ptd)
throws ComException
- Specified by:
getExtent
in interface IViewObject2
- Parameters:
dwDrawAspect
- [in]
lindex
- [in]
ptd
- [in]
- Throws:
ComException
draw
public void draw(DvAspect dwDrawAspect,
Int32 lindex,
DvAspectInfo pvAspect,
DvTargetDevice ptd,
Int32 hdcTargetDev,
Int32 hdcDraw,
Rect lprcBounds,
Rect lprcWBounds,
Int32 pfnContinue,
Int32 dwContinue)
throws ComException
- Specified by:
draw
in interface IViewObject
- Parameters:
dwDrawAspect
- [in]
lindex
- [in]
pvAspect
- [in]
ptd
- [in]
hdcTargetDev
- [in]
hdcDraw
- [in]
lprcBounds
- [in]
lprcWBounds
- [in]
pfnContinue
- [in]
dwContinue
- [in]
- Throws:
ComException
getColorSet
public Pointer getColorSet(DvAspect dwDrawAspect,
Int32 lindex,
DvAspectInfo pvAspect,
DvTargetDevice ptd,
Int32 hicTargetDev)
throws ComException
- Specified by:
getColorSet
in interface IViewObject
- Parameters:
dwDrawAspect
- [in]
lindex
- [in]
pvAspect
- [in]
ptd
- [in]
hicTargetDev
- [in]
- Throws:
ComException
freeze
public Int32 freeze(DvAspect dwDrawAspect,
Int32 lindex,
DvAspectInfo pvAspect)
throws ComException
- Specified by:
freeze
in interface IViewObject
- Parameters:
dwDrawAspect
- [in]
lindex
- [in]
pvAspect
- [in]
- Throws:
ComException
unfreeze
public void unfreeze(Int32 dwFreeze)
throws ComException
- Specified by:
unfreeze
in interface IViewObject
- Parameters:
dwFreeze
- [in]
- Throws:
ComException
setAdvise
public void setAdvise(DvAspect aspects,
AdviceFlags advf,
IAdviseSink pIAdviseSink)
throws ComException
- Specified by:
setAdvise
in interface IViewObject
- Parameters:
aspects
- [in]
advf
- [in]
pIAdviseSink
- [in]
- Throws:
ComException
getAdvise
public void getAdvise(DvAspect pAspects,
AdviceFlags pAdvf,
IAdviseSink pIAdviseSink)
throws ComException
- Specified by:
getAdvise
in interface IViewObject
- Parameters:
pAspects
- [out]
pAdvf
- [out]
pIAdviseSink
- [out]
- Throws:
ComException
onMnemonic
public void onMnemonic(Msg pMsg)
throws ComException
- Specified by:
onMnemonic
in interface IOleControl
- Parameters:
pMsg
- [in]
- Throws:
ComException
onAmbientPropertyChange
public void onAmbientPropertyChange(DispID dispID)
throws ComException
- Specified by:
onAmbientPropertyChange
in interface IOleControl
- Parameters:
dispID
- [in]
- Throws:
ComException
freezeEvents
public void freezeEvents(VariantBool bFreeze)
throws ComException
- Specified by:
freezeEvents
in interface IOleControl
- Parameters:
bFreeze
- [in]
- Throws:
ComException
getControlInfo
public ControlInfo getControlInfo()
throws ComException
- Specified by:
getControlInfo
in interface IOleControl
- Throws:
ComException
translateAccelerator
public HResult translateAccelerator(Msg lpmsg)
throws ComException
- Specified by:
translateAccelerator
in interface IOleInPlaceActiveObject
- Parameters:
lpmsg
- [in]
- Throws:
ComException
onFrameWindowActivate
public void onFrameWindowActivate(VariantBool fActivate)
throws ComException
- Specified by:
onFrameWindowActivate
in interface IOleInPlaceActiveObject
- Parameters:
fActivate
- [in]
- Throws:
ComException
onDocWindowActivate
public void onDocWindowActivate(VariantBool fActivate)
throws ComException
- Specified by:
onDocWindowActivate
in interface IOleInPlaceActiveObject
- Parameters:
fActivate
- [in]
- Throws:
ComException
resizeBorder
public void resizeBorder(Rect prcBorder,
IOleInPlaceUIWindow pUIWindow,
VariantBool fFrameWindow)
throws ComException
- Specified by:
resizeBorder
in interface IOleInPlaceActiveObject
- Parameters:
prcBorder
- [in]
pUIWindow
- [in]
fFrameWindow
- [in]
- Throws:
ComException
enableModeless
public void enableModeless(VariantBool fEnable)
throws ComException
- Specified by:
enableModeless
in interface IOleInPlaceActiveObject
- Parameters:
fEnable
- [in]
- Throws:
ComException