public class OleControlSite extends OleClientSite
In addition to the behaviour provided by OleClientSite, this object provides the following:
This object implements the OLE Interfaces IOleControlSite, IDispatch, and IPropertyNotifySink.
Note that although this class is a subclass of Composite
,
it does not make sense to add Control
children to it,
or set a layout on it.
Modifier and Type | Field and Description |
---|---|
private CONTROLINFO |
currentControlInfo |
private Font |
font |
private COMObject |
iDispatch |
private COMObject |
iOleControlSite |
private OleEventSink[] |
oleEventSink |
private GUID[] |
oleEventSinkGUID |
private int[] |
oleEventSinkIUnknown |
private OlePropertyChangeSink |
olePropertyChangeSink |
(package private) static java.lang.String |
SHELL_PROG_ID |
private int[] |
sitePropertyIds |
private Variant[] |
sitePropertyValues |
(package private) static int |
SWT_RESTORECARET |
appClsid, frame, iOleClientSite, isActivated, objDocumentView, objIOleCommandTarget, objIOleInPlaceObject, objIOleObject, objIUnknown, objIViewObject2, state, STATE_ACTIVE, STATE_INPLACEACTIVE, STATE_NONE, STATE_RUNNING, STATE_UIACTIVE, tempStorage
Constructor and Description |
---|
OleControlSite(Composite parent,
int style,
java.io.File file)
Create an OleControlSite child widget using the OLE Document type associated with the
specified file.
|
OleControlSite(Composite parent,
int style,
java.lang.String progId)
Create an OleControlSite child widget using style bits
to select a particular look or set of properties.
|
OleControlSite(Composite parent,
int style,
java.lang.String progId,
java.io.File file)
Create an OleClientSite child widget to edit the specified file using the specified OLE Document
application.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addEventListener(int iunknown,
GUID guid,
int eventID,
OleListener listener) |
void |
addEventListener(int eventID,
OleListener listener)
Adds the listener to receive events.
|
void |
addEventListener(OleAutomation automation,
int eventID,
OleListener listener)
Adds the listener to receive events.
|
void |
addEventListener(OleAutomation automation,
java.lang.String eventSinkId,
int eventID,
OleListener listener)
Adds the listener to receive events.
|
protected void |
addObjectReferences() |
void |
addPropertyListener(int propertyID,
OleListener listener)
Adds the listener to receive events.
|
private void |
connectPropertyChangeSink() |
protected void |
createCOMInterfaces() |
private void |
disconnectEventSinks() |
private void |
disconnectPropertyChangeSink() |
protected void |
disposeCOMInterfaces() |
Color |
getBackground()
Returns the receiver's background color.
|
(package private) static GUID |
getDefaultEventSinkGUID(IUnknown unknown) |
Font |
getFont()
Returns the font that the receiver will use to paint textual information.
|
Color |
getForeground()
Returns the foreground color that the receiver will use to draw.
|
protected int |
getLicenseInfo(GUID clsid) |
Variant |
getSiteProperty(int dispId)
Get the control site property specified by the dispIdMember, or
null if the dispId is not recognised. |
protected int |
GetWindow(int phwnd) |
private int |
Invoke(int dispIdMember,
int riid,
int lcid,
int dwFlags,
int pDispParams,
int pVarResult,
int pExcepInfo,
int pArgErr) |
private int |
OnControlInfoChanged() |
private int |
OnFocus(int fGotFocus) |
(package private) void |
onFocusIn(Event e) |
(package private) void |
onFocusOut(Event e) |
protected int |
OnUIDeactivate(int fUndoable) |
protected int |
QueryInterface(int riid,
int ppvObject) |
protected int |
Release() |
protected void |
releaseObjectInterfaces() |
(package private) void |
removeEventListener(int iunknown,
GUID guid,
int eventID,
OleListener listener) |
void |
removeEventListener(int eventID,
OleListener listener)
Removes the listener.
|
void |
removeEventListener(OleAutomation automation,
GUID guid,
int eventID,
OleListener listener)
Deprecated.
- use OleControlSite.removeEventListener(OleAutomation, int, OleListener)
|
void |
removeEventListener(OleAutomation automation,
int eventID,
OleListener listener)
Removes the listener.
|
void |
removePropertyListener(int propertyID,
OleListener listener)
Removes the listener.
|
void |
setBackground(Color color)
Sets the receiver's background color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
void |
setFont(Font font)
Sets the font that the receiver will use to paint textual information
to the font specified by the argument, or to the default font for that
kind of control if the argument is null.
|
void |
setForeground(Color color)
Sets the receiver's foreground color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
void |
setSiteProperty(int dispId,
Variant value)
Sets the control site property specified by the dispIdMember to a new value.
|
ActivateMe, AddRef, createTempStorage, deactivateInPlaceClient, doVerb, exec, getAutomationObject, getClassID, getIndent, getProgID, getProgramID, getRect, isDirty, isFocusControl, isICAClient, OleCreate, queryStatus, save, setBorderSpace, setBounds, setIndent, showProperties
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
private COMObject iOleControlSite
private COMObject iDispatch
private OlePropertyChangeSink olePropertyChangeSink
private OleEventSink[] oleEventSink
private GUID[] oleEventSinkGUID
private int[] oleEventSinkIUnknown
private CONTROLINFO currentControlInfo
private int[] sitePropertyIds
private Variant[] sitePropertyValues
private Font font
static int SWT_RESTORECARET
static final java.lang.String SHELL_PROG_ID
public OleControlSite(Composite parent, int style, java.io.File file)
parent
- a composite widget; must be an OleFramestyle
- the bitwise OR'ing of widget stylesfile
- the file that is to be opened in this OLE Documentjava.lang.IllegalArgumentException
- SWTException
- public OleControlSite(Composite parent, int style, java.lang.String progId)
parent
- a composite widget; must be an OleFramestyle
- the bitwise OR'ing of widget stylesprogId
- the unique program identifier which has been registered for this ActiveX Control;
the value of the ProgID key or the value of the VersionIndependentProgID key specified
in the registry for this Control (for example, the VersionIndependentProgID for
Internet Explorer is Shell.Explorer)java.lang.IllegalArgumentException
- SWTException
- public OleControlSite(Composite parent, int style, java.lang.String progId, java.io.File file)
IMPORTANT: This method is not part of the public
API for OleClientSite
. It is marked public only so that it
can be shared within the packages provided by SWT. It is not
available on all platforms, and should never be called from
application code.
parent
- a composite widget; must be an OleFramestyle
- the bitwise OR'ing of widget stylesprogId
- the unique program identifier of am OLE Document application;
the value of the ProgID key or the value of the VersionIndependentProgID key specified
in the registry for the desired OLE Document (for example, the VersionIndependentProgID
for Word is Word.Document)file
- the file that is to be opened in this OLE Documentjava.lang.IllegalArgumentException
- SWTException
- public void addEventListener(int eventID, OleListener listener)
eventID
- the id of the eventlistener
- the listenerjava.lang.IllegalArgumentException
- public void addEventListener(OleAutomation automation, int eventID, OleListener listener)
automation
- the automation object that provides the event notificationeventID
- the id of the eventlistener
- the listenerjava.lang.IllegalArgumentException
- public void addEventListener(OleAutomation automation, java.lang.String eventSinkId, int eventID, OleListener listener)
automation
- the automation object that provides the event notificationeventSinkId
- the GUID of the event sinkeventID
- the id of the eventlistener
- the listenerjava.lang.IllegalArgumentException
- void addEventListener(int iunknown, GUID guid, int eventID, OleListener listener)
protected void addObjectReferences()
addObjectReferences
in class OleClientSite
public void addPropertyListener(int propertyID, OleListener listener)
propertyID
- the identifier of the propertylistener
- the listenerjava.lang.IllegalArgumentException
- private void connectPropertyChangeSink()
protected void createCOMInterfaces()
createCOMInterfaces
in class OleClientSite
private void disconnectEventSinks()
private void disconnectPropertyChangeSink()
protected void disposeCOMInterfaces()
disposeCOMInterfaces
in class OleClientSite
public Color getBackground()
Control
Note: This operation is a hint and may be overridden by the platform. For example, on some versions of Windows the background of a TabFolder, is a gradient rather than a solid color.
getBackground
in class Control
public Font getFont()
Control
public Color getForeground()
Control
getForeground
in class Control
protected int getLicenseInfo(GUID clsid)
public Variant getSiteProperty(int dispId)
null
if the dispId is not recognised.dispId
- the dispIdnull
protected int GetWindow(int phwnd)
GetWindow
in class OleClientSite
private int Invoke(int dispIdMember, int riid, int lcid, int dwFlags, int pDispParams, int pVarResult, int pExcepInfo, int pArgErr)
private int OnControlInfoChanged()
protected int OnUIDeactivate(int fUndoable)
OnUIDeactivate
in class OleClientSite
void onFocusIn(Event e)
onFocusIn
in class OleClientSite
void onFocusOut(Event e)
onFocusOut
in class OleClientSite
private int OnFocus(int fGotFocus)
protected int QueryInterface(int riid, int ppvObject)
QueryInterface
in class OleClientSite
protected int Release()
Release
in class OleClientSite
protected void releaseObjectInterfaces()
releaseObjectInterfaces
in class OleClientSite
public void removeEventListener(int eventID, OleListener listener)
eventID
- the event identifierlistener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- public void removeEventListener(OleAutomation automation, GUID guid, int eventID, OleListener listener)
automation
- the automation object that provides the event notificationguid
- the identifier of the events COM interfaceeventID
- the event identifierlistener
- the listenerjava.lang.IllegalArgumentException
- public void removeEventListener(OleAutomation automation, int eventID, OleListener listener)
automation
- the automation object that provides the event notificationeventID
- the event identifierlistener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- void removeEventListener(int iunknown, GUID guid, int eventID, OleListener listener)
public void removePropertyListener(int propertyID, OleListener listener)
propertyID
- the identifier of the propertylistener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- public void setBackground(Color color)
Control
Note: This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.
setBackground
in class Control
color
- the new color (or null)public void setFont(Font font)
Control
public void setForeground(Color color)
Control
Note: This operation is a hint and may be overridden by the platform.
setForeground
in class Control
color
- the new color (or null)public void setSiteProperty(int dispId, Variant value)
dispId
- the ID of the property as specified by the IDL of the ActiveX Controlvalue
- The new value for the property as expressed in a Variant.