use of com.google.gwtexpui.globalkey.client.NpTextArea in project gerrit by GerritCodeReview.
the class ProjectInfoScreen method initDescription.
private void initDescription() {
final VerticalPanel vp = new VerticalPanel();
vp.add(new SmallHeading(AdminConstants.I.headingDescription()));
descTxt = new NpTextArea();
descTxt.setVisibleLines(6);
descTxt.setCharacterWidth(60);
vp.add(descTxt);
add(vp);
saveEnabler = new OnEditEnabler(saveProject);
saveEnabler.listenTo(descTxt);
}
use of com.google.gwtexpui.globalkey.client.NpTextArea in project gerrit by GerritCodeReview.
the class AccountGroupInfoScreen method initDescription.
private void initDescription() {
final VerticalPanel vp = new VerticalPanel();
vp.setStyleName(Gerrit.RESOURCES.css().groupDescriptionPanel());
vp.add(new SmallHeading(AdminConstants.I.headingDescription()));
descTxt = new NpTextArea();
descTxt.setVisibleLines(6);
descTxt.setCharacterWidth(60);
vp.add(descTxt);
saveDesc = new Button(AdminConstants.I.buttonSaveDescription());
saveDesc.setEnabled(false);
saveDesc.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
final String txt = descTxt.getText().trim();
GroupApi.setGroupDescription(getGroupUUID(), txt, new GerritCallback<VoidResult>() {
@Override
public void onSuccess(final VoidResult result) {
saveDesc.setEnabled(false);
}
});
}
});
vp.add(saveDesc);
add(vp);
}
Aggregations