use of com.google.gwt.event.dom.client.KeyUpEvent in project gerrit by GerritCodeReview.
the class GroupListScreen 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 ProjectListPopup method createWidgets.
private void createWidgets(final String popupText, final String currentPageLink) {
filterPanel = new HorizontalPanel();
filterPanel.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
final Label filterLabel = new Label(com.google.gerrit.client.admin.AdminConstants.I.projectFilter());
filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
filterPanel.add(filterLabel);
filterTxt = new NpTextBox();
filterTxt.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
Query q = new Query(filterTxt.getValue());
if (!match.equals(q.qMatch)) {
if (query == null) {
q.run();
}
query = q;
}
}
});
filterPanel.add(filterTxt);
projectsTab = new HighlightingProjectsTable() {
@Override
protected void movePointerTo(final int row, final boolean scroll) {
super.movePointerTo(row, scroll);
onMovePointerTo(getRowItem(row).name());
}
@Override
protected void onOpenRow(final int row) {
super.onOpenRow(row);
openRow(getRowItem(row).name());
}
};
projectsTab.setSavePointerId(currentPageLink);
closeTop = createCloseButton();
closeBottom = createCloseButton();
popup = new DialogBox();
popup.setModal(false);
popup.setText(popupText);
}
Aggregations