Examples of OleFrame


Examples of org.eclipse.swt.ole.win32.OleFrame

    flashListener = listener;

    this.setLayout(new FillLayout());

    oleFrame = new OleFrame(this, SWT.NONE);

    try {
      // Create an Automation object for access to extended capabilities
      oleControlSite = new OleControlSite(oleFrame, SWT.NONE,
          "ShockwaveFlash.ShockwaveFlash");
View Full Code Here

Examples of org.eclipse.swt.ole.win32.OleFrame

      return null;
    }
  }

  protected static Control createControl(Composite parent, Object[] parameters) {
    final OleFrame frame = new OleFrame(parent, SWT.NONE);
    OleControlSite site;
    try {
      site = new OleControlSite(frame, SWT.NONE, "Shell.Explorer");
      configureOleFrame(site, frame);
      // Add a listener
      OleAutomation shellExplorer = new OleAutomation(site);
      int[] dispIDs = shellExplorer.getIDsOfNames(new String[] {"Application"});
      Variant pVarResult = shellExplorer.getProperty(dispIDs[0]);
      final OleAutomation application = pVarResult.getAutomation();
      frame.addDisposeListener(new DisposeListener() {
        public void widgetDisposed(DisposeEvent e) {
          application.dispose();
        }
      });
      pVarResult.dispose();
      shellExplorer.dispose();
      OleListener listener = new OleListener() {
        public void handleEvent (OleEvent e) {
          Variant[] args = e.arguments;
          String url = args[1].getString();
          // two arguments which must be released
          for (int i = 0; i < args.length; i++) {
            args[i].dispose();
          }
          new CMJ_sendDocumentCompleteEvent().asyncExec(frame, url);
        }
      };
      site.addEventListener(application, IID_DWebBrowserEvents2, DocumentComplete, listener);
    } catch(SWTException e) {
      e.printStackTrace();
      frame.dispose();
      return null;
    }
    site.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
    return frame;
  }
View Full Code Here

Examples of org.eclipse.swt.ole.win32.OleFrame

* @author Christopher Deckers
*/
class NativeWMediaPlayer extends SWTOleNativeComponent implements INativeWMediaPlayer {

  protected static Control createControl(Composite parent, Object[] parameters) {
    OleFrame frame = new OleFrame(parent, SWT.NONE);
    OleClientSite site;
    try {
      site = new OleClientSite(frame, SWT.NONE, "WMPlayer.OCX");
      configureOleFrame(site, frame);
    } catch(SWTException e) {
      e.printStackTrace();
      frame.dispose();
      return null;
    }
    site.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
    return frame;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.