Examples of SWTXHTMLRenderer


Examples of org.xhtmlrenderer.simple.SWTXHTMLRenderer

        // create about dialog
        final Display display = browser.getShell().getDisplay();
        final Shell shell = new Shell(browser.getShell(), SWT.DIALOG_TRIM
                | SWT.APPLICATION_MODAL);
        // create widgets
        final SWTXHTMLRenderer xhtml = new SWTXHTMLRenderer(shell, SWT.NONE,
            new BrowserUserAgent(display));
        final Button close = new Button(shell, SWT.PUSH);
        close.setText("Close");
        shell.setDefaultButton(close);
        close.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                shell.dispose();
            }
        });
        // layout
        shell.setLayout(new FormLayout());
        FormData fd;
        fd = new FormData();
        fd.top = new FormAttachment(0);
        fd.left = new FormAttachment(0);
        fd.right = new FormAttachment(100);
        fd.bottom = new FormAttachment(close, -5);
        xhtml.setLayoutData(fd);
        fd = new FormData();
        fd.right = new FormAttachment(100);
        fd.bottom = new FormAttachment(100);
        close.setLayoutData(fd);
        shell.setSize(500, 450);
        // load page
        xhtml.setDocument(ABOUT_URL);
        // open dialog
        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch())
                display.sleep();
View Full Code Here

Examples of org.xhtmlrenderer.simple.SWTXHTMLRenderer

    public Browser(Display display) {
        _shell = new Shell(display);
        _shell.setText("Flying Saucer");

        // create widgets
        _xhtml = new SWTXHTMLRenderer(_shell, SWT.BORDER, new BrowserUserAgent(
            display));

        final Menu menu = new Menu(_shell, SWT.BAR);
        _shell.setMenuBar(menu);
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.