use of com.google.gerrit.client.ui.ProjectNameSuggestOracle in project gerrit by GerritCodeReview.
the class MyWatchedProjectsScreen method createWidgets.
protected void createWidgets() {
nameBox = new RemoteSuggestBox(new ProjectNameSuggestOracle());
nameBox.setVisibleLength(50);
nameBox.setHintText(Util.C.defaultProjectName());
nameBox.addSelectionHandler(new SelectionHandler<String>() {
@Override
public void onSelection(SelectionEvent<String> event) {
doAddNew();
}
});
filterTxt = new HintTextBox();
filterTxt.setVisibleLength(50);
filterTxt.setHintText(Util.C.defaultFilter());
filterTxt.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
doAddNew();
}
}
});
addNew = new Button(Util.C.buttonWatchProject());
addNew.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
doAddNew();
}
});
browse = new Button(Util.C.buttonBrowseProjects());
browse.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
// under page header
int top = grid.getAbsoluteTop() - 50;
// Try to place it to the right of everything else, but not
// right justified
int left = 5 + Math.max(grid.getAbsoluteLeft() + grid.getOffsetWidth(), watchesTab.getAbsoluteLeft() + watchesTab.getOffsetWidth());
projectsPopup.setPreferredCoordinates(top, left);
projectsPopup.displayPopup();
}
});
watchesTab = new MyWatchesTable();
delSel = new Button(Util.C.buttonDeleteSshKey());
delSel.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
watchesTab.deleteChecked();
}
});
}
use of com.google.gerrit.client.ui.ProjectNameSuggestOracle in project gerrit by GerritCodeReview.
the class CreateProjectScreen method initParentBox.
private void initParentBox() {
parent = new RemoteSuggestBox(new ProjectNameSuggestOracle());
parent.setVisibleLength(50);
}
Aggregations