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.
appClsid, frame, objDocumentView, objIOleCommandTarget, objIOleInPlaceObject, objIOleObject, objIUnknown, objIViewObject2, tempStorage
Constructor and Description |
---|
OleControlSite(Composite parent,
int style,
File file)
Create an OleControlSite child widget using the OLE Document type associated with the
specified file.
|
OleControlSite(Composite parent,
int style,
String progId)
Create an OleControlSite child widget using style bits
to select a particular look or set of properties.
|
OleControlSite(Composite parent,
int style,
String progId,
File file)
Create an OleClientSite child widget to edit the specified file using the specified OLE Document
application.
|
Modifier and Type | Method and Description |
---|---|
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,
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.
|
protected void |
createCOMInterfaces() |
protected void |
disposeCOMInterfaces() |
Color |
getBackground()
Returns the receiver's background color.
|
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 long |
getLicenseInfo(org.eclipse.swt.internal.ole.win32.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(long phwnd) |
protected int |
OnUIDeactivate(int fUndoable) |
protected int |
QueryInterface(long riid,
long ppvObject) |
protected int |
Release() |
protected void |
releaseObjectInterfaces() |
void |
removeEventListener(int eventID,
OleListener listener)
Removes the listener.
|
void |
removeEventListener(OleAutomation automation,
org.eclipse.swt.internal.ole.win32.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.
|
AddRef, createTempStorage, deactivateInPlaceClient, doVerb, exec, getClassID, getIndent, getProgramID, isDirty, isFocusControl, queryStatus, save, 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, getTextDirection, 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, setTextDirection, 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
public OleControlSite(Composite parent, int style, 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 DocumentIllegalArgumentException
- SWTException
- public OleControlSite(Composite parent, int style, 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)IllegalArgumentException
- SWTException
- public OleControlSite(Composite parent, int style, String progId, 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 DocumentIllegalArgumentException
- SWTException
- public void addEventListener(int eventID, OleListener listener)
eventID
- the id of the eventlistener
- the listenerIllegalArgumentException
- public void addEventListener(OleAutomation automation, int eventID, OleListener listener)
automation
- the automation object that provides the event notificationeventID
- the id of the eventlistener
- the listenerIllegalArgumentException
- public void addEventListener(OleAutomation automation, 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 listenerIllegalArgumentException
- protected void addObjectReferences()
addObjectReferences
in class OleClientSite
public void addPropertyListener(int propertyID, OleListener listener)
propertyID
- the identifier of the propertylistener
- the listenerIllegalArgumentException
- protected void createCOMInterfaces()
createCOMInterfaces
in class OleClientSite
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 long getLicenseInfo(org.eclipse.swt.internal.ole.win32.GUID clsid)
public Variant getSiteProperty(int dispId)
null
if the dispId is not recognised.dispId
- the dispIdnull
protected int GetWindow(long phwnd)
GetWindow
in class OleClientSite
protected int OnUIDeactivate(int fUndoable)
protected int QueryInterface(long riid, long 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 notifiedIllegalArgumentException
- public void removeEventListener(OleAutomation automation, org.eclipse.swt.internal.ole.win32.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 listenerIllegalArgumentException
- 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 notifiedIllegalArgumentException
- public void removePropertyListener(int propertyID, OleListener listener)
propertyID
- the identifier of the propertylistener
- the listener which should no longer be notifiedIllegalArgumentException
- 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.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.