• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ButtonEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.extjs.gxt.ui.client.event.ButtonEvent的典型用法代码示例。如果您正苦于以下问题:Java ButtonEvent类的具体用法?Java ButtonEvent怎么用?Java ButtonEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ButtonEvent类属于com.extjs.gxt.ui.client.event包,在下文中一共展示了ButtonEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getHighlightTermsButton

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private ToggleButton getHighlightTermsButton() {
	if (highlightTermsButton == null) {
		highlightTermsButton = new ToggleButton();
		highlightTermsButton.setIcon(IconHelper.createPath("resources/themes/slate/images/slate/special/d2_hilight_tool.png"));
		highlightTermsButton.addListener(Events.Select, new Listener<ButtonEvent>() {
			public void handleEvent(ButtonEvent be) {
				OpenAjaxMessage message = OpenAjaxMessageFactory.create();
				if (highlightTermsButton.isPressed())
					message.setValue("1");
				else
					message.setValue("0");

				openAjaxHub.send("D2_ACTION_SEARCH_HIGHLIGHT_TERMS", message);
			}
		});

		highlightTermsButton.toggle();
	}

	return highlightTermsButton;
}
 
开发者ID:Roche,项目名称:ROGeTMF,代码行数:22,代码来源:SearchToolbar.java


示例2: createFormPanel

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * Creates the form panel.
 */
private void createFormPanel()
{
    formPanel = new FormPanel();
    formPanel.setFrame(true);
    formPanel.setHeaderVisible(false);
    formPanel.setAutoHeight(true);

    FieldSet fieldSet = new FieldSet();
    fieldSet.setHeading("Search Management");
    fieldSet.setCheckboxToggle(false);
    fieldSet.setCollapsible(false);

    FormLayout layout = new FormLayout();
    fieldSet.setLayout(layout);

    search = new Button("Search", new SelectionListener<ButtonEvent>()
            {

                @Override
                public void componentSelected(ButtonEvent ce)
                {
                    Dispatcher.forwardEvent(GeofenceEvents.SHOW_SEARCH_USER_WIDGET);
                }
            });

    ButtonBar bar = new ButtonBar();
    bar.setAlignment(HorizontalAlignment.CENTER);

    bar.add(search);

    Button p = new Button("get AOIs");

    Button q = new Button("get Features");

    bar.add(p);
    bar.add(q);

    fieldSet.add(bar);

    formPanel.add(fieldSet);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:45,代码来源:UserSearchComponent.java


示例3: addMenuButton

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void addMenuButton(final String buttonText, final AbstractImagePrototype buttonIcon, final Listener<ButtonEvent> clickHandler) {

	if (ClientUtils.isBlank(buttonText)) {
		throw new IllegalArgumentException("Invalid button text.");
	}

	final Button button = Forms.button(buttonText, buttonIcon);

	if (clickHandler != null) {
		button.addListener(Events.OnClick, clickHandler);
	}

	menuButtonsContainer.add(button, Layouts.vBoxData());
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:19,代码来源:DashboardView.java


示例4: reportModelSectionAddButtonListener

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private void reportModelSectionAddButtonListener() {

		view.getAddReportSectionButton().addListener(Events.OnClick, new Listener<ButtonEvent>() {

			@Override
			public void handleEvent(ButtonEvent be) {
				ProjectReportModelSectionDTO section = new ProjectReportModelSectionDTO();
				section.setId(null);
				section.setIndex(0);
				section.setName(I18N.CONSTANTS.adminEditGrid());
				section.setNumberOfTextarea(0);
				section.setParentSectionModelName(I18N.CONSTANTS.adminReportSectionRoot());
				section.setProjectModelId(currentReportModel.getId());
				section.setParentSectionModelId(null);
				if (!view.getReportSectionsStore().contains(section))
					view.getReportSectionsStore().add(section);
			}
		});

	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:21,代码来源:ReportModelsAdminPresenter.java


示例5: generatePossibleDuplicatesGrid

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private Grid<ContactDTO> generatePossibleDuplicatesGrid() {
  ColumnConfig nameColumn = new ColumnConfig(ContactDTO.FULLNAME, I18N.CONSTANTS.fullName(), 250);
  ColumnConfig emailColumn = new ColumnConfig(ContactDTO.EMAIL, I18N.CONSTANTS.email(), 250);
  ColumnConfig actionsColumn = new ColumnConfig();
  actionsColumn.setWidth(100);
  actionsColumn.setRenderer(new GridCellRenderer<ContactDTO>() {
    @Override
    public Object render(final ContactDTO contact, String property, ColumnData config, int rowIndex, int colIndex, ListStore store, Grid grid) {
      Button button = Forms.button(I18N.CONSTANTS.dedupeContactUpdateButton());
      button.addSelectionListener(new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
          cardLayout.setActiveItem(secondStepContainer);
          secondStepHandler.initialize(contact.getId(), duplicatedPropertiesGrid.getStore());
          selectedContact = contact;
        }
      });

      return button;
    }
  });

  ColumnModel columnModel = new ColumnModel(Arrays.asList(nameColumn, emailColumn, actionsColumn));
  return new Grid<ContactDTO>(new ListStore<ContactDTO>(), columnModel);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:DedupeContactDialog.java


示例6: componentSelected

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
public void componentSelected(ButtonEvent sender) {
	try {
	if(!formPanel.isValid()) {
		Window.alert("Please check input before submit.");
		return;
	}
	String error = validateForm();
	if(error!=null && error.length()>0) {
		Window.alert("Please check input before submit, error is: "+error);
		return;
	}
	
	if(!formPanel.isDirty()) {
		// TODO this is optimisitic. should change it to based on a strategy configuration?
		Window.alert("the form is not changed!!!");
		return;
	}
	submit();
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:23,代码来源:CommentPanel.java


示例7: componentSelected

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
public void componentSelected(ButtonEvent sender) {
//	    	log("on Submit: formPanel="+formPanel);
	    	try {
	    	if(!formPanel.isValid()) {
	    		Window.alert("Please check input before submit.");
	    		return;
	    	}
	    	String error = validateForm();
	    	if(error!=null && error.length()>0) {
	    		Window.alert("Please check input before submit, error is: "+error);
	    		return;
	    	}
	    	
	    	if(!formPanel.isDirty()) {
	    		// TODO this is optimisitic. should change it to based on a strategy configuration?
	    		Window.alert("the form is not changed!!!");
	    		gotoSuccessPanel();
	    		return;
	    	}
	    	submit();
	    	} catch (Exception e) {
	    		e.printStackTrace();
	    	}
	    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:25,代码来源:BaseEntityEditPanel.java


示例8: PasswordAccessAuditDialog

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
public PasswordAccessAuditDialog(Password password)
{
    this.setSize("350", "460");
    this.setHeading(textMessages.passwordAccessAuditLog());
    VBoxLayout boxLayout = new VBoxLayout();
    boxLayout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
    this.setLayout(boxLayout);
    this.setModal(true);
    this.setResizable(false);
    
    gridStore = new ListStore<PasswordAccessAuditData>();
    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
    ColumnConfig columnConfigDate = new ColumnConfig(Constants.DATE, textMessages.dateAccessed(), 130);
    columnConfigDate.setDateTimeFormat(DateTimeFormat.getFormat(textMessages.displayDateFormat()));
    configs.add(columnConfigDate);
    ColumnConfig columnConfigUser = new ColumnConfig(Constants.USER, textMessages.userAccessed(), 160);
    configs.add(columnConfigUser);
    
    Grid<PasswordAccessAuditData> grid = new Grid<PasswordAccessAuditData>(gridStore, new ColumnModel(configs));
    grid.setStripeRows(true);
    add(grid);
    grid.setSize("320px", "390px");
    grid.setBorders(true);
    
    Button closeButton = new Button(textMessages.close(), new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
            doClose();
        }
    });
    
    setButtonAlign(HorizontalAlignment.CENTER);
    addButton(closeButton);
    
    loadAccessAuditData(password.getId());
}
 
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:37,代码来源:PasswordAccessAuditDialog.java


示例9: buildAddUserByEmailWindow

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
@Override
public void buildAddUserByEmailWindow(DispatchAsync dispatch, final UsersAdminPresenter.AddUserByEmailHandler handler) {
	final Window window = new Window();
	window.setPlain(true);
	window.setModal(true);
	window.setBlinkModal(true);
	window.setLayout(new FitLayout());
	window.setSize(700, 300);
	window.setHeadingHtml(I18N.CONSTANTS.selectContactDialogTitle());

	final ContactPicker contactPicker = new ContactPicker(ContactModelType.INDIVIDUAL, true, null, null, null, dispatch);

	final org.sigmah.client.ui.widget.form.FormPanel formPanel = Forms.panel(500);
	formPanel.add(contactPicker);
	formPanel.getButtonBar().add(Forms.button(I18N.CONSTANTS.addUser(), IconImageBundle.ICONS.add(), new SelectionListener<ButtonEvent>() {
		@Override
		public void componentSelected(ButtonEvent ce) {
			ContactDTO value = contactPicker.getSelectedItem();
			if (value == null) {
				return;
			}
			handler.handleSubmit(value);
			window.hide();
		}
	}));
	window.add(formPanel);

	window.show();
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:30,代码来源:UsersAdminView.java


示例10: buildExportDialog

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void buildExportDialog(final ContactRelationshipsPresenter.ExportActionHandler handler) {

  final com.extjs.gxt.ui.client.widget.Window w = new com.extjs.gxt.ui.client.widget.Window();
  w.setPlain(true);
  w.setModal(true);
  w.setBlinkModal(true);
  w.setLayout(new FitLayout());
  w.setSize(400, 180);
  w.setHeadingHtml(I18N.CONSTANTS.exportData());

  final FormPanel panel = Forms.panel();

  final CheckBox allRelationsBox = Forms.checkbox(I18N.CONSTANTS.allRelations(), Boolean.TRUE);
  allRelationsBox.setEnabled(false);
  final CheckBox frameworkRelationsBox = Forms.checkbox(I18N.CONSTANTS.frameworkRelations());
  final CheckBox relationsByElementBox = Forms.checkbox(I18N.CONSTANTS.relationsByElement());

  final CheckBoxGroup options =
      Forms.checkBoxGroup(I18N.CONSTANTS.exportOptions(), com.extjs.gxt.ui.client.Style.Orientation.VERTICAL, allRelationsBox, frameworkRelationsBox, relationsByElementBox);

  panel.add(options);

  final Button export = Forms.button(I18N.CONSTANTS.export());
  panel.getButtonBar().add(export);
  export.addSelectionListener(new SelectionListener<ButtonEvent>() {

    @Override
    public void componentSelected(final ButtonEvent ce) {
      if (handler != null) {
        handler.onExportContactRelationships(false, allRelationsBox.getValue(), frameworkRelationsBox.getValue(), relationsByElementBox.getValue());
      }
      w.hide();
    }
  });

  w.add(panel);
  w.show();
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:43,代码来源:ContactRelationshipsView.java


示例11: getDialog

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private static Dialog getDialog() {

		if (keyQuestionDialog == null) {
			final Dialog dialog = new Dialog();
			dialog.setButtons(Dialog.OKCANCEL);
			dialog.setModal(true);

			dialog.setWidth("640px");
			dialog.setResizable(false);

			dialog.setLayout(new RowLayout(Orientation.VERTICAL));

			// Question label
			final Label questionLabel = new Label("key-question");
			questionLabel.addStyleName("project-report-key-question-label");
			dialog.add(questionLabel);

			// Text area
			final RichTextArea textArea = new RichTextArea();
			textArea.setStyleName("project-report-key-question");
			dialog.add(textArea);

			// Toolbar
			final ToolBar toolBar = new ToolBar();
			ReportsView.createRichTextToolbar(toolBar, new RichTextArea.Formatter[] {textArea.getFormatter()});
			dialog.setTopComponent(toolBar);

			// Cancel button
			dialog.getButtonById(Dialog.CANCEL).addSelectionListener(new SelectionListener<ButtonEvent>() {

				@Override
				public void componentSelected(ButtonEvent ce) {
					dialog.hide();
				}
			});

			keyQuestionDialog = dialog;
		}
		return keyQuestionDialog;
	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:41,代码来源:KeyQuestionDialog.java


示例12: onBind

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onBind() {

	// Save action.
	view.getSaveButton().addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(final ButtonEvent be) {
			onSaveAction();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:16,代码来源:ProjectDetailsPresenter.java


示例13: onBind

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onBind() {
	view.getMoveButton().addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(final ButtonEvent ce) {
			onMoveAction();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:14,代码来源:MoveOrgUnitAdminPresenter.java


示例14: onBind

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onBind() {
	view.getSaveButton().addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(final ButtonEvent ce) {
			onSaveAction();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:14,代码来源:AddOrgUnitAdminPresenter.java


示例15: importCategoryButtonListener

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private void importCategoryButtonListener() {

		view.getImportCategoryTypeButton().addListener(Events.Select, new Listener<ButtonEvent>() {

			@Override
			public void handleEvent(ButtonEvent be) {
				eventBus.navigateRequest(Page.IMPORT_MODEL.requestWith(RequestParameter.TYPE, AdminUtil.ADMIN_CATEGORY_MODEL));
			}
		});

	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:CategoriesAdminPresenter.java


示例16: deleteCategoryElementListener

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private void deleteCategoryElementListener() {

		view.getDeleteCategoryElementButton().addListener(Events.OnClick, new Listener<ButtonEvent>() {

			@Override
			public void handleEvent(ButtonEvent be) {
				onDeleteCategoryElement(view.getCategoryElementsGrid().getSelectionModel().getSelectedItems());
			}

		});
	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:12,代码来源:CategoriesAdminPresenter.java


示例17: onBind

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onBind() {

	// --
	// Integer fields.
	// --

	final List<IntegerModel> models = new ArrayList<IntegerModel>(LIMIT);

	models.add(new IntegerModel(null)); // Unlimited option.
	for (int i = 1; i < LIMIT; i++) {
		models.add(new IntegerModel(i));
	}

	for (final ComboBox<IntegerModel> integerField : view.getIntegerFields().values()) {
		integerField.getStore().add(models);
	}

	// --
	// Boolean fields.
	// --

	for (final SimpleComboBox<Boolean> booleanField : view.getBooleanFields().values()) {
		booleanField.add(Boolean.FALSE);
		booleanField.add(Boolean.TRUE);
	}

	// --
	// Save button action handler.
	// --

	view.getSaveButton().addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(final ButtonEvent ce) {
			onSaveAction();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:43,代码来源:LogFrameModelsAdminPresenter.java


示例18: onBind

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onBind() {

	view.getAddButton().addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(final ButtonEvent event) {
			onSaveForm();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:15,代码来源:AddProjectModelAdminPresenter.java


示例19: onBind

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onBind() {

	// Save button
	view.getCreateButton().addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(final ButtonEvent be) {
			onSavePrivacyGroup();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:16,代码来源:PrivacyGroupEditPresenter.java


示例20: renderConfirmButton

import com.extjs.gxt.ui.client.event.ButtonEvent; //导入依赖的package包/类
private Button renderConfirmButton(final ImportDetails model) {
	
	final Button confirmButton = Forms.button(I18N.CONSTANTS.importButtonConfirmDetails());
	
	confirmButton.addSelectionListener(new SelectionListener<ButtonEvent>() {

		@Override
		public void componentSelected(ButtonEvent ce) {
			final Map<EntityDTO<Integer>, List<ElementExtractedValue>> entities = model.getEntitiesToImport();
			
			if(!entities.keySet().isEmpty()) {
				// Displaying the "select changes" popup.
				final ElementExtractedValuePopup popup = view.getElementExtractedValuePopup();
				
				final Iterator<EntityDTO<Integer>> iterator = entities.keySet().iterator();
				final EntityDTO<?> entity = iterator.next();
				popup.setEntity(entity);
                   popup.setParentModel(model);
				
				popup.getStore().removeAll();
				popup.getStore().add(entities.get(entity));
				
				popup.getSelectionModel().select(changes.get((Integer)entity.getId()), false);
				
				popup.center();
			}
		}
	});
	
	return confirmButton;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:32,代码来源:ImportationPresenter.java



注:本文中的com.extjs.gxt.ui.client.event.ButtonEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ManagedTask类代码示例发布时间:2022-05-22
下一篇:
Java MD5类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap