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


Java HasKeyUpHandlers类代码示例

本文整理汇总了Java中com.google.gwt.event.dom.client.HasKeyUpHandlers的典型用法代码示例。如果您正苦于以下问题:Java HasKeyUpHandlers类的具体用法?Java HasKeyUpHandlers怎么用?Java HasKeyUpHandlers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HasKeyUpHandlers类属于com.google.gwt.event.dom.client包,在下文中一共展示了HasKeyUpHandlers类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setKeyReleased

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
public void setKeyReleased(JavaScriptObject aValue) {
	if (keyReleased != aValue) {
		if (keyUpReg != null) {
			keyUpReg.removeHandler();
			keyUpReg = null;
		}
		keyReleased = aValue;
		if (keyReleased != null && component instanceof HasKeyUpHandlers) {
			keyUpReg = ((HasKeyUpHandlers) component).addKeyUpHandler(new KeyUpHandler() {
				@Override
				public void onKeyUp(KeyUpEvent event) {
					if (keyReleased != null) {
						event.stopPropagation();
						executeEvent(keyReleased, EventsPublisher.publish(event));
					}
				}

			});
		}
	}
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:22,代码来源:EventsExecutor.java

示例2: initializeEditors

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
/**
 * initialize one editor.
 *
 * @param editor editor to initialize
 */
@SuppressWarnings({"rawtypes", "unchecked"})
public void initializeEditors(final Object editor) {
  if (editor instanceof HasValueChangeHandlers && this.valueChangeHandler != null) {
    ((HasValueChangeHandlers) editor).addValueChangeHandler(this.valueChangeHandler);
    // if widget has a value change handler, validate on change
    if (this.validateOnVueChangeHandler != null) {
      ((HasValueChangeHandlers) editor).addValueChangeHandler(this.validateOnVueChangeHandler);
    }
  }
  // if widget has a key up handler, validate on key up
  if (editor instanceof HasKeyUpHandlers && this.validateOnKeyUpHandler != null) {
    ((HasKeyUpHandlers) editor).addKeyUpHandler(this.validateOnKeyUpHandler);
  }
  // try to submit form on return
  if (editor instanceof HasKeyPressHandlers && this.commitOnReturnHandler != null) {
    ((HasKeyPressHandlers) editor).addKeyPressHandler(this.commitOnReturnHandler);
  }
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:24,代码来源:BeanValidationInitializer.java

示例3: setEditor

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
public void setEditor( T editor, boolean fShowCancel )
{
	m_table.clear();

	m_editor = editor;

	if( m_editor != null )
	{
		m_table.setWidget( 0, 0, m_editor );

		if( m_editor instanceof HasKeyUpHandlers )
			((HasKeyUpHandlers) m_editor).addKeyUpHandler( this );

		if( m_editor instanceof Focusable )
			((Focusable) m_editor).setFocus( true );
	}

	m_table.setWidget( 0, 1, m_okBut );
	if( fShowCancel )
		m_table.setWidget( 0, 2, m_cancelBut );
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:22,代码来源:Validator.java

示例4: addKeyUpHandler

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
/**
 * Sets the KeyUp() event handler in many widgets
 * @param handler the handler
 * @param widgets the widgets
 */
public static void addKeyUpHandler(final KeyUpHandler handler,final HasKeyUpHandlers... widgets) {
	if (handler != null && widgets != null && widgets.length > 0) {
		for (HasKeyUpHandlers w : widgets) {
			if (w != null) w.addKeyUpHandler(handler);
		}
	}
}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:13,代码来源:GWTWidgets.java

示例5: addKeyUpHandler

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
@Override
public HandlerRegistration addKeyUpHandler(final KeyUpHandler pkeyUpHandler) {
  if (this.contents.getWidget() instanceof HasKeyUpHandlers) {
    return ((HasKeyUpHandlers) this.contents.getWidget()).addKeyUpHandler(pkeyUpHandler);
  } else {
    return null;
  }
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:9,代码来源:AbstractDecorator.java

示例6: keyUp

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
private static Observable<KeyUpEvent> keyUp(HasKeyUpHandlers source) {
    return Observable.create(s -> register(s, source.addKeyUpHandler(s::onNext)));
}
 
开发者ID:intendia-oss,项目名称:autorest,代码行数:4,代码来源:ExampleEntryPoint.java

示例7: getUserUrlKeyUpHandlers

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
public HasKeyUpHandlers getUserUrlKeyUpHandlers() {
    return user_textbox;
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:4,代码来源:HomeView.java

示例8: getUserUrlKeyUpHandlers

import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
HasKeyUpHandlers getUserUrlKeyUpHandlers(); 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:2,代码来源:HomePanelPresenter.java


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