org.eclipse.swt.browser.Browser.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(196)

本文整理了Java中org.eclipse.swt.browser.Browser.<init>()方法的一些代码示例,展示了Browser.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.<init>()方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:<init>

Browser.<init>介绍

[英]Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
[中]

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

protected Browser createBrowser() {
 return new Browser( composite, SWT.NONE );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Ask for user Agent of the available browser.
 *
 * @return a string that contains the user agent of the browser.
 */
protected String getUserAgent() {
 Browser browser;
 try {
  browser = new Browser(  new Shell(), SWT.NONE );
 } catch ( SWTError e ) {
  log.logError( "Could not open a browser", e );
  return  "";
 }
 String userAgent = browser.evaluate( "return window.navigator.userAgent;" ).toString();
 browser.close();
 return userAgent;
}

代码示例来源:origin: pentaho/pentaho-kettle

browser = new Browser( parent, SWT.NONE );
browser.addKeyListener( new KeyListener() {
 @Override public void keyPressed( KeyEvent keyEvent ) {

代码示例来源:origin: pentaho/pentaho-kettle

public void createDialog( String title, String url, int options, Image logo ) {
 Shell parent = getParent();
 display = parent.getDisplay();
 dialog = new Shell( parent, options );
 dialog.setText( title );
 dialog.setImage( logo );
 dialog.setSize( width, height );
 dialog.setLayout( new FillLayout() );
 try {
  browser = new Browser( dialog, SWT.NONE );
  browser.setUrl( url );
  browser.addCloseWindowListener( new CloseWindowListener() {
   @Override
   public void close( WindowEvent event ) {
    Browser browser = (Browser) event.widget;
    Shell shell = browser.getShell();
    shell.close();
   }
  } );
 } catch ( Exception e ) {
  MessageBox messageBox = new MessageBox( dialog, SWT.ICON_ERROR | SWT.OK );
  messageBox.setMessage( "Browser cannot be initialized." );
  messageBox.setText( "Exit" );
  messageBox.open();
 }
 setPosition();
 dialog.open();
}

代码示例来源:origin: pentaho/pentaho-kettle

wBrowser = new Browser( shell, SWT.NONE );
props.setLook( wBrowser );

代码示例来源:origin: pentaho/pentaho-kettle

message = new Browser( rightSash, SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL );
FormData fdMessage = new FormData();
fdMessage.left = new FormAttachment( 0, 0 );

代码示例来源:origin: pentaho/pentaho-kettle

separator.setLayoutData( separatorFormData );
browser = new Browser( dialog, SWT.NONE );
browser.setUrl( url );

代码示例来源:origin: eclipse-color-theme/eclipse-color-theme

private Browser getBrowser() {
  if (browser != null)
    return browser;
  try {
    browser = new Browser(themeDetails, SWT.BORDER | SWT.NO_SCROLL);
  } catch (SWTError e) {
    try {
      browser = new Browser(themeDetails, SWT.BORDER | SWT.WEBKIT);
    } catch (SWTError e1) {
      e.printStackTrace();
      e1.printStackTrace();
    }
  }
  return browser;
}

代码示例来源:origin: pentaho/pentaho-kettle

wBrowser = new Browser( shell, SWT.NONE );
props.setLook( wBrowser );

代码示例来源:origin: stackoverflow.com

Browser = require "zombie"
sites = ['http://yahoo.com', 'http://google.com', 'http://msn.com']

process = (site) ->
 b = new Browser()
 b.visit site, () ->
  title = b.text title
  console.log title
  b.close()

process site for site in sites

代码示例来源:origin: stackoverflow.com

include(/your-path/Browser.php);
$browser = new Browser();
  if( $browser->getBrowser() == Browser::BROWSER_IE && $browser->getVersion() >= 8 ) 
    {
      echo "Your browser is Internet explorer version 8";                                                                                                                                    
  }

代码示例来源:origin: stackoverflow.com

var html = string.Format(
     "<html><body><h4>Opening ...</h4><script type='text/javascript'>window.open('about:blank', '{0}');</script></body></html>",
     popupWindowName);
   var w = new Browser();
   w.NavigateToString(html);

代码示例来源:origin: winterstein/Eclipse-Markdown-Editor-Plugin

/**
 * This is a callback that will allow us
 * to create the viewer and initialize it.
 */
@Override
public void createPartControl(Composite parent) {
  viewer = new Browser(parent, SWT.MULTI); // | SWT.H_SCROLL | SWT.V_SCROLL
}

代码示例来源:origin: stackoverflow.com

import groovy.grape.Grape

@Grab(group="org.gebish", module="geb-core", version="0.9.0-RC-1")
@Grab(group="org.seleniumhq.selenium", module="selenium-firefox-driver", version="2.28.0")

import geb.Browser

def browser = new Browser()
browser.go "http://doodle.com/xyz"
browser.find(".maybefind").find("a", 0).click()
browser.find("a").each({
    element -> println element.text()
  })
browser.quit()

代码示例来源:origin: stackoverflow.com

public class TestCase {
 Browser browser = new Browser();             // <-- this line changed
 Selenium selenium;
 // constructor
 public TestCase(Browser browser){            // <-- this line changed
   this.browser = browser;                  // <-- this line was added
   selenium = browser.getSelenium();
 }
 ...

代码示例来源:origin: stackoverflow.com

public class Grid {
 Browser browser = new Browser();
 TestCase testCase = new TestCase(browser); // <-- this line changed
 public Grid() {
 ...

代码示例来源:origin: stackoverflow.com

JFrame frame = new JFrame();
 frame.setSize(800, 600);
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 Browser browser = new Browser();
 frame.getContentPane().add(browser);
 frame.setVisible(true);
 // wait until the browser is ready to work
 browser.waitReady();

代码示例来源:origin: BiglySoftware/BiglyBT

protected
BrowserWrapperSWT(
  Composite        composite,
  int				style )
{
  browser = new Browser( composite, style );
  
  browser.setData( BrowserWrapperSWTFactory.BROWSER_KEY, true );
}

代码示例来源:origin: stackoverflow.com

Browser = require "zombie"
arr = new Array("http://yahoo.com", "http://google.com", "http://msn.com")
i = 0
createBrowser = (url) ->
  b = new Browser()
  b.visit url, -> console.log b.text "title"
  b.close()

while i < arr.length
  createBrowser(arr[i++])

代码示例来源:origin: stackoverflow.com

public class Grid {
 Browser browser = new Browser();
 TestCase testCase = new TestCase();
 public Grid() {
 ...

相关文章