use of com.google.gwt.event.dom.client.KeyUpEvent in project gerrit by GerritCodeReview.
the class ProjectBranchesScreen method initPageHeader.
private void initPageHeader() {
parseToken();
HorizontalPanel hp = new HorizontalPanel();
hp.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
Label filterLabel = new Label(AdminConstants.I.projectFilter());
filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
hp.add(filterLabel);
filterTxt = new NpTextBox();
filterTxt.setValue(match);
filterTxt.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
Query q = new Query(filterTxt.getValue());
if (match.equals(q.qMatch)) {
q.start(start);
} else {
if (query == null) {
q.run();
}
query = q;
}
}
});
hp.add(filterTxt);
add(hp);
}
use of com.google.gwt.event.dom.client.KeyUpEvent in project gerrit by GerritCodeReview.
the class ProjectListScreen method initPageHeader.
private void initPageHeader() {
final HorizontalPanel hp = new HorizontalPanel();
hp.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
final Label filterLabel = new Label(AdminConstants.I.projectFilter());
filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
hp.add(filterLabel);
filterTxt = new NpTextBox();
filterTxt.setValue(match);
filterTxt.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
Query q = new Query(filterTxt.getValue()).open(event.getNativeKeyCode() == KeyCodes.KEY_ENTER);
if (match.equals(q.qMatch)) {
q.start(start);
}
if (q.open || !match.equals(q.qMatch)) {
if (query == null) {
q.run();
}
query = q;
}
}
});
hp.add(filterTxt);
add(hp);
}
use of com.google.gwt.event.dom.client.KeyUpEvent in project gerrit by GerritCodeReview.
the class ProjectTagsScreen method initPageHeader.
private void initPageHeader() {
parseToken();
HorizontalPanel hp = new HorizontalPanel();
hp.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
Label filterLabel = new Label(AdminConstants.I.projectFilter());
filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
hp.add(filterLabel);
filterTxt = new NpTextBox();
filterTxt.setValue(match);
filterTxt.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
Query q = new Query(filterTxt.getValue());
if (match.equals(q.qMatch)) {
q.start(start);
} else {
if (query == null) {
q.run();
}
query = q;
}
}
});
hp.add(filterTxt);
add(hp);
}
use of com.google.gwt.event.dom.client.KeyUpEvent in project che by eclipse.
the class FullTextSearchViewImpl method addHandlers.
private void addHandlers() {
isUseFileMask.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
filesMask.setEnabled(event.getValue());
}
});
isUseDirectory.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
directory.setEnabled(event.getValue());
selectPathButton.setEnabled(event.getValue());
}
});
text.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
acceptButton.setEnabled(!text.getValue().isEmpty());
}
});
selectPathButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
showSelectPathDialog();
}
});
}
use of com.google.gwt.event.dom.client.KeyUpEvent in project rstudio by rstudio.
the class DomUtils method addKeyHandlers.
public static void addKeyHandlers(HasAllKeyHandlers widget, final NativeEventHandler handler) {
widget.addKeyDownHandler(new KeyDownHandler() {
@Override
public void onKeyDown(final KeyDownEvent event) {
handler.onNativeEvent(event.getNativeEvent());
}
});
widget.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(final KeyPressEvent event) {
handler.onNativeEvent(event.getNativeEvent());
}
});
widget.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(final KeyUpEvent event) {
handler.onNativeEvent(event.getNativeEvent());
}
});
}
Aggregations