本文整理了Java中org.eclipse.swt.browser.Browser.setLayoutData()
方法的一些代码示例,展示了Browser.setLayoutData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.setLayoutData()
方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:setLayoutData
暂无
代码示例来源:origin: pentaho/pentaho-kettle
fdBrowser.right = new FormAttachment( 100, 0 );
fdBrowser.bottom = new FormAttachment( 100, -buttonHeight );
wBrowser.setLayoutData( fdBrowser );
代码示例来源:origin: pentaho/pentaho-kettle
fdMessage.top = new FormAttachment( 0, 0 );
fdMessage.bottom = new FormAttachment( 0, 100 );
message.setLayoutData( fdMessage );
代码示例来源:origin: pentaho/pentaho-kettle
/**
* maximizeBrowser
*
* @param browser
* the browser object to maximize. We try to take up as much of the Spoon window as possible.
*/
private static void maximizeExpandedContent( Browser browser ) {
SashForm sash = (SashForm) spoonInstance().getDesignParent();
int[] weights = sash.getWeights();
int[] savedSashWeights = new int[weights.length];
System.arraycopy( weights, 0, savedSashWeights, 0, weights.length );
spoonInstance().getTabSet().getSelected().setSashWeights( savedSashWeights );
weights[0] = 0;
weights[1] = 1000;
sash.setWeights( weights );
FormData formData = new FormData();
formData.top = new FormAttachment( 0, 0 );
formData.left = new FormAttachment( 0, 0 );
formData.bottom = new FormAttachment( 100, 0 );
formData.right = new FormAttachment( 100, 0 );
browser.setLayoutData( formData );
browser.getParent().layout( true );
browser.getParent().redraw();
}
}
代码示例来源:origin: pentaho/pentaho-kettle
browser.setLayoutData( fdBrowser );
代码示例来源:origin: pentaho/pentaho-kettle
browserFormData.left = new FormAttachment( 0, 5 );
browserFormData.right = new FormAttachment( 100, -5 );
browser.setLayoutData( browserFormData );
代码示例来源:origin: pentaho/pentaho-kettle
fdBrowser.right = new FormAttachment( 100, 0 );
fdBrowser.left = new FormAttachment( 0, 0 );
wBrowser.setLayoutData( fdBrowser );
wBrowser.setUrl( url );
代码示例来源:origin: eclipse-color-theme/eclipse-color-theme
Browser browser = getBrowser();
if (browser != null) {
browser.setLayoutData(gridData);
browser.setText("<html><body></body></html>");
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void
setLayoutData(
Object data )
{
browser.setLayoutData( data );
}
代码示例来源:origin: stackoverflow.com
Bundle bundle = Platform.getBundle("org.mozilla.xulrunner"); //$NON-NLS-1$
if (bundle != null) {
URL resourceUrl = bundle.getResource("xulrunner"); //$NON-NLS-1$
if (resourceUrl != null) {
try {
URL fileUrl = FileLocator.toFileURL(resourceUrl);
File file = new File(fileUrl.toURI());
System.setProperty("org.eclipse.swt.browser.DefaultType",
"mozilla");
System.setProperty(
"org.eclipse.swt.browser.XULRunnerPath", file.getAbsolutePath()); //$NON-NLS-1$
} catch (IOException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
} else {
System.err.println("Could not find XULrunner bundle");
}
Browser webBrowser = new Browser(parent, SWT.MOZILLA);
GridData grid = new GridData(GridData.FILL_BOTH);
webBrowser.setLayoutData(grid);
// Prepending "file://" prevents the "<driveletter> is not a registered protocol" error
String graphUrl = "file://C:/Users/you/yourGraph.html"
webBrowser.setUrl(graphUrl);
代码示例来源:origin: stackoverflow.com
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
代码示例来源:origin: org.codehaus.openxma/xmartserver
GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
gridData.horizontalSpan = 3;
swtBrowser.setLayoutData(gridData);
activated = true;
} catch (SWTException ex) {
代码示例来源:origin: org.codehaus.openxma/xmartclient
GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
gridData.horizontalSpan = 3;
swtBrowser.setLayoutData(gridData);
activated = true;
} catch (SWTException ex) {
代码示例来源:origin: stackoverflow.com
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
browser.addLocationListener(new LocationListener() {
public void changing(LocationEvent event) {
代码示例来源:origin: stackoverflow.com
toolkit.adapt(browser);
toolkit.paintBordersFor(browser);
browser.setLayoutData(browserGD);
代码示例来源:origin: stackoverflow.com
public static void main( String[] args ) {
String html = "<html><head></head><body>";
for( int i = 0; i < 100; i++ ) {
html += "<h2 id=\"id" + i + "\">This is header " + i + "</h2>";
}
html += "</body></html>";
Display display = new Display();
Shell shell = new Shell( display );
shell.setLayout( new GridLayout( 1, false ) );
Button button = new Button( shell, SWT.PUSH );
button.setText( "Focus header 17" );
Browser browser = new Browser( shell, SWT.BORDER );
browser.setText( html );
browser.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );
button.addListener( SWT.Selection, new Listener() {
@Override
public void handleEvent( Event event ) {
if( !browser.execute( "document.getElementById( 'id17' ).focus();" ) ) {
throw new RuntimeException( "Failed to execute Javascript" );
}
}
} );
shell.open();
while( !shell.isDisposed() ) {
if( !display.readAndDispatch() )
display.sleep();
}
display.dispose();
}
代码示例来源:origin: stackoverflow.com
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
代码示例来源:origin: stackoverflow.com
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
代码示例来源:origin: stackoverflow.com
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp
@Override
public void run() {
final Browser browser = new Browser(parent, SWT.NONE);
browser.setLayoutData(new GridData(GridData.FILL_BOTH));
browser.setText(html);
browser.addLocationListener(JavaElementLinks
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
initializeShell(shell);
Browser browser = new Browser(shell, SWT.NONE);
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
内容来源于网络,如有侵权,请联系作者删除!