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


Java Label.addListener方法代码示例

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


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

示例1: addLookupConfigurationDetailsInTooltip

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void addLookupConfigurationDetailsInTooltip(final Composite container, String driverKey, String lookupKey, String lookupPort)
{
	Label driverKeyLabel = new Label(container, SWT.NONE);
	Label lookupKeyLabel = new Label(container, SWT.NONE);
	Label lookupPortLabel = new Label(container, SWT.NONE);
	driverKeyLabel.setText(DRIVER_KEY+driverKey);
	lookupKeyLabel.setText(LOOKUP_KEY+lookupKey);
	lookupPortLabel.setText(LOOKUP_PORT+lookupPort);
	driverKeyLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	driverKeyLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
	lookupKeyLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	lookupKeyLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
	lookupPortLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	lookupPortLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
	showErrorMessageWhenFieldIsEmpty(driverKey,driverKeyLabel,Messages.DRIVER_KEY_ERROR_MESSAGE);
	showErrorMessageWhenFieldIsEmpty(lookupKey,lookupKeyLabel,Messages.LOOKUP_KEY_ERROR_MESSAGE);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:18,代码来源:ComponentTooltip.java

示例2: setExternalSchemaInTooltip

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private Label setExternalSchemaInTooltip(final Composite container, String externalSchemaPath) {
	Label externalSchemaPathLabel = new Label(container, SWT.NONE);
	externalSchemaPathLabel.setText(EXTERNAL_SCHEMA_PATH + externalSchemaPath);
	externalSchemaPathLabel.setBackground(container.getDisplay().getSystemColor(
			SWT.COLOR_INFO_BACKGROUND));
	externalSchemaPathLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
	return externalSchemaPathLabel;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:ComponentTooltip.java

示例3: addJoinKeysInTooltip

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void addJoinKeysInTooltip(final Composite container, String joinKey, int index)
{
	Label joinKeyLabel = new Label(container, SWT.NONE);
	joinKeyLabel.setText(JOIN_KEY+index+":"+joinKey);
	joinKeyLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	joinKeyLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
	showErrorMessageWhenFieldIsEmpty(joinKey,joinKeyLabel,Messages.JOIN_KEY_ERROR_MESSAGE);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:ComponentTooltip.java

示例4: addRecordRequiredInTooltip

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void addRecordRequiredInTooltip(final Composite container, String recordRequired, int index)
{
	Label recordRequiredLabel = new Label(container, SWT.NONE);
	recordRequiredLabel.setText(RECORD_REQUIRED+index+":"+recordRequired);
	recordRequiredLabel.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	recordRequiredLabel.addListener(SWT.MouseUp, getMouseClickListener(container));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:8,代码来源:ComponentTooltip.java

示例5: addPropertyInTooltipWindow

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private Label addPropertyInTooltipWindow(final Composite container, PropertyToolTipInformation propertyInfo) {
	Label lblTextProperty = new Label(container, SWT.NONE);
	String propertyNameCapitalized = getCapitalizedName(propertyInfo);

	logger.debug("ComponentTooltip.addPropertyToToolTip() - propertyInfo=" + propertyInfo.toString());

	addText(propertyInfo, lblTextProperty, propertyNameCapitalized);

	lblTextProperty.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
	lblTextProperty.addListener(SWT.MouseUp, getMouseClickListener(container));
	return lblTextProperty;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:13,代码来源:ComponentTooltip.java

示例6: initialize

import org.eclipse.swt.widgets.Label; //导入方法依赖的package包/类
private void initialize(Composite composite) {
	parent = composite;

   // Call plugin listeners
	UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
	if (uiFunctions != null) {
		tabbedMDI = uiFunctions.createTabbedMDI(composite, VIEW_ID);

		CTabFolder folder = tabbedMDI.getTabFolder();
		Label lblClose = new Label(folder, SWT.WRAP);
		lblClose.setText("x");
		lblClose.addListener(SWT.MouseUp, new Listener() {
			@Override
			public void handleEvent(Event event) {
				delete();
			}
		});
		folder.setTopRight(lblClose);


		UISWTInstance pluginUI = uiFunctions.getUISWTInstance();

		registerPluginViews(pluginUI);

		if ( pluginUI != null ){
			UISWTViewEventListenerWrapper[] pluginViews = pluginUI.getViewListeners(UISWTInstance.VIEW_STATISTICS);
			for (int i = 0; i < pluginViews.length; i++) {
				UISWTViewEventListenerWrapper l = pluginViews[i];
				String name = l.getViewID();

				try {
					MdiEntrySWT entry = (MdiEntrySWT) tabbedMDI.createEntryFromEventListener(
							UISWTInstance.VIEW_STATISTICS, l, name, false, null, null);
					entry.setDestroyOnDeactivate(false);
					if ((dataSource == null && i == 0) || name.equals(dataSource)) {
						tabbedMDI.showEntry(entry);
					}
				} catch (Exception e) {
					// skip
				}
			}
		}
	}

	updateThread = new UpdateThread();
	updateThread.setDaemon(true);
	updateThread.start();

	dataSourceChanged(dataSource);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:51,代码来源:StatsView.java


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