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


Java KeyUpHandler类代码示例

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


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

示例1: postConstruct

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
/**
 * Called after construction.
 */
@PostConstruct
protected void postConstruct() {
	servicesPanel.add(serviceFlowListWidget);

	String filterTxt = (String)stateService.get(ApplicationStateKeys.SERVICES_LIBRARY_FILTER_TEXT);
	filterServicesTextBox.setText(filterTxt);
	
 filterServicesTextBox.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
        	stateService.put(ApplicationStateKeys.SERVICES_LIBRARY_FILTER_TEXT, filterServicesTextBox.getText());
        	// Update status
        	populateGrid(currentServices);
        }
    });
 
	// Tooltips
	createServiceButton.setTitle(i18n.format("dslibrary.createServiceButton.tooltip"));
	manageSourcesButton.setTitle(i18n.format("dslibrary.manageSourcesButton.tooltip"));
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:24,代码来源:DataServicesLibraryScreen.java

示例2: getInstance

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
public static AriaStatus getInstance() {
	if (sStatus == null) {
		RootPanel statusPanel = RootPanel.get("UniTimeGWT:AriaStatus");
		if (statusPanel != null && "1".equals(Window.Location.getParameter("aria"))) {
			sStatus = new AriaStatus(statusPanel.getElement(), false);
			sStatus.setStyleName("unitime-VisibleAriaStatus");
		} else {
			sStatus  = new AriaStatus(false);
			RootPanel.get().add(sStatus);
		}
		
		RootPanel.get().addDomHandler(new KeyUpHandler() {
			@Override
			public void onKeyUp(KeyUpEvent event) {
   				if (event.getNativeEvent().getKeyCode() == 191 && (event.isControlKeyDown() || event.isAltKeyDown())) {
   					sStatus.setHTML(sStatus.getHTML());
   				}
   			}
   		}, KeyUpEvent.getType());
	}
	return sStatus;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:23,代码来源:AriaStatus.java

示例3: setEscapeHandler

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
private KeyUpHandler setEscapeHandler() {
	KeyUpHandler handler = new KeyUpHandler() {
		@Override
		public void onKeyUp(final KeyUpEvent event) {
			if (KeyCodes.KEY_ESCAPE == event.getNativeEvent().getKeyCode()) {
				for (Control control : controls) {
					try {
						((DrawFeature) control).cancel();
					} catch (Exception e) {
						LOGGER.error("ACTION CANCELED: "
								+ control.getControlId());
					}
				}
			}
		}
	};
	return handler;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:ToggleTool.java

示例4: setUndoHandler

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
private KeyUpHandler setUndoHandler() {
	final KeyUpHandler handler = new KeyUpHandler() {
		@Override
		public void onKeyUp(final KeyUpEvent event) {
			if (KeyCodes.KEY_U == event.getNativeEvent().getKeyCode()) {
				for (final Control control : controls) {
					try {
						((DrawFeature) control).undo();
					} catch (Exception e) {
						LOGGER.error(
								"ACTION UNDO: " + control.getControlId(), e);
					}
				}
			}
		}
	};
	return handler;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:ToggleTool.java

示例5: setRedoHandler

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
private KeyUpHandler setRedoHandler() {
	final KeyUpHandler handler = new KeyUpHandler() {
		@Override
		public void onKeyUp(final KeyUpEvent event) {
			if (KeyCodes.KEY_R == event.getNativeEvent().getKeyCode()) {
				for (final Control control : controls) {
					try {
						((DrawFeature) control).redo();
					} catch (Exception e) {
						LOGGER.error("ACTION REDO: "
								+ control.getControlId());
					}
				}
			}
		}
	};
	return handler;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:ToggleTool.java

示例6: extend

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
@Override
protected void extend(final ServerConnector target) {
    textFieldWidget = (VTextField) ((ComponentConnector) target).getWidget();
    textFieldWidget.setImmediate(true);
    textFieldWidget.textChangeEventMode = "EAGER";
    panel.setWidget(select);
    panel.setStyleName("suggestion-popup");
    panel.setOwner(textFieldWidget);

    textFieldWidget.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(final KeyUpEvent event) {
            if (panel.isAttached()) {
                handlePanelEventDelegation(event);
            } else if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                rpc.executeQuery(textFieldWidget.getValue(), textFieldWidget.getCursorPos());
            } else {
                doAskForSuggestion();
            }
        }
    });
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:23,代码来源:AutoCompleteTextFieldConnector.java

示例7: OwnTextArea

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
public OwnTextArea() {
	super();
	sinkEvents(Event.ONPASTE);
	addKeyUpHandler(new KeyUpHandler() {
		@Override
		public void onKeyUp(KeyUpEvent event) {
			fireHandler();
		}
	});
}
 
开发者ID:umlet,项目名称:umlet,代码行数:11,代码来源:OwnTextArea.java

示例8: setKeyReleased

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的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

示例9: createSuggestionOnKeyUpHandler

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
public static KeyUpHandler createSuggestionOnKeyUpHandler(final UIObject sender, final EventListenerGVO ev, final List<InputVariableGVO> input) {
	return new KeyUpHandler() {
		public void onKeyUp(KeyUpEvent event) {
			if (event.getSource() instanceof QSuggestBox) {
				QSuggestBox qSuggestBox = (QSuggestBox) event.getSource();
				String expression = qSuggestBox.getText();
				if (expression != null) {
					if (expression.length() >= qSuggestBox.getSuggestCharactersLength()) {
						qSuggestBox.clearSuggestions();
						CallbackHandler.createCallBack(sender, QAMLConstants.EVENT_ONCHANGE, ev, input);
					}
				}
			}
		}
	};
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:17,代码来源:EventFactory.java

示例10: BeanValidationInitializer

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
/**
 * constructor.
 *
 * @param pcommitOnReturnHandler commit on return handler
 * @param pvalidateOnKeyUpHandler on key up handler
 * @param pvalidateOnVueChangeHandler on vue change handler
 * @param pvalueChangeHandler value change handler
 * @param pcheckTime enumeration which describes when to do the check
 * @param psubmitOnReturn submit form if return is pressed in a input field
 */
public BeanValidationInitializer(final KeyPressHandler pcommitOnReturnHandler,
    final KeyUpHandler pvalidateOnKeyUpHandler,
    final ValueChangeHandler<?> pvalidateOnVueChangeHandler,
    final ValueChangeHandler<?> pvalueChangeHandler, final CheckTimeEnum pcheckTime,
    final boolean psubmitOnReturn) {
  super();
  this.commitOnReturnHandler = psubmitOnReturn ? pcommitOnReturnHandler : null;
  this.validateOnKeyUpHandler =
      pcheckTime == CheckTimeEnum.ON_KEY_UP ? pvalidateOnKeyUpHandler : null;
  this.validateOnVueChangeHandler =
      pcheckTime == CheckTimeEnum.ON_CHANGE || pcheckTime == CheckTimeEnum.ON_KEY_UP
          ? pvalidateOnVueChangeHandler
          : null;
  this.valueChangeHandler = pvalueChangeHandler;
  this.checkTime = pcheckTime;
}
 
开发者ID:ManfredTremmel,项目名称:gwt-bean-validators,代码行数:27,代码来源:BeanValidationInitializer.java

示例11: asWidget

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
public Widget asWidget() {
	Widget layout = UI_BINDER.createAndBindUi(this);

	// Create the MapPresenter and add an InitializationHandler:
	mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
	mapPresenter.setSize(480, 480);

	// Define the whole layout:
	DecoratorPanel mapDecorator = new DecoratorPanel();
	mapDecorator.add(mapPresenter.asWidget());
	mapPanel.add(mapDecorator);

	// Initialize the map, and return the layout:
	GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapOsm");

	// Make sure the text box also reacts to the "Enter" key:
	opacityBox.addKeyUpHandler(new KeyUpHandler() {

		public void onKeyUp(KeyUpEvent event) {
			if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
				changeOpacity();
			}
		}
	});
	return layout;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:27,代码来源:LayerOpacityPanel.java

示例12: PersonEditorWorkflow

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
private PersonEditorWorkflow(DynaTableRequestFactory requestFactory,
    FavoritesManager manager, PersonProxy person) {
  this.requestFactory = requestFactory;
  this.manager = manager;
  this.person = person;
  TimeSlotListWidget timeSlotEditor = new TimeSlotListWidget(requestFactory);
  ScheduleEditor scheduleEditor = new ScheduleEditor(timeSlotEditor);
  MentorSelector mentorEditor = new MentorSelector(requestFactory);
  personEditor = new PersonEditor(mentorEditor, scheduleEditor);
  Binder.BINDER.createAndBindUi(this);
  contents.addDomHandler(new KeyUpHandler() {
    public void onKeyUp(KeyUpEvent event) {
      if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
        onCancel(null);
      }
    }
  }, KeyUpEvent.getType());
  this.favorite.setVisible(false);
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:20,代码来源:PersonEditorWorkflow.java

示例13: makeChoicesListBox

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
private ListBox makeChoicesListBox() {
    choices = GWT.create(ListBox.class);
    choices.setMultipleSelect(true);
    choices.setPixelSize(getChoicesWidth(),
                         getChoicesHeight());

    choices.addKeyUpHandler(new KeyUpHandler() {
        public void onKeyUp(com.google.gwt.event.dom.client.KeyUpEvent event) {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                selectSomething();
            }
        }
    });

    addDSLSentences();
    if (!onlyShowDSLStatements) {
        addFacts();
        addExistentialConditionalElements();
        addFromConditionalElements();
        addFreeFormDrl();
    }

    return choices;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:25,代码来源:RuleModellerConditionSelectorPopup.java

示例14: boundFormulaTextBox

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
private TextBox boundFormulaTextBox() {
    final TextBox box = new TextBox();
    box.setStyleName("constraint-value-Editor");
    if (this.methodParameter.getValue() == null) {
        box.setValue("");
    } else {
        box.setValue(this.methodParameter.getValue());
    }

    box.addKeyUpHandler(new KeyUpHandler() {
        @Override
        public void onKeyUp(KeyUpEvent event) {
            setMethodParameterValue(box.getValue());
        }
    });

    return box;
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:MethodParameterValueEditor.java

示例15: addKeyHandler

import com.google.gwt.event.dom.client.KeyUpHandler; //导入依赖的package包/类
/**
 * Add key handler to diagram canvas.
 *  
 * @param panel
 */
protected  void addKeyHandler(DiagramCanvas panel){
	panel.addDomHandler(new KeyUpHandler() {
		@Override
		public void onKeyUp(KeyUpEvent event) {
			DiagramController.this.onKeyUp(event);
		}
	}, KeyUpEvent.getType());
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:14,代码来源:DiagramController.java


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