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


Java SelectionListener.widgetSelected方法代码示例

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


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

示例1: widgetSelected

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
@Override
		public void widgetSelected(SelectionEvent e) {
//			e.doit = false; 
			if (e.getSource() instanceof Button) {
				Button b = (Button) e.getSource();
				String text = b.getText();
				
				if (!text.isEmpty()) {
					Event e1 = new Event();
					e1.widget = VirtualKeyboard.this;
					e1.detail = text.charAt(0);
					e1.text = b.getToolTipText();
					
					for (SelectionListener l : selListener) {
						l.widgetSelected(new SelectionEvent(e1));
					}
				}
			}
		}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:20,代码来源:VirtualKeyboard.java

示例2: fireSelectionListeners

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/**
 * Fire the selection listeners
 *
 * @param mouseEvent
 *            mouse event
 * @return true if the selection could be changed, false otherwise
 */
private boolean fireSelectionListeners(final MouseEvent mouseEvent) {
	for (final SelectionListener listener : this.listOfSelectionListeners) {
		final Event event = new Event();
		event.button = mouseEvent.button;
		event.display = this.getDisplay();
		event.item = null;
		event.widget = this;
		event.data = null;
		event.time = mouseEvent.time;
		event.x = mouseEvent.x;
		event.y = mouseEvent.y;

		final SelectionEvent selEvent = new SelectionEvent(event);
		listener.widgetSelected(selEvent);
		if (!selEvent.doit) { return false; }
	}
	return true;
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:26,代码来源:SwitchButton.java

示例3: fireSelectionEvent

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的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

示例4: linkActivated

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
private void linkActivated(final Event e) {
    setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));

    final SelectionListener listener = (SelectionListener) selectionListeners.getListener();
    listener.widgetSelected(new SelectionEvent(e));

    if (!isDisposed()) {
        setCursor(getDisplay().getSystemCursor(SWT.CURSOR_HAND));
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:11,代码来源:LegacyLink.java

示例5: notifyListeners

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
private void notifyListeners() {
    final Event e = new Event();
    e.widget = this;

    final SelectionEvent se = new SelectionEvent(e);

    final SelectionListener listener = (SelectionListener) listeners.getListener(false);
    listener.widgetSelected(se);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:10,代码来源:AbstractPathCombo.java

示例6: fireSelectionEvent

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/**
 * Forward the event forward.
 * @param event event
 */
private void fireSelectionEvent(SelectionEvent event) {
    for (int i = 0; i < selectionListeners.size(); i++) {
        SelectionListener lis = (SelectionListener) selectionListeners.get(i);
        lis.widgetSelected(event);
    }
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:11,代码来源:BuilderChooser.java

示例7: fireSelectionListeners

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/**
 * Fire all selection listeners
 * 
 * @param event selection event
 * @return <code>true</code> if no listener cancels the selection,
 *         <code>false</code> otherwise
 */
private boolean fireSelectionListeners(final Event event) {
	for (final SelectionListener selectionListener : this.listeners) {
		final SelectionEvent selectionEvent = new SelectionEvent(event);
		selectionListener.widgetSelected(selectionEvent);
		if (!selectionEvent.doit) {
			return false;
		}
	}
	return true;
}
 
开发者ID:prasser,项目名称:swtrangeslider,代码行数:18,代码来源:RangeSlider.java

示例8: fireSelectionEvent

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
protected void fireSelectionEvent(MouseEvent me) {
  Event e = new Event();
  e.widget = this;
  SelectionEvent event = new SelectionEvent(e);
  event.stateMask = me.stateMask;
  event.widget = this;

  for (SelectionListener listener : selectionListeners) {
    listener.widgetSelected(event);
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:12,代码来源:BaseSelectableControl.java

示例9: notifySelection

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/***************************************************************************
 * Notify the listeners this widget's selection
 **************************************************************************/
public void notifySelection()
{
	for (SelectionListener listener : m_selectionListeners)
	{
		Event event = new Event();
		event.widget = this;
		listener.widgetSelected(new SelectionEvent(event));
	}
}
 
开发者ID:Spacecraft-Code,项目名称:SPELL,代码行数:13,代码来源:ColoredButton.java

示例10: callSelectionListeners

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/**
 * When the user click the square are this call all the register listeners, passing in the 
 * event this widget and the new color selected by the user as RGB (inside the data field of the
 * event)
 */
private void callSelectionListeners(){
	Event e = new Event();
	e.widget = this;
	SelectionEvent event = new SelectionEvent(e);
	event.data = selectedColorRGB;
	for(SelectionListener listener : selListeners){
		listener.widgetSelected(event);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:15,代码来源:ColorsSelectorWidget.java

示例11: callListeners

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/**
 * Call all the registered selection listener 
 * 
 * @param widget widget where the selection action is happened
 * @param property property cahnged by the action
 */
private void callListeners(Control widget, String property){
	 Event e = new Event();
	 e.widget = widget;
	 SelectionEvent sEvent = new SelectionEvent(e);
	 sEvent.data = property;
	 for(SelectionListener listener : selectionListeners){
		 listener.widgetSelected(sEvent);
	 }
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:16,代码来源:BordersWidget.java

示例12: fireSelection

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
void fireSelection(Control c)
{
  for (SelectionListener listener : new ArrayList<>(listeners))
  {
    Event e = new Event();
    e.item = c;
    e.widget = c;
    listener.widgetSelected(new SelectionEvent(e));
  }
}
 
开发者ID:debrief,项目名称:limpet,代码行数:11,代码来源:StackedPane.java

示例13: fireApplyPressed

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
private void fireApplyPressed(SelectionEvent e) {
	for (SelectionListener listener : listeners)
		listener.widgetSelected(e);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:PermissionDialog.java

示例14: fireTestPressed

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
private void fireTestPressed(SelectionEvent e) {
	for (SelectionListener listener : listeners) {
		listener.widgetSelected(e);
	}

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

示例15: notifyListeners

import org.eclipse.swt.events.SelectionListener; //导入方法依赖的package包/类
/**
 * Notifies listeners that the selected time has changed. This is performed
 * on the UI thread as with all SWT selection events.
 * 
 * @param e
 *            The event triggering the updated time.
 */
private void notifyListeners(SelectionEvent e) {
	e.data = getTime();
	for (SelectionListener listener : listeners) {
		listener.widgetSelected(e);
	}
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:14,代码来源:TimeSliderComposite.java


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