public void getData() { wBrowser.setText( content ); }
message.setText( report.toString() );
public void widgetSelected( SelectionEvent event ) { if ( tree.getSelectionCount() == 1 ) { TreeItem item = tree.getSelection()[0]; if ( item.getParentItem() != null ) { // has a category above it String functionName = item.getText(); FunctionDescription functionDescription = functionLib.getFunctionDescription( functionName ); if ( functionDescription != null ) { String report = functionDescription.getHtmlReport(); message.setText( report ); } } } }
browser.setUrl( stringUrl ); } else { browser.setText( stringUrl );
if (browser != null) { browser.setLayoutData(gridData); browser.setText("<html><body></body></html>");
@Override public void setText( String text ) { browser.setText( text ); }
public void setText(String text) { this.text = text; if (browser != null) { browser.setText(text); } }
Browser browser = new Browser( parent, SWT.NONE ); browser.setText( "<html><ol><li>Hello</li><li>welcome</li></ol></html>" );
private void loadContentHtml(IHtmlTip tip) { fBrowser.setText(getHTML(tip).trim()); }
final FormToolkit toolkit = new FormToolkit(display); final Composite composite = toolkit.createComposite(parent, SWT.BORDER); composite.setLayoutData(gridData); final Composite composite2 = toolkit.createComposite(parent, SWT.BORDER); composite2.setLayoutData(gridData); final FillLayout layout = new FillLayout(); composite2.setLayout(layout); final Browser browser = new Browser(composite2, SWT.NONE); toolkit.adapt(browser); browser.setText("<html><body>CONTENT</body></html>");
/** * {@inheritDoc} */ public void refresh() { String text= getInputText(fDescriptor); if (text != null && text.length() > 0) { if ((fBrowser.getShell().getStyle() & SWT.RIGHT_TO_LEFT) != 0) { final StringBuffer buffer= new StringBuffer(text); HTMLPrinter.insertStyles(buffer, new String[] { "direction:rtl", "overflow:hidden"}); //$NON-NLS-1$ //$NON-NLS-2$ text= buffer.toString(); } } fBrowser.setText(text); }
public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final URL url = ShellSnippet.class.getResource("/icons/full/message_error.gif"); final Browser browser = new Browser(shell, SWT.MOZILLA); final String html = String.format("<html><head/><body>image: <img src=\"%s\"/></body></html>", url); browser.setText(html); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); }
/** * Sets content in the browser that displays a message after 1500ms if tips * could not be loaded. */ private void loadWaitingScript() { fBrowser.setText(getWaitingScript(1500)); while (!isDisposed()) { if (!getDisplay().readAndDispatch()) { break; } } }
public static void setThing(ActionContext actionContext){ Thing thing = actionContext.getObject("thing"); Browser browser = actionContext.getObject("browser"); if(thing != null){ browser.setUrl(XWorkerUtils.getThingDescUrl(thing)); }else{ browser.setText("Thing is null"); } } }
public static void setThing(ActionContext actionContext){ //World world = World.getInstance(); Browser browser = (Browser) actionContext.get("browser"); Thing thing = (Thing) actionContext.get("thing"); if(thing != null){ String webUrl = XWorkerUtils.getThingDescUrl(thing); browser.setUrl(webUrl); }else{ browser.setText("Thing not exists"); } } }
private void setHtmlWithEditor() { CAS cas = editor.getDocument().getCAS(); String html = cas.getDocumentText(); browser.setText(html); browser.refresh(); }
/** * Sets content in the browser that displays a message after 1500ms if the Tip * could not load fast enough. */ private void loadTimeOutScript() { fBrowser.setText(getLoadingScript(500)); while (!isDisposed()) { if (!getDisplay().readAndDispatch()) { break; } } }
public void run(){ ((Browser) actionContext.get("sysBrowser")).setText(""); SwtTextUtils.setText(actionContext.get("inputTxt"), ""); showHtml(XWorkerUtils.getThingDescUrl(getThing()), false); runChild(child); } });
public void run(){ ((Browser) actionContext.get("sysBrowser")).setText(""); SwtTextUtils.setText(actionContext.get("inputTxt"), ""); showHtml(XWorkerUtils.getThingDescUrl(getThing()), false); show(); } });
public void run(){ ((Browser) actionContext.get("sysBrowser")).setText(""); SwtTextUtils.setText(actionContext.get("inputTxt"), ""); showHtml(XWorkerUtils.getThingDescUrl(getThing()), false); show(); } });