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


Java SWT.Selection方法代碼示例

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


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

示例1: getListener

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public Listener getListener(final PropertyDialogButtonBar propertyDialogButtonBar,
		ListenerHelper helpers, final Widget... widgets) {
	final Button button = ((Button)widgets[0]);
	button.getShell();
	if(helpers != null){
		txtDecorator = (ControlDecoration) helpers.get(HelperType.CONTROL_DECORATION);
		file_extension=(String)helpers.get(HelperType.FILE_EXTENSION);
	}
	
	Listener listener=new Listener() {
		@Override
		public void handleEvent(Event event) {
			if(event.type==SWT.Selection){
				FilterOperationClassUtility.INSTANCE.browseFile(file_extension,((Text) widgets[0]));
					propertyDialogButtonBar.enableApplyButton(true);
					txtDecorator.hide();
			}
		}
	};
	return listener;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:23,代碼來源:ELTSchemaDialogSelectionListener.java

示例2: selectAsciispec

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
private void selectAsciispec(Event e) {
	switch (e.type) {
	case SWT.Selection:
		DirectoryDialog dialog = new DirectoryDialog(Display.getCurrent().getActiveShell(), SWT.OPEN | SWT.MULTI);
		dialog.setText("Select the Asciispec binary directory");
		String result = dialog.open();
		if (result != null && !result.isEmpty()) {
			txtAsciispecBinaryDir.setText(result);
			saveAsciispecBinDir(result);
		}
		break;
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:14,代碼來源:SpecConfigOutputPage.java

示例3: fireEvent

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
private void fireEvent () {
	if (listener != null) {
		Event changeEvent = new Event();
		changeEvent.type = SWT.Selection;
		listener.handleEvent(changeEvent);
	}		
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:8,代碼來源:FolderSelectionGroup.java

示例4: handleEvent

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
public void handleEvent(Event e) {
	if (!notification)
		return;
	switch (e.type) {
	case SWT.Selection:
		EdgeGW4EEditPartProperties properties = (EdgeGW4EEditPartProperties) node
				.getAdapter(IPropertySource.class);
		properties.setPropertyValue(ModelProperties.PROPERTY_BLOCKED, btnCheckBlocked.getSelection());
		break;
	}
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:12,代碼來源:EdgeDefaultSection.java

示例5: handleEvent

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
public void handleEvent(Event e) {
	if (!notification)
		return;
	switch (e.type) {
	case SWT.Selection:
		GW4EVertexEditPartProperties properties = (GW4EVertexEditPartProperties) sectionProvider
				.getAdapter(IPropertySource.class);
		properties.setPropertyValue(ModelProperties.PROPERTY_VERTEX_SHARED, btnCheckShrd.getSelection());
		break;
	}
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:12,代碼來源:VertexDefaultSection.java

示例6: removeListener

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public void removeListener( int eventType, Listener listener ) {
	boolean wasListening = isListening( SWT.Selection );
	super.removeListener( eventType, listener );
	if( eventType == SWT.Selection && wasListening ) {
		if( !isListening( SWT.Selection ) ) {
			remoteObject.listen( "Selection", false );
		}
	}
}
 
開發者ID:weadmindev,項目名稱:network-device-panel,代碼行數:11,代碼來源:DevicePanelSvg.java

示例7: fireSelectionEvent

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
void fireSelectionEvent() {
	final Event event = new Event();
	event.widget = this.parentBreadcrumb;
	event.display = getDisplay();
	event.item = this;
	event.type = SWT.Selection;
	for (final SelectionListener selectionListener : this.selectionListeners) {
		selectionListener.widgetSelected(new SelectionEvent(event));
	}
}
 
開發者ID:sergueik,項目名稱:SWET,代碼行數:11,代碼來源:BreadcrumbItem.java

示例8: getListener

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public Listener getListener(PropertyDialogButtonBar propertyDialogButtonBar, final ListenerHelper helpers, Widget... widgets) {
	Listener listener = new Listener() {
		public void handleEvent(Event event) {
			if (event.type == SWT.Selection) {
				if(helpers.object instanceof ELTRuntimePropertiesWidget)
					((ELTRuntimePropertiesWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof SecondaryColumnKeysWidget) 
					((SecondaryColumnKeysWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof LoadTypeConfigurationWidget) 
					((LoadTypeConfigurationWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof InputAdditionalParametersWidget) 
					((InputAdditionalParametersWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof OutputAdditionalParametersWidget) 
					((OutputAdditionalParametersWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof AuthenticationWidget)
					((AuthenticationWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof OperationConfigWidget)
					((OperationConfigWidget)helpers.object).newWindowLauncher();
				else if(helpers.object instanceof ExcelFormattingWidget) 
					((ExcelFormattingWidget)helpers.object).newWindowLauncher();
			}

		}
	};

	return listener;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:29,代碼來源:ELTRuntimeButtonClickListener.java

示例9: getListener

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public Listener getListener(final PropertyDialogButtonBar propertyDialogButtonBar, ListenerHelper helpers,
		final Widget... widgets) {
	final Button button = ((Button) widgets[0]);
	button.getShell();
	if (helpers != null) {
		txtDecorator = (ControlDecoration) helpers.get(HelperType.CONTROL_DECORATION);
	}

	Listener listener = new Listener() {
		@Override
		public void handleEvent(Event event) {
			LOGGER.debug("Launching Directory Dialog for selecting directory path");
			if (event.type == SWT.Selection) {
				String path = null;
				DirectoryDialog filedialog = new DirectoryDialog(button.getShell(), SWT.None);
				filedialog.setFilterPath(((Text) widgets[1]).getText());
				path=filedialog.open();
				if (StringUtils.isNotEmpty(path)) {
					((Text) widgets[1]).setText(path);
					propertyDialogButtonBar.enableApplyButton(true);
					txtDecorator.hide();
				}
			}
		}
	};
	return listener;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:29,代碼來源:DirectoryDialogSelectionListener.java

示例10: getListenerType

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public int getListenerType() {
	
	return SWT.Selection;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:6,代碼來源:ELTCreateNewClassListener.java

示例11: getListenerType

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public int getListenerType() {

	return SWT.Selection;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:6,代碼來源:ELTSelectionTaskListener.java

示例12: getListenerType

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public int getListenerType() {
     return SWT.Selection;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:5,代碼來源:ELTGridDeleteSelectionListener.java

示例13: getListenerType

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public int getListenerType() {
	 
	return SWT.Selection;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:6,代碼來源:ELTEnableButtonListener.java

示例14: getListenerType

import org.eclipse.swt.SWT; //導入方法依賴的package包/類
@Override
public int getListenerType() {
	return SWT.Selection;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:5,代碼來源:ELTFileDialogSelectionListener.java


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