|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite au.com.swz.swttocom.swt.types.AutomationComposite
public class AutomationComposite
An Automation Composite provides support for embedding a COM control or OLE Document in to a SWT application as if it were just another SWT widget. It provides methods for interacting with the Control/Document however it is usually extended by either a Delegate or Facade that will provide access to the control through more meaningful methods.
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
AutomationComposite(org.eclipse.swt.widgets.Composite parent,
int style,
java.lang.String progId)
Create an AutomationComposite widget with the specified OLE Class embedded. |
|
AutomationComposite(org.eclipse.swt.widgets.Composite parent,
int style,
java.lang.String progId,
java.io.File file)
Create an AutomationComposite widget and initialise it with the contents of the specified file using the specified application. |
Method Summary | |
---|---|
void |
deactivateInPlaceClient()
Deactivates an active in-place object and discards the object's undo state. |
int[] |
getIDsOfNames(java.lang.String[] names)
Returns the integer values (IDs) that are associated with the specified names by the IDispatch implementor. |
java.lang.String |
getLastErrorSWT()
Returns a description of the last error encountered. |
org.eclipse.swt.ole.win32.OleAutomation |
getOleAutomation()
Returns the OleAutomation object currently being used to call the COM interface. |
org.eclipse.swt.ole.win32.OleClientSite |
getOleClientSite()
Returns the OleClientSite currently being used to host the document/control. |
org.eclipse.swt.ole.win32.OleFrame |
getOleFrame()
Returns the OleFrame currently being used to manage the frame menus. |
org.eclipse.swt.ole.win32.Variant |
getProperty(int dispIdMember)
Returns the value of the property specified by the dispIdMember. |
org.eclipse.swt.ole.win32.Variant |
getProperty(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg)
Returns the value of the property specified by the dispIdMember. |
org.eclipse.swt.ole.win32.Variant |
getProperty(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg,
int[] rgdispidNamedArgs)
Returns the value of the property specified by the dispIdMember. |
org.eclipse.swt.ole.win32.Variant |
invoke(int dispIdMember)
Invokes a method on the OLE Object; the method has no parameters. |
org.eclipse.swt.ole.win32.Variant |
invoke(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg)
Invokes a method on the OLE Object; the method has no optional parameters. |
org.eclipse.swt.ole.win32.Variant |
invoke(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg,
int[] rgdispidNamedArgs)
Invokes a method on the OLE Object; the method has optional parameters. |
void |
invokeNoReply(int dispIdMember)
Invokes a method on the OLE Object; the method has no parameters. |
void |
invokeNoReply(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg)
Invokes a method on the OLE Object; the method has no optional parameters. |
void |
invokeNoReply(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg,
int[] rgdispidNamedArgs)
Invokes a method on the OLE Object; the method has optional parameters. |
boolean |
isDirty()
Indicates whether the contents of the embedded document has changed since it was last saved. |
void |
oleDiscardUndoState()
Used to tell objects to discard any undo state that they may be maintaining without deactivating the object. |
void |
oleHide()
Causes an object to remove its user interface from the view. |
void |
oleInplaceActivate()
Activates an object in place without displaying tools, such as menus and toolbars, that end users need to change the behavior or appearance of the object. |
void |
oleOpen()
Instructs an object, including one that otherwise supports in-place activation, to open itself for editing in a window separate from that of its container. |
void |
olePrimary()
Specifies the action that occurs when an end user double-clicks the object in its container. |
void |
oleShow()
Instructs an object to show itself for editing or viewing. |
void |
oleUIActivate()
Activates an object in place, along with its full set of user-interface tools, including menus, toolbars, and its name in the title bar of the container window. |
boolean |
save(boolean includeOleInfo)
Saves the embedded document to the same file from which it was loaded. |
boolean |
save(java.io.File file,
boolean includeOleInfo)
Saves the embedded document to the specified file. |
boolean |
setProperty(int dispIdMember,
org.eclipse.swt.ole.win32.Variant rgvarg)
Sets the property specified by the dispIdMember to a new value. |
boolean |
setProperty(int dispIdMember,
org.eclipse.swt.ole.win32.Variant[] rgvarg)
Sets the property specified by the dispIdMember to a new value. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, 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, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, 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 |
Methods inherited from interface au.com.swz.swttocom.swt.types.IAutomationObject |
---|
dispose, isDisposed |
Constructor Detail |
---|
public AutomationComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String progId)
parent
- the parent composite widget that will host the OLE Control/Docmunet.style
- the bitwise OR'ing of widget styles to be applied to the underlying
Composite (eg: SWT.BORDER).progId
- the unique program identifier of an OLE Document/Control.
java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public AutomationComposite(org.eclipse.swt.widgets.Composite parent, int style, java.lang.String progId, java.io.File file)
parent
- the parent composite widget that will host the OLE Control/Docmunet.style
- the bitwise OR'ing of widget styles to be applied to the underlying
Composite (eg: SWT.BORDER).progId
- the unique program identifier of an OLE Document/Control.file
- the file that is to be opened in this Composite.
java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Method Detail |
---|
public void oleInplaceActivate()
public void oleShow()
public void olePrimary()
public void oleOpen()
oleShow()
.
public void oleHide()
public void oleUIActivate()
public void oleDiscardUndoState()
public org.eclipse.swt.ole.win32.OleClientSite getOleClientSite()
public boolean isDirty()
save
method.
public boolean save(java.io.File file, boolean includeOleInfo)
includeOleInfo/code>
specifies whether file should include OLE specific information. For example,
a word file should set this parameter to true because there is formatting information
that should be stored in the OLE specific Storage format. On the other hand a
bitmap file edited with MSPaint would set this parameter to false because bitmap
is a standard format that does not include any OLE specific data.
- Parameters:
file
- the file to which the document should be saved.includeOleInfo
- true to include OLE specific information in the file.
- Returns:
- true if the save was successful
public boolean save(boolean includeOleInfo) throws java.lang.IllegalStateException
Saves the embedded document to the same file from which it was loaded. If no file was specified at the creation of this composite this methods throws a IllegalStateException.
The includeOleInfo/code> specifies whether file should include OLE specific
information. For example, a word file should set this parameter to true because
there is formatting information that should be stored in the OLE specific Storage
format. On the other hand a bitmap file edited with MSPaint would set this
parameter to false because bitmap is a standard format that does not include
any OLE specific data.
includeOleInfo
- true to include OLE specific information in the file.
java.lang.IllegalStateException
- If no file was specified at the creation of this composite.public void deactivateInPlaceClient()
public org.eclipse.swt.ole.win32.OleFrame getOleFrame()
public org.eclipse.swt.ole.win32.OleAutomation getOleAutomation()
public int[] getIDsOfNames(java.lang.String[] names)
getIDsOfNames
in interface IAutomationObject
names
- an array of names for which you require the identifiers
public java.lang.String getLastErrorSWT()
getLastErrorSWT
in interface IAutomationObject
public org.eclipse.swt.ole.win32.Variant getProperty(int dispIdMember)
getProperty
in interface IAutomationObject
dispIdMember
- the ID of the property as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNames
public org.eclipse.swt.ole.win32.Variant getProperty(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg)
getProperty
in interface IAutomationObject
dispIdMember
- the ID of the property as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.
public org.eclipse.swt.ole.win32.Variant getProperty(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg, int[] rgdispidNamedArgs)
getProperty
in interface IAutomationObject
dispIdMember
- the ID of the property as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.rgdispidNamedArgs
- an array of identifiers for the arguments specified in rgvarg; the
parameter IDs must be in the same order as their corresponding values;
all arguments must have an identifier - identifiers can be obtained using
OleAutomation.getIDsOfNames
public org.eclipse.swt.ole.win32.Variant invoke(int dispIdMember)
invoke
in interface IAutomationObject
dispIdMember
- the ID of the method as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNames
public org.eclipse.swt.ole.win32.Variant invoke(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg)
invoke
in interface IAutomationObject
dispIdMember
- the ID of the method as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.
public org.eclipse.swt.ole.win32.Variant invoke(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg, int[] rgdispidNamedArgs)
invoke
in interface IAutomationObject
dispIdMember
- the ID of the method as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.rgdispidNamedArgs
- an array of identifiers for the arguments specified in rgvarg; the
parameter IDs must be in the same order as their corresponding values;
all arguments must have an identifier - identifiers can be obtained using
OleAutomation.getIDsOfNames
public void invokeNoReply(int dispIdMember)
public void invoke(int dispIdMember)
.
invokeNoReply
in interface IAutomationObject
dispIdMember
- the ID of the method as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNames
org.eclipse.swt.SWTException
- public void invokeNoReply(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg)
public void invoke(int dispIdMember, Variant[] rgvarg)
.
invokeNoReply
in interface IAutomationObject
dispIdMember
- the ID of the method as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.
org.eclipse.swt.SWTException
- public void invokeNoReply(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg, int[] rgdispidNamedArgs)
public void invoke(int dispIdMember, Variant[] rgvarg, int[] rgdispidNamedArgs)
.
invokeNoReply
in interface IAutomationObject
dispIdMember
- the ID of the method as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.rgdispidNamedArgs
- an array of identifiers for the arguments specified in rgvarg; the
parameter IDs must be in the same order as their corresponding values;
all arguments must have an identifier - identifiers can be obtained using
OleAutomation.getIDsOfNames
org.eclipse.swt.SWTException
- public boolean setProperty(int dispIdMember, org.eclipse.swt.ole.win32.Variant rgvarg)
setProperty
in interface IAutomationObject
dispIdMember
- the ID of the property as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- the new value of the property
public boolean setProperty(int dispIdMember, org.eclipse.swt.ole.win32.Variant[] rgvarg)
setProperty
in interface IAutomationObject
dispIdMember
- the ID of the property as specified by the IDL of the ActiveX Control; the
value for the ID can be obtained using OleAutomation.getIDsOfNamesrgvarg
- an array of arguments for the method. All arguments are considered to be
read only unless the Variant is a By Reference Variant type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |