Eclipse Platform
2.0

org.eclipse.swt.ole.win32
Class OleControlSite

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Widget
        |
        +--org.eclipse.swt.widgets.Control
              |
              +--org.eclipse.swt.widgets.Scrollable
                    |
                    +--org.eclipse.swt.widgets.Composite
                          |
                          +--org.eclipse.swt.ole.win32.OleClientSite
                                |
                                +--org.eclipse.swt.ole.win32.OleControlSite
All Implemented Interfaces:
Drawable

public class OleControlSite
extends OleClientSite

OleControlSite provides a site to manage an embedded ActiveX Control within a container.

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.

Styles
BORDER
Events
Dispose, Move, Resize


Field Summary
 
Fields inherited from class org.eclipse.swt.ole.win32.OleClientSite
appClsid, frame, objIOleCommandTarget, objIOleInPlaceObject, objIOleObject, objIUnknown, objIViewObject2, tempStorage
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
OleControlSite(Composite parent, int style, String progId)
          Create an OleControlSite child widget using style bits to select a particular look or set of properties.
 
Method Summary
 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.
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  int getLicenseInfo(org.eclipse.swt.internal.ole.win32.GUID clsid)
           
protected  int GetWindow(int phwnd)
           
protected  int OnUIDeactivate(int fUndoable)
           
protected  int QueryInterface(int riid, int ppvObject)
           
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.
 
Methods inherited from class org.eclipse.swt.ole.win32.OleClientSite
AddRef, createTempStorage, deactivateInPlaceClient, doVerb, exec, getClassID, getIndent, getProgramID, isDirty, isFocusControl, queryStatus, Release, save, setIndent, showProperties
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBorderWidth, getBounds, getDisplay, getEnabled, getLayoutData, getLocation, getMenu, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isDisposed, isEnabled, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBounds, setBounds, setCapture, setCursor, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getStyle, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OleControlSite

public OleControlSite(Composite parent,
                      int style,
                      String progId)
Create an OleControlSite child widget using style bits to select a particular look or set of properties.

Parameters:
parent - a composite widget; must be an OleFrame
style - the bitwise OR'ing of widget styles
Throws:
SWTError -
Method Detail

addEventListener

public void addEventListener(int eventID,
                             OleListener listener)
Adds the listener to receive events.

Parameters:
eventID - the id of the event
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null

addEventListener

public void addEventListener(OleAutomation automation,
                             int eventID,
                             OleListener listener)
Adds the listener to receive events.

Parameters:
automation - the automation object that provides the event notification
eventID - the id of the event
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null
Since:
2.0

addObjectReferences

protected void addObjectReferences()
Overrides:
addObjectReferences in class OleClientSite

addPropertyListener

public void addPropertyListener(int propertyID,
                                OleListener listener)
Adds the listener to receive events.

Parameters:
propertyID - the identifier of the property
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null

createCOMInterfaces

protected void createCOMInterfaces()
Overrides:
createCOMInterfaces in class OleClientSite

disposeCOMInterfaces

protected void disposeCOMInterfaces()
Overrides:
disposeCOMInterfaces in class OleClientSite

getBackground

public Color getBackground()
Description copied from class: Control
Returns the receiver's background color.

Overrides:
getBackground in class Control
Returns:
the background color

getFont

public Font getFont()
Description copied from class: Control
Returns the font that the receiver will use to paint textual information.

Overrides:
getFont in class Control
Returns:
the receiver's font

getForeground

public Color getForeground()
Description copied from class: Control
Returns the foreground color that the receiver will use to draw.

Overrides:
getForeground in class Control
Returns:
the receiver's foreground color

getLicenseInfo

protected int getLicenseInfo(org.eclipse.swt.internal.ole.win32.GUID clsid)

GetWindow

protected int GetWindow(int phwnd)
Overrides:
GetWindow in class OleClientSite

OnUIDeactivate

protected int OnUIDeactivate(int fUndoable)

QueryInterface

protected int QueryInterface(int riid,
                             int ppvObject)
Overrides:
QueryInterface in class OleClientSite

releaseObjectInterfaces

protected void releaseObjectInterfaces()
Overrides:
releaseObjectInterfaces in class OleClientSite

removeEventListener

public void removeEventListener(int eventID,
                                OleListener listener)
Removes the listener.

Parameters:
eventID - the event identifier
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null

removeEventListener

public void removeEventListener(OleAutomation automation,
                                org.eclipse.swt.internal.ole.win32.GUID guid,
                                int eventID,
                                OleListener listener)
Deprecated. - use OleControlSite.removeEventListener(OleAutomation, int, OleListener)

Removes the listener.

Parameters:
automation - the automation object that provides the event notification
guid - the identifier of the events COM interface
eventID - the event identifier
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null
Since:
2.0

removeEventListener

public void removeEventListener(OleAutomation automation,
                                int eventID,
                                OleListener listener)
Removes the listener.

Parameters:
automation - the automation object that provides the event notification
eventID - the event identifier
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null
Since:
2.0

removePropertyListener

public void removePropertyListener(int propertyID,
                                   OleListener listener)
Removes the listener.

Parameters:
listener - the listener
Throws:
SWTError -
  • ERROR_NULL_ARGUMENT when listener is null

setBackground

public void setBackground(Color color)
Description copied from class: Control
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.

Overrides:
setBackground in class Control
Parameters:
color - the new color (or null)

setFont

public void setFont(Font font)
Description copied from class: Control
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.

Overrides:
setFont in class Control
Parameters:
font - the new font (or null)

setForeground

public void setForeground(Color color)
Description copied from class: Control
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.

Overrides:
setForeground in class Control
Parameters:
color - the new color (or null)

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.