Java 类org.eclipse.swt.ole.win32.OleAutomation 实例源码

项目:jo-widgets    文件:OleControlImpl.java   
@Override
public IOleAutomation getAutomation() {
    if (oleAutomationLazy == null) {
        oleAutomationLazy = new OleAutomationImpl(new OleAutomation(getOleControlSite()));
    }
    return oleAutomationLazy;
}
项目:jo-widgets    文件:OleAutomationTypeInfoUtil.java   
static String getTypeInfo(final OleAutomation auto) {
    final StringBuilder result = new StringBuilder();
    final TYPEATTR typeattr = auto.getTypeInfoAttributes();
    if (typeattr != null) {
        if (typeattr.cFuncs > 0) {
            result.append("Functions :\n");
        }
        for (int i = 0; i < typeattr.cFuncs; i++) {
            final OleFunctionDescription description = auto.getFunctionDescription(i);
            result.append(getInvokeKind(description.invokeKind)
                + " (id = "
                + description.id
                + ") : "
                + "\n\tSignature   : "
                + getTypeName(description.returnType)
                + " "
                + description.name
                + "("
                + getFunctionDescription(description)
                + ")"
                + "\n\tDescription : "
                + description.documentation
                + "\n\tHelp File   : "
                + description.helpFile
                + "\n");
        }

        if (typeattr.cVars > 0) {
            result.append("\n\nVariables  :\n");
        }
        for (int i = 0; i < typeattr.cVars; i++) {
            final OlePropertyDescription data = auto.getPropertyDescription(i);
            result.append("PROPERTY (id = "
                + data.id
                + ") :"
                + "\n\tName : "
                + data.name
                + "\n\tType : "
                + getTypeName(data.type)
                + "\n");
        }
    }
    return result.toString();
}
项目:jo-widgets    文件:OleControlImpl.java   
OleAutomationImpl(final OleAutomation oleAutomation) {
    Assert.paramNotNull(oleAutomation, "oleAutomation");
    this.oleAutomation = oleAutomation;
    this.oleEventObservable = new OleEventObservable(oleAutomation);
    this.oleEventObservable.setSwtOleControlSite(getOleControlSite());
}
项目:jo-widgets    文件:OleControlImpl.java   
OleEventObservable(final OleAutomation oleAutomation) {
    this.oleAutomation = oleAutomation;
    this.listenersMap = new HashMap<Integer, Tuple<OleListener, Set<IOleEventListener>>>();
}