Package com.ms.activeX |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class AXComponent extends UICanvas { // Constructors public AXComponent(); public AXComponent(String s); public AXComponent(IUnknown p); // Methods public synchronized void addNotify(); public synchronized void removeNotify(); public synchronized void reshape(int x, int y, int width, int height); public synchronized Dimension minimumSize(); public synchronized Dimension preferredSize(); public synchronized void setBackground(Color c); public synchronized void setForeground(Color c); public synchronized void show(); public synchronized void hide(); public synchronized void createControl(String s); public synchronized void createControl(IUnknown p); public synchronized IUnknown getObject(); public void addAXComponentEventListener(AXComponentEventListener listener); public void removeAXComponentEventListener(AXComponentEventListener listener); }
The AXComponent class is subclassed into a custom component or used for hosting a Microsoft® ActiveX™ control.
public AXComponent();Creates an empty AXComponent. You can then call createControl to host an ActiveX control.
public AXComponent(String s);Creates an AXComponent that hosts a control.
Parameter Description s The class identifier (CLSID) of the control.
public AXComponent(IUnknown p);Creates an AXComponent that hosts a control. The control that is hosted was already created, and the IUnknown of the control is used for all further communication.
Parameter Description p The COM identity of the control.
public void addAXComponentEventListener(AXComponentEventListener listener);Adds a listener.
Return Value:
No return value.
Parameter Description listener The listener that is added.
public synchronized void addNotify();Creates the control at notification time.
Return Value:
No return value.
public synchronized void createControl(String s);Creates an AXComponent that hosts a control.
Return Value:
No return value.
Parameter Description s The CLSID of the control.
public synchronized void createControl(IUnknown p);Creates an AXComponent that hosts a control. The control that is hosted was already created, and the IUnknown of the control is used for all further communication.
Return Value:
No return value.
Parameter Description p The IUnknown of the control.
public synchronized IUnknown getObject();Returns the IUnknown of the ActiveX control. This is the object that you cast to your interface in order to call methods that reside in the control.
Return Value:
Returns the IUnknown of the ActiveX control.
public synchronized void hide();Hides a component.
Return Value:
No return value.
public synchronized Dimension minimumSize();Queries an object to determine its minimum size (in pixels).
Return Value:
Returns an object's minimum size.
public synchronized Dimension preferredSize();Queries an object to determine its preferred size (in pixels).
Return Value:
Returns an object's preferred size.
public void removeAXComponentEventListener(AXComponentEventListener listener);Removes a listener.
Return Value:
No return value.
Parameter Description listener The listener that is removed.
public synchronized void removeNotify();Performs all the OLE cleanup associated with an ActiveX control.
Return Value:
No return value.
public synchronized void reshape(int x, int y, int width, int height);Notifies the control of the control's new size.
Return Value:
No return value.
Parameter Description x The control's starting x coordinate. y The control's starting y coordinate. width The control's new horizontal dimension (in pixels). height The control's new vertical dimension (in pixels).
public synchronized void setBackground(Color c);Instructs the control to set its background color.
Return Value:
No return value.
Parameter Description c The background color that is set.
public synchronized void setForeground(Color c);Instructs the control to set its foreground color.
Return Value:
No return value.
Parameter Description c The foreground color that is set.
public synchronized void show();Makes the control visible.
Return Value:
No return value.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.