當前位置: 首頁>>代碼示例>>Java>>正文


Java Link.setBackground方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.Link.setBackground方法的典型用法代碼示例。如果您正苦於以下問題:Java Link.setBackground方法的具體用法?Java Link.setBackground怎麽用?Java Link.setBackground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.Link的用法示例。


在下文中一共展示了Link.setBackground方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addlinkToAddPassThroughFieldsInMappingWindow

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
private void addlinkToAddPassThroughFieldsInMappingWindow(final Composite container,
		final PropertyToolTipInformation propertyInfo) {
	String propertyNameCapitalized = getCapitalizedName(propertyInfo);
	final Link link = new Link(container, SWT.NONE);
	String tempText= propertyNameCapitalized+" : <a>" + Constants.ADD_FIELDS_AS_PASSTHROUGH_FIELDS+ "</a>";		
	link.setText(tempText);
	if(component.getTargetConnections().isEmpty())
	link.setEnabled(false);	
	link.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	addMouseHoverListenerToLink(link,container);
	addSelectionListenerToLink(propertyInfo, link);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:13,代碼來源:ComponentTooltip.java

示例2: createOperationClassLink

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
/**
 * Create operation class link
 * 
 * @param container
 * @param propertyInfo
 * @param propertyNameCapitalized
 * @param filePath
 * @return
 */
private Link createOperationClassLink(final Composite container,
		PropertyToolTipInformation propertyInfo,
		String propertyNameCapitalized, final String filePath) {
	Link link = new Link(container, SWT.NONE);
	String tempText= propertyNameCapitalized + " : <a>" + propertyInfo.getPropertyValue().toString() + "</a>";		
	link.setText(tempText);
	link.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	
	addListenerToOpenOpeartionClassFile(filePath, link);
	
	logger.debug("ComponentTooltip.createOperationClassLink(): created opeartion class link=" + link);
	
	return link;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:24,代碼來源:ComponentTooltip.java

示例3: createLink

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
protected void createLink(DomainStatus status) {
	link = new Link(this, SWT.NONE);
	link.setFont(DOMAIN_STATUS_FONT);
	link.setBackground(ColorConstants.white);
	link.setText(getMessage(status));
	link.setForeground(getSeverityColor(status.getSeverity()));
	link.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			Program.launch(LICENCE_LINK);
		}
	});
}
 
開發者ID:Yakindu,項目名稱:statecharts,代碼行數:14,代碼來源:DomainStatusLabel.java

示例4: initControl

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
private void initControl() {
  GridLayoutFactory.fillDefaults().numColumns(3).spacing(3, 2).applyTo(this);
  GridLayout layout = (GridLayout) this.getLayout();
  layout.marginLeft = 7;
  layout.marginTop = 2;
  layout.marginBottom = 2;

  Label iconLabel = new Label(this, SWT.NULL);
  iconLabel.setBackground(getBackground());
  GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING).span(1, 2).applyTo(
      iconLabel);
  listenTo(iconLabel);

  Link nameLabel = new Link(this, SWT.NONE);
  nameLabel.setText(wbToolkit.getName());
  nameLabel.setBackground(getBackground());
  nameLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  nameLabel.setFont(getBoldFont(getFont()));
  listenTo(nameLabel);

  Label providerLabel = new Label(this, SWT.NONE);
  providerLabel.setText(wbToolkit.getProviderDescription());
  providerLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
  providerLabel.setBackground(getBackground());
  providerLabel.setForeground(Display.getDefault().getSystemColor(
      SWT.COLOR_GRAY));
  listenTo(providerLabel);

  Label summaryLabel = new Label(this, SWT.WRAP);
  String description = stripCRLF(wbToolkit.getDescription());
  summaryLabel.setText(description);
  summaryLabel.setBackground(getBackground());
  GridDataFactory.fillDefaults().grab(true, false).span(2, 1).hint(100,
      SWT.DEFAULT).applyTo(summaryLabel);
  listenTo(summaryLabel);

  listenTo(this);
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:39,代碼來源:ToolkitControl.java

示例5: createDialogArea

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
	/* Titre dialogue. */
	this.getShell().setText("About KSP Plugin");

	/* Layout */
	Composite container = (Composite) super.createDialogArea(parent);
	GridLayout layout = new GridLayout(1, false);
	layout.marginRight = 5;
	layout.marginLeft = 10;
	Color white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
	container.setBackground(white);
	container.setLayout(layout);

	/* Logo */
	Label lblLogo = new Label(container, SWT.NONE);
	lblLogo.setBackgroundImage(getImage());
	lblLogo.setBackground(white);
	lblLogo.setText("      ");
	lblLogo.setSize(LOGO_SIZE, LOGO_SIZE);

	/* Produit */
	Label lblProduct = new Label(container, SWT.NONE);
	lblProduct.setText("Vertigo Chroma KSP Plugin");
	lblProduct.setBackground(white);

	/* Version */
	Version version = FrameworkUtil.getBundle(getClass()).getVersion();
	String fullVersion = version.toString();
	Label lblVersion = new Label(container, SWT.NONE);
	lblVersion.setText("Version : " + fullVersion);
	lblVersion.setBackground(white);

	/* Version */
	Label lblAuthor = new Label(container, SWT.NONE);
	lblAuthor.setText("Author : @sebez");
	lblAuthor.setBackground(white);

	/* Libellé documentation */
	Label lblDoc = new Label(container, SWT.NONE);
	lblDoc.setText("Documentation, sources, releases are published in the KSP plugin github repository : ");
	lblDoc.setBackground(white);

	/* Lien vers le github */
	Link link = new Link(container, SWT.NONE);
	String message = "<a href=\"" + GITHUB_URL + "\">" + GITHUB_URL + "</a>";
	link.setText(message);
	link.setBackground(white);
	link.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			Program.launch(GITHUB_URL);
		}
	});

	return container;
}
 
開發者ID:sebez,項目名稱:vertigo-chroma-kspplugin,代碼行數:58,代碼來源:AboutDialog.java

示例6: createDialogArea

import org.eclipse.swt.widgets.Link; //導入方法依賴的package包/類
protected Control createDialogArea(Composite parent) {

		Image logoImage =
		                  ResourceManager.getPluginImage("org.wso2.developerstudio.eclipse.platform.ui",
		                                                 "icons/carbon-studio-logo.png");
		logoWidth = logoImage.getImageData().width;
		logoHeight = logoImage.getImageData().height;

		parent.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		Composite dialogArea = (Composite) super.createDialogArea(parent);
		dialogArea.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));

		Composite composite = new Composite(dialogArea, SWT.BORDER);
		composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		composite.setLayout(new GridLayout(1, false));
		composite.setSize(new Point(logoWidth + 200, logoHeight * 4));
		
		GridData gd_composite = new GridData(SWT.CENTER, SWT.TOP, true, true, 1, 1);
		gd_composite.widthHint = logoWidth + 200;
		gd_composite.heightHint = logoHeight * 4;
		 
		composite.setLayoutData(gd_composite);

		Label lblDevsLogo = new Label(composite, SWT.NONE);
		lblDevsLogo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblDevsLogo.setImage(logoImage);
		GridData gdDevsLogo = new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1);
		gdDevsLogo.widthHint = logoWidth;
		gdDevsLogo.heightHint = logoHeight;
		lblDevsLogo.setLayoutData(gdDevsLogo);

		Label lblVersion = new Label(composite, SWT.NONE);
		lblVersion.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BORDER));
		lblVersion.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblVersion.setText(KERNAL_MSG.concat(getVersion()));

		Label lblLicense = new Label(composite, SWT.NONE);
		lblLicense.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		lblLicense.setText(LICENSED);

		Link linkDevStudioUrl = new Link(composite, SWT.NONE);
		linkDevStudioUrl.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		linkDevStudioUrl.setText("Visit :<a>" + URL + "</a>");
		linkDevStudioUrl.addListener(SWT.Selection, new Listener() {
			public void handleEvent(Event event) {
				org.eclipse.swt.program.Program.launch(URL);
			}
		});

		addProductIcons(composite);
		return dialogArea;
	}
 
開發者ID:wso2,項目名稱:developer-studio,代碼行數:53,代碼來源:AboutDialog.java


注:本文中的org.eclipse.swt.widgets.Link.setBackground方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。