当前位置: 首页>>代码示例>>Java>>正文


Java Browser.setLayoutData方法代码示例

本文整理汇总了Java中org.eclipse.swt.browser.Browser.setLayoutData方法的典型用法代码示例。如果您正苦于以下问题:Java Browser.setLayoutData方法的具体用法?Java Browser.setLayoutData怎么用?Java Browser.setLayoutData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.browser.Browser的用法示例。


在下文中一共展示了Browser.setLayoutData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDialogArea

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent){
   Composite composite = (Composite) super.createDialogArea(parent);

   Browser browser = new Browser(composite, SWT.NONE);
   browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

   try {
      String html = new String(ResourceUtils.getBundleResourceBytes(CoreConstants.PLUGIN_UI, "resources/about.html"));
      html = html.replaceAll("currentYear", ""+Calendar.getInstance().get(Calendar.YEAR));
      browser.setText(html);

   } catch (Exception e) {
      setErrorMessage(e.getLocalizedMessage());
   }
   return composite;
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:17,代码来源:AboutDialog.java

示例2: createDialogArea

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);

    GridLayout layout = new GridLayout(1, false);
    composite.setLayout(layout);

    GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
    composite.setLayoutData(data);

    Browser browser = new Browser(composite, SWT.NONE);
    browser.setText(browserString);
    browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    
    if (Util.isMac())
        browser.refresh();
    
    composite.pack();

    return composite;
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:22,代码来源:VersionsDiffBrowserDialog.java

示例3: createFieldEditors

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
/**
 *
 */
public void createFieldEditors() {
	NStringFieldEditor tf = new NStringFieldEditor(CsvExporterConfiguration.PROPERTY_RECORD_DELIMITER,
			Messages.CSVExporterPreferencePage_3, 4, getFieldEditorParent());
	tf.setEmptyStringAllowed(false);
	tf.setTextLimit(10);
	addField(tf);
	HelpSystem.setHelp(tf.getTextControl(getFieldEditorParent()),
			StudioPreferencePage.REFERENCE_PREFIX + tf.getPreferenceName());

	tf = new NStringFieldEditor(CsvExporterConfiguration.PROPERTY_FIELD_DELIMITER,
			Messages.CSVExporterPreferencePage_4, 4, getFieldEditorParent());
	tf.setEmptyStringAllowed(false);
	tf.setTextLimit(10);
	addField(tf);
	HelpSystem.setHelp(tf.getTextControl(getFieldEditorParent()),
			StudioPreferencePage.REFERENCE_PREFIX + tf.getPreferenceName());

	Browser lbl = BrowserUtils.getSWTBrowserWidget(getFieldEditorParent(), SWT.MULTI);
	lbl.setText(Messages.CSVExporterPreferencePage_5);

	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.horizontalSpan = 2;
	lbl.setLayoutData(gd);

}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:29,代码来源:CSVExporterPreferencePage.java

示例4: createPartControl

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
	GridLayoutFactory.fillDefaults().numColumns(1).applyTo(parent);
	parent.setLayoutData(new GridData(GridData.FILL_BOTH));
	cmp = new Composite(parent, SWT.BORDER);
	GridLayoutFactory.fillDefaults().numColumns(1).applyTo(cmp);
	GridDataFactory.fillDefaults().grab(true, true).applyTo(cmp);
	
	browser = new Browser(cmp, SWT.NONE);
	browser.setLayoutData(new GridData(GridData.FILL_BOTH));
	browser.setUrl(htmlUrl);

	browser.addMouseListener(new MouseAdapter() {
		@Override
		public void mouseDown(MouseEvent e) {
			getSite().getPart().setFocus();
			super.mouseDown(e);
		}
	});
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:21,代码来源:HtmlBrowserEditor.java

示例5: createBrowserSection

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
private void createBrowserSection( Composite parent )
{
	browserContainer = toolkit.createComposite( parent );
	browserContainer.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	GridLayout layout = new GridLayout( );
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.horizontalSpacing = 0;
	layout.verticalSpacing = 0;
	layout.numColumns = 1;
	browserContainer.setLayout( layout );

	browser = new Browser( browserContainer, SWT.NONE );
	browser.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	browser.addLocationListener( new ReportLocationListener( this ) );
	sashForm.setMaximizedControl( browserContainer );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:StaticHTMLViewer.java

示例6: createToolTipContentArea

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
protected Composite createToolTipContentArea(Event event,
		Composite parent) {
	Composite comp = new Composite(parent, SWT.NONE);
	GridLayout l = new GridLayout(1, false);
	l.horizontalSpacing = 0;
	l.marginWidth = 0;
	l.marginHeight = 0;
	l.verticalSpacing = 0;

	comp.setLayout(l);
	Browser browser = new Browser(comp, SWT.BORDER);
	browser.setText(getText(event));
	browser.setLayoutData(new GridData(200, 150));

	return comp;
}
 
开发者ID:xored,项目名称:q7.quality.mockups,代码行数:17,代码来源:TreeWithTooltipSupport.java

示例7: BrowserComposite

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
public BrowserComposite(Composite parentComposite, int flags, BrowserListener browserListener) {
	super(parentComposite, flags);

	setLayout(new GridLayout());

	// the browser itself
	browser = new Browser(this, SWT.NONE);
	browser.setDragDetect(false);

	// setup layout data for the browser
	GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
	browser.setLayoutData(gridData);

	browser.addLocationListener(browserListener);
	browser.addProgressListener(browserListener);
	browser.addMenuDetectListener(browserListener);
}
 
开发者ID:jeromewagener,项目名称:Sammelbox,代码行数:18,代码来源:BrowserComposite.java

示例8: maximizeExpandedContent

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
/**
 * 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();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:ExpandedContentManager.java

示例9: createPartControl

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
  final Composite composite = new Composite(parent, SWT.NONE);
  composite.setLayout(new GridLayout(1, true));
  browser = new Browser(composite, SWT.NONE);
  browser.setLayoutData(new GridData(GridData.FILL_BOTH));
}
 
开发者ID:JuliaComputing,项目名称:JuliaDT,代码行数:8,代码来源:JuliaCanvas.java

示例10: initUi

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
public Composite initUi(final Composite parent) {
	final Composite content = toolkit.createComposite(parent);
	final GridLayout layout = new GridLayout(1, false);
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	content.setLayout(layout);

	browser = new Browser(content, SWT.NONE);
	browser.setLayoutData(new GridData(GridData.FILL_BOTH));
	browser.setText(readPage());

	btnShow = toolkit.createButton(content, "Diese Ansicht beim Start anzeigen", SWT.CHECK);
	setCheckBoxt();
	btnShow.addSelectionListener(new SelectionAdapter() {

		@Override
		public void widgetSelected(final SelectionEvent e) {
			try {
				ServiceLocator.getInstance().getCuratorService()
						.toggleWelcome(SessionHolder.getInstance().getCurator().getId());
				setCheckBoxt();
			} catch (final ConnectException exception) {
				handle(exception);
			}
		}
	});
	return content;
}
 
开发者ID:FI13,项目名称:afbb-bibo,代码行数:30,代码来源:WelcomeView.java

示例11: initializeBrowser

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
private void initializeBrowser(Composite parent){
	m_browser = new Browser(parent, SWT.BORDER);
	GridData browserGrid = new GridData();
	browserGrid.horizontalSpan = 2;
	m_browser.setLayoutData(browserGrid);
	m_browser.setSize(800, 400);
       MainProcessor.instance().displayContent(null);
}
 
开发者ID:scouter-project,项目名称:scouter,代码行数:9,代码来源:StackAnalyzerView.java

示例12: createFieldEditors

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
/**
 *
 */
public void createFieldEditors() {
	NStringFieldEditor tf = new NStringFieldEditor(CsvExporterConfiguration.PROPERTY_RECORD_DELIMITER,
			Messages.CSVExporterPreferencePage_3, 4, getFieldEditorParent());
	tf.setEmptyStringAllowed(false);
	tf.setTextLimit(10);
	addField(tf);
	HelpSystem.setHelp(tf.getTextControl(getFieldEditorParent()),
			StudioPreferencePage.REFERENCE_PREFIX + tf.getPreferenceName());

	tf = new NStringFieldEditor(CsvExporterConfiguration.PROPERTY_FIELD_DELIMITER,
			Messages.CSVExporterPreferencePage_4, 4, getFieldEditorParent());
	tf.setEmptyStringAllowed(false);
	tf.setTextLimit(10);
	addField(tf);
	HelpSystem.setHelp(tf.getTextControl(getFieldEditorParent()),
			StudioPreferencePage.REFERENCE_PREFIX + tf.getPreferenceName());

	Browser browser = BrowserUtils.getSWTBrowserWidget(getFieldEditorParent(), SWT.MULTI);
	browser.setText(Messages.CSVExporterPreferencePage_5);

	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.horizontalSpan = 2;
	browser.setLayoutData(gd);

	BooleanFieldEditor bf = new BooleanFieldEditor(CsvMetadataReportConfiguration.PROPERTY_WRITE_HEADER,
			Messages.CSVMetadataExporterPreferencePage_writeHeaders, getFieldEditorParent());
	addField(bf);
	HelpSystem.setHelp(bf.getDescriptionControl(getFieldEditorParent()),
			StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());

	tf = new NStringFieldEditor(CsvMetadataReportConfiguration.PROPERTY_COLUMN_NAMES_PREFIX,
			Messages.CSVMetadataExporterPreferencePage_columnNames, getFieldEditorParent());
	addField(tf);
	HelpSystem.setHelp(tf.getTextControl(getFieldEditorParent()),
			StudioPreferencePage.REFERENCE_PREFIX + tf.getPreferenceName() + ".{suffix}"); //$NON-NLS-1$
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:40,代码来源:CSVMetadataExporterPreferencePage.java

示例13: createBrowser

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Browser createBrowser(final Composite parent, final Object layoutData) throws SWTError {
  final Browser browser = new Browser(parent, SWT.NONE);
  browser.setLayoutData(layoutData);
  return browser;
}
 
开发者ID:sealuzh,项目名称:PerformanceHat,代码行数:10,代码来源:ControlFactoryImpl.java

示例14: createBrowser

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
private Browser createBrowser(Composite parent) {
	GridLayout gridLayout = new GridLayout();
	gridLayout.numColumns = 1;
	parent.setLayout(gridLayout);
	Browser browser = new Browser(parent, WebEngineUtils.getBrowserType());
	GridData data = new GridData();
	data.horizontalAlignment = GridData.FILL;
	data.verticalAlignment = GridData.FILL;
	data.horizontalSpan = 1;
	data.grabExcessHorizontalSpace = true;
	data.grabExcessVerticalSpace = true;
	browser.setLayoutData(data);
	return browser;
}
 
开发者ID:wso2,项目名称:developer-studio,代码行数:15,代码来源:WelcomePageEditor.java

示例15: createPage1

import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
/**
 * Creates page 1 of the multi-page editor, which is used to preview the page .
 */
void createPage1() {
	Composite composite = new Composite(getContainer(), SWT.NONE);
	
	RowLayout layout = new RowLayout();
	layout.wrap = false;
	layout.pack = true;
	layout.justify = true;
	layout.type = SWT.VERTICAL;
	layout.marginLeft = 5;
	layout.marginTop = 5;
	layout.marginRight = 5;
	layout.marginBottom = 5;
	layout.spacing = 0;
	composite.setLayout(layout);
	
	browser = new Browser(composite, SWT.NONE);
	browser.setLayoutData(new RowData(640, 360));


	Button previewOnGlass = new Button(composite, SWT.NONE);
	previewOnGlass.setText("#throughglass");


	previewOnGlass.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent event) {
			if(!setClientprovider()) {
				GoogleLogin.promptToLogIn("Glassmaker");
			}			
			if (GoogleLogin.getInstance().isLoggedIn())
				previewOnGlass();
		}
	});

	int index = addPage(composite);
	setPageText(index, "Preview");
	
}
 
开发者ID:eteration,项目名称:glassmaker,代码行数:41,代码来源:CardEditor.java


注:本文中的org.eclipse.swt.browser.Browser.setLayoutData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。