當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。