本文整理汇总了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));
}
}
});
}
}
}
示例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);
}
}
示例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 );
}
示例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);
}
}
}
示例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;
}
}
示例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)));
}
示例7: getUserUrlKeyUpHandlers
import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
public HasKeyUpHandlers getUserUrlKeyUpHandlers() {
return user_textbox;
}
示例8: getUserUrlKeyUpHandlers
import com.google.gwt.event.dom.client.HasKeyUpHandlers; //导入依赖的package包/类
HasKeyUpHandlers getUserUrlKeyUpHandlers();