本文整理汇总了Java中com.extjs.gxt.ui.client.widget.Info类的典型用法代码示例。如果您正苦于以下问题:Java Info类的具体用法?Java Info怎么用?Java Info使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Info类属于com.extjs.gxt.ui.client.widget包,在下文中一共展示了Info类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doDelete
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void doDelete()
{
AsyncCallback<Void> callback = new AsyncCallback<Void>()
{
@Override
public void onFailure(Throwable caught)
{
WebPasswordSafe.handleServerFailure(caught);
}
@Override
public void onSuccess(Void result)
{
Info.display(textMessages.status(), textMessages.templateDeleted());
hide();
}
};
PasswordService.Util.getInstance().deleteTemplate(template, callback);
}
示例2: doSearch
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
public void doSearch()
{
List<TagData> selectedTagData = tagTree.getCheckedSelection();
Set<Tag> selectedTags = new HashSet<Tag>(selectedTagData.size());
for (TagData selectedTag : selectedTagData)
{
selectedTags.add((Tag)selectedTag.get(Constants.TAG));
}
AsyncCallback<List<Password>> callback = new AsyncCallback<List<Password>>()
{
@Override
public void onFailure(Throwable caught)
{
WebPasswordSafe.handleServerFailure(caught);
}
@Override
public void onSuccess(List<Password> result)
{
Info.display(textMessages.status(), textMessages.foundPasswords(result.size()));
refreshTable(result);
}
};
Match match = tagMatchRG.getValue().equals(radioAND) ? Match.AND : Match.OR;
PasswordService.Util.getInstance().searchPassword(Utils.safeString(searchTextBox.getValue()), activeOnlyCheckBox.getValue(), selectedTags, match, callback);
}
示例3: doUnblockIP
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void doUnblockIP(String ipaddress)
{
AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>()
{
@Override
public void onFailure(Throwable caught)
{
WebPasswordSafe.handleServerFailure(caught);
}
@Override
public void onSuccess(Boolean result)
{
hide();
if (result)
{
Info.display(textMessages.status(), textMessages.ipAddressUnblocked());
}
else
{
Info.display(textMessages.status(), textMessages.ipAddressNotExist());
}
}
};
UserService.Util.getInstance().unblockIP(ipaddress, callback);
}
示例4: doDelete
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void doDelete()
{
AsyncCallback<Void> callback = new AsyncCallback<Void>()
{
@Override
public void onFailure(Throwable caught)
{
WebPasswordSafe.handleServerFailure(caught);
}
@Override
public void onSuccess(Void result)
{
Info.display(textMessages.status(), textMessages.groupDeleted());
hide();
}
};
UserService.Util.getInstance().deleteGroup(group, callback);
}
示例5: doChangePassword
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
/**
* @param password
*/
private void doChangePassword(String password)
{
AsyncCallback<Void> callback = new AsyncCallback<Void>()
{
@Override
public void onFailure(Throwable caught)
{
WebPasswordSafe.handleServerFailure(caught);
}
@Override
public void onSuccess(Void result)
{
hide();
Info.display(textMessages.status(), textMessages.passwordChanged());
}
};
UserService.Util.getInstance().changePassword(password, callback);
}
示例6: onModuleLoad
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
public void onModuleLoad() {
// subscribe widget to events
OpenAjaxHubFactory openAjaxHubFactory = new OpenAjaxHubFactory(true, "D2_EVENT_SELECT_OBJECT");
openAjaxHubFactory.setConnectCompletedCallback(new AsyncCallback<HubConnectionMessage>() {
public void onSuccess(HubConnectionMessage result) {
// widget successfully connected to
logger.log(Level.INFO, "TutorialOne::onModuleLoad: connected to hub successfully");
setOpenAjaxHub(result.getHubClient());
RootPanel.get().add(new TutorialOneContainer(getOpenAjaxHub()));
}
public void onFailure(Throwable caught) {
logger.log(Level.WARNING, "TutorialOne::onModuleLoad: failed to connect to the hub " + caught.getMessage());
Info.display("TutorialOne widget", "Failed to connect to Open Ajax Hub");
}
});
openAjaxHubFactory.connect();
}
示例7: onModuleLoad
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
public void onModuleLoad() {
// subscribe widget to events
OpenAjaxHubFactory openAjaxHubFactory = new OpenAjaxHubFactory(true, "D2_EVENT_CUSTOM", "D2_EVENT_DIALOG_HIDE", "D2_ACTION_SEARCH_HIGHLIGHT_TERMS", "D2_EVENT_SEARCH_SAVED","D2_EVENT_OBJECT_DESTROYED","D2_EVENT_SEARCH_RUN");
openAjaxHubFactory.setConnectCompletedCallback(new AsyncCallback<HubConnectionMessage>() {
public void onSuccess(HubConnectionMessage result) {
// widget successfully connected to
logger.log(Level.INFO, "Searches::onModuleLoad: connected to hub successfully");
setOpenAjaxHub(result.getHubClient());
RootPanel.get().add(new SearchesContainer(getOpenAjaxHub()));
}
public void onFailure(Throwable caught) {
logger.log(Level.WARNING, "Searches::onModuleLoad: failed to connect to the hub " + caught.getMessage());
Info.display("Searches widget", "Failed to connect to Open Ajax Hub");
}
});
openAjaxHubFactory.connect();
}
示例8: updateQuickHelp
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
protected void updateQuickHelp(boolean b) {
UserPreference pref = CMDBSession.get().getUserPreference();
pref.setHideQuickHelp(b);
ModelServiceFactory.get().saveUserPreferences(CMDBSession.get().getToken(),
CMDBSession.get().getUsername(), pref, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
Info.display("User Preferences", "Save failed!!!");
}
public void onSuccess(Void result) {
Info.display("User Preferences", "Saved");
}
});
}
示例9: doStop
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
public void doStop() {
for (TabItem item : advanced.getItems()) {
final CIModel model = (CIModel)item.getData("model");
// Do a HTTP request..
RequestBuilder req = new RequestBuilder(RequestBuilder.GET, getStopURL(model));
try {
Info.display("Stop", "Send stop to " + model.getDisplayName());
req.sendRequest(null, new RequestCallback() {
public void onResponseReceived(Request request, Response response) {
Info.display("Stop", "COMPLETED. Stop sent to " + model.getDisplayName());
}
public void onError(Request arg0, Throwable arg1) {
Info.display("Stop", "FAILED. to stop " + model.getDisplayName());
}
});
} catch (RequestException e) {
Info.display("Stop", "ERROR. to stop " + model.getDisplayName());
}
}
}
示例10: getField
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
protected Field getField(AttributeModel aModel, final ValueModel v) {
TextField text = new TextField();
text.setFieldLabel(aModel.getDisplayName());
if (v != null) {
text.setValue(v.getValue());
} else {
text.setEmptyText("Edit...");
}
text.setAllowBlank(true);
text.setMinLength(4);
text.setAutoWidth(true);
text.addListener(Events.Change, new Listener<FieldEvent>() {
public void handleEvent(FieldEvent be) {
v.setUpdateValue((String)be.value);
Info.display("ChangeEvent", "OldValue {0} - NewValue{0} ", (String)be.oldValue, (String)be.value);
}
});
return(text);
}
示例11: setAssignmentDepartmentTimeline
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void setAssignmentDepartmentTimeline(){
System.out.println("assignmentId :" + assignmentId + " departmentId :" + departmentId);
Integer timeline = timelineField.getValue().intValue();
if(assignmentId != null && departmentId != null){
timelineService.setAssignmentDepartmentTimeline(assignmentId, departmentId, timeline, false, new AsyncCallback<BaseModel>(){
@Override public void onFailure(Throwable caught) {
if(caught instanceof ParentTimelineIsNullException){
MessageBox.info("Error",caught.getMessage(),null);
}else if(caught instanceof ParentTimelineTooSmallException){
MessageBox.info("Error",caught.getMessage(),null);
}else{
MessageBox.info("Error",caught.getMessage(),null);
}
}
@Override public void onSuccess(BaseModel result) {
Info.display("Success","OK");
}
});
}
}
示例12: saveTimeline
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void saveTimeline(){
if(assignmentId != null && userId != null){
Integer timeline = (Integer) timelineField.getValue().intValue();
timelineService.setUserAssignmentTimeline(userId, assignmentId, timeline, new AsyncCallback<Void>(){
@Override public void onFailure(Throwable caught) {
MessageBox.info("ERROR",caught.getMessage(),null);
}
@Override public void onSuccess(Void result) {
Info.display("OK","Timeline updated");
loadUserAssignmentCheckGrid();
}
});
}
}
示例13: loadUserAssignmentCheckGrid
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void loadUserAssignmentCheckGrid(){
departmentService.getUsersByDepartmentAndByAssignment(departmentId,assignmentId,new AsyncCallback<List<BaseModel>>(){
@Override public void onFailure(Throwable caught) {
Info.display("Error", caught.toString());
}
@Override
public void onSuccess(List<BaseModel> result) {
userAssignmentCheckGrid.getStore().removeAll();
userAssignmentCheckGrid.getStore().add(result);
for(BaseModel bm: result){
if(bm.get("selected").equals(true))
userAssignmentCheckGrid.getSelectionModel().select(bm, true);
}
}
});
}
示例14: valiatePanelInfor
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
public boolean valiatePanelInfor()
{
if(pack == null)
{
Info.display("Error", "Pelase select a pack for your goods");
return false;
}
if(card == null)
{
Info.display("Error", "Pelase select a card for your deal");
return false;
}
orderInfoMap = contentPanel.getValues();
return true;
}
示例15: removeUsers
import com.extjs.gxt.ui.client.widget.Info; //导入依赖的package包/类
private void removeUsers(final List<BeanObject> users){
List<String> ids = new ArrayList<String>();
for(BeanObject user:users){
ids.add(user.getString(UserForm.ID));
}
DeleteService service = new DeleteService();
service.deleteBeans(ModelNames.USER,ids,new DeleteService.BatchDeleteListener(){
public void onSuccess(Integer successCount){
Info.display("恭喜", successCount+"个用户被删除");
toolBar.refresh();
}
public void onFailure(Throwable caught){
Info.display("糟糕", caught.toString());
}
});
}