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

Java Events类代码示例

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

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



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

示例1: getHighlightTermsButton

import com.extjs.gxt.ui.client.event.Events; //导入依赖的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: createNorth

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Creates the north.
 */
private void createNorth()
{
    north = new ContentPanel();
    north.setHeaderVisible(false);
    north.addListener(Events.Resize, new Listener<BaseEvent>()
        {

            public void handleEvent(BaseEvent be)
            {
                Dispatcher.forwardEvent(GeoGWTEvents.UPDATE_MAP_SIZE);
                // Dispatcher.forwardEvent(GeofenceEvents.UPDATE_SOUTH_SIZE);
            }
        });

    BorderLayoutData data = new BorderLayoutData(LayoutRegion.NORTH,
            Constants.NORTH_PANEL_DIMENSION);
    data.setMargins(new Margins(0, 5, 0, 5));
    data.setSplit(true);

    viewport.add(north, data);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:25,代码来源:AppView.java


示例3: initialize

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
@Override
protected void initialize()
{
    this.loginWidget = new LoginWidget();

    this.loginWidget.addListener(Events.Hide, new Listener<WindowEvent>()
        {

            public void handleEvent(WindowEvent be)
            {
                Dispatcher.forwardEvent(GeofenceEvents.INIT_GEOFENCE_MAIN_UI);
                loginWidget.reset();
            }
        });

    initWidget();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:18,代码来源:LoginController.java


示例4: createProfilesComboBox

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Creates the profiles combo box.
 */
private void createProfilesComboBox()
{
    profilesComboBox = new ComboBox<UserGroupModel>();
    profilesComboBox.setFieldLabel("Role");
    profilesComboBox.setEmptyText("(No role available)");
    profilesComboBox.setDisplayField(BeanKeyValue.NAME.getValue());
    profilesComboBox.setEditable(false);
    profilesComboBox.setStore(getAvailableProfiles());
    profilesComboBox.setTypeAhead(true);
    profilesComboBox.setTriggerAction(TriggerAction.ALL);
    profilesComboBox.setAllowBlank(false);
    profilesComboBox.setLazyRender(false);
    // profilesComboBox.setWidth(150);

    profilesComboBox.addListener(Events.TriggerClick, new Listener<FieldEvent>()
        {

            public void handleEvent(FieldEvent be)
            {
                profilesComboBox.getStore().getLoader().load();
            }
        });

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


示例5: RuleLimitsTabItem

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Instantiates a new rule details tab item.
 * 
 * @param tabItemId
 *            the tab item id
 * @param model
 *            the model
 * @param loadModel
 * @param workspacesService
 *            the workspaces service
 */
public RuleLimitsTabItem(String tabItemId, RuleModel model,
		RulesManagerRemoteServiceAsync rulesService, boolean loadModel) {
	this(tabItemId);
	this.theRule = model;

	setRuleLimitsWidget(new RuleLimitsWidget(this.theRule, rulesService));
	add(getRuleLimitsWidget());

	setScrollMode(Scroll.NONE);

	if (loadModel) {
		this.addListener(Events.Select, new Listener<BaseEvent>() {

			public void handleEvent(BaseEvent be) {
				if (ruleLimitsWidget.getRuleLimitsInfo().getModel() == null) {
					Dispatcher.forwardEvent(
							GeofenceEvents.LOAD_LAYER_LIMITS, theRule);
				}
			}

		});
	}

}
 
开发者ID:geoserver,项目名称:geofence,代码行数:36,代码来源:RuleLimitsTabItem.java


示例6: UserDetailsTabItem

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Instantiates a new rule details tab item.
 *
 * @param tabItemId
 *            the tab item id
 * @param model
 *            the model
 * @param profilesManagerServiceRemote
 * @param workspacesService
 *            the workspaces service
 */
public UserDetailsTabItem(String tabItemId, GSUserModel model, GsUsersManagerRemoteServiceAsync usersService, ProfilesManagerRemoteServiceAsync profilesManagerServiceRemote)
{
    this(tabItemId);
    this.user = model;

    setUserDetailsWidget(new UserDetailsWidget(this.user, usersService, profilesManagerServiceRemote));
    add(getUserDetailsWidget());

    setScrollMode(Scroll.NONE);

    this.addListener(Events.Select, new Listener<BaseEvent>()
        {

            public void handleEvent(BaseEvent be)
            {
                if (userDetailsWidget.getProfilesInfo().getStore().getCount() < 1)
                {
                	userDetailsWidget.getProfilesInfo().getLoader().load();
                }
            }

        });

}
 
开发者ID:geoserver,项目名称:geofence,代码行数:36,代码来源:UserDetailsTabItem.java


示例7: LayerAttributesTabItem

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
   * Instantiates a new layer attributes tab item.
   *
   * @param tabItemId
   *            the tab item id
   * @param model
   *            the model
   * @param rulesService
   *            the rules service
   */
  public LayerAttributesTabItem(String tabItemId, RuleModel model, RulesManagerRemoteServiceAsync rulesService)
  {
      this(tabItemId);
      this.model = model;

      setLayerAttributesWidget(new LayerAttributesWidget(model, rulesService));
      add(getLayerAttributesWidget());

      setScrollMode(Scroll.NONE);

      this.addListener(Events.Select, new Listener<BaseEvent>() {

	public void handleEvent(BaseEvent be) {
		getLayerAttributesWidget().getLayerAttributesInfo().getLoader().load();
	}

});
  }
 
开发者ID:geoserver,项目名称:geofence,代码行数:29,代码来源:LayerAttributesTabItem.java


示例8: setGridProperties

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
@Override
public void setGridProperties() {
	grid.setHeight(Constants.SOUTH_PANEL_DIMENSION - 25);

	if (grid.getStore() != null) {
		grid.getStore().setSortField(BeanKeyValue.PRIORITY.getValue());
		grid.getStore().setSortDir(SortDir.ASC);
	}

	grid.addListener(Events.RowDoubleClick,
			new Listener<GridEvent<RuleModel>>() {
				public void handleEvent(GridEvent<RuleModel> be) {
					RuleModel ruleModel = be.getModel();
					Dispatcher.forwardEvent(
							GeofenceEvents.EDIT_RULE_UPDATE,
							new GridStatus(grid, ruleModel));
				}
			});
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:20,代码来源:RuleGridWidget.java


示例9: render

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
public Object render(final RuleModel model, String property,
                ColumnData config, int rowIndex, int colIndex,
                ListStore<RuleModel> store, Grid<RuleModel> grid) {

            if (!init) {
                init = true;
                grid.addListener(Events.ColumnResize, new ResizeListener(20));
            }

            LabelField field = new LabelField();
            field.setId(fieldId);
            field.setName(fieldId);
            field.setEmptyText("*");
            field.setFieldLabel(BeanKeyValue.NAME.getValue());
            field.setValue(BeanKeyValue.NAME.getValue());
            field.setReadOnly(true);

//            field.setWidth(initialWidth - 10);
            field.setAutoWidth(true);
            field.show();

            setFieldValue(model, field);
            
            return field;
        }
 
开发者ID:geoserver,项目名称:geofence,代码行数:26,代码来源:RuleGridWidget.java


示例10: initListView

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Inits the list view.
 */
private void initListView() {
    view = new ListView<T>();

    view.setId("img-chooser-view");
    view.setBorders(false);
    view.setStore(store);

    setListProperties();

    view.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    view.getSelectionModel().addListener(Events.SelectionChange,
            new Listener<SelectionChangedEvent<T>>() {
                public void handleEvent(SelectionChangedEvent<T> be) {
                    onSelectionChange(be);
                }
            });
    main.add(view);

    createDetails();

}
 
开发者ID:geoserver,项目名称:geofence,代码行数:25,代码来源:GeofenceChooserWidget.java


示例11: getComponent

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Component getComponent(ValueResult valueResult, boolean enabled) {
	final CheckBox checkbox = new CheckBox();
	checkbox.setBoxLabel(getLabel());
	checkbox.setHideLabel(true);

	if (valueResult != null) {
		final String value = valueResult.getValueObject();
		checkbox.setValue(Boolean.parseBoolean(value));
	}

	checkbox.addListener(Events.Change, new CheckBoxListener());

	checkbox.setEnabled(enabled);

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


示例12: onSelectionChanged

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
public void onSelectionChanged(SelectionChangedEvent<SiteDTO> event) {

		// Enable toolbar buttons for selection
		deleteButton.setEnabled(false);
		editButton.setEnabled(false);

    	
		if (!event.getSelection().isEmpty()) {
			// Disable the toolbar for the main site
			// It should be handled only through the Set main site button
			// from project > map

			if (this.mainSiteId == null
					|| !this.mainSiteId.equals(event.getSelectedItem().getId())) {

				// Not the main site, check editable
				final boolean canManageSites = canManageSites();
				deleteButton.setEnabled(canManageSites);
				editButton.setEnabled(canManageSites);
			}
		}

		fireEvent(Events.SelectionChange, event);
    }
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:25,代码来源:SiteGridPanel.java


示例13: addUndeletableCustomChoice

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void addUndeletableCustomChoice(final String value, boolean checked, final Listener<FieldEvent> disableHandler) {
	
	final ClickableLabel customChoiceLabel = new ClickableLabel(value);
	final Grid grid = (Grid) customChoiceLabel.getWidget();
	
	final CheckBox checkBox = new CheckBox();
	checkBox.setValue(checked);
	grid.setWidget(0, 0, checkBox);

	if(disableHandler != null) {
		checkBox.addListener(Events.Change, disableHandler);
	}

	customChoicesPanel.add(customChoiceLabel);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:20,代码来源:EditFlexibleElementAdminView.java


示例14: initialize

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
@Override
public void initialize() {
  contactHistoryGrid = new Grid<ContactHistory>(new ListStore<ContactHistory>(), buildColumnModel());
  contactHistoryGrid.getView().setForceFit(true);
  contactHistoryGrid.setAutoHeight(true);
  contactHistoryGrid.addListener(Events.ViewReady, new Listener<BaseEvent>() {
    @Override
    public void handleEvent(BaseEvent be) {
      resizeGrid(contactHistoryGrid, container, true);
    }
  });
  Window.addResizeHandler(new ResizeHandler() {
    @Override
    public void onResize(ResizeEvent event) {
      resizeGrid(contactHistoryGrid, container, true);
    }
  });

  container = Panels.content(null, false, Layouts.vBoxLayout(VBoxLayout.VBoxLayoutAlign.STRETCH, new Layouts.LayoutOptions(new Padding(10))), "x-border-layout-ct");
  container.setScrollMode(Style.Scroll.AUTOY);
  container.add(contactHistoryGrid);
  add(container);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:ContactHistoryView.java


示例15: addTab

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
@Override
public void addTab(String tabTitle, final Widget tabView) {
  final TabItem tabItem = new TabItem(tabTitle);
  tabItem.addListener(Events.Select, new Listener<ComponentEvent>() {
    @Override
    public void handleEvent(ComponentEvent be) {
      fixTabViewHeight(tabView, tabItem);
    }
  });
  tabItem.add(tabView);

  Window.addResizeHandler(new ResizeHandler() {
    @Override
    public void onResize(ResizeEvent event) {
      fixTabViewHeight(tabView, tabItem);
    }
  });
  fixTabViewHeight(tabView, tabItem);

  tabPanel.add(tabItem);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:22,代码来源:ContactView.java


示例16: addMenuButton

import com.extjs.gxt.ui.client.event.Events; //导入依赖的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


示例17: addUnlockProjectPopup

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Asks the user if he wants to unlock the project to edit the clicked
 * flexible element.
 *
 * @param element Element that is part of the project core version.
 * @param component Component of the element.
 * @param loadable Loadable to mask while unlocking the project.
 */
public void addUnlockProjectPopup(final FlexibleElementDTO element, Component component, final Loadable loadable) {
	component.addListener(Events.OnFocus, new Listener<DomEvent>() {

		@Override
		public void handleEvent(DomEvent be) {
			N10N.confirmation(I18N.MESSAGES.projectCoreUnlockInvite(element.getFormattedLabel()), new ConfirmCallback() {

				@Override
				public void onAction() {
					dispatch.execute(new AmendmentActionCommand(project.getId(), AmendmentAction.UNLOCK), new CommandResultHandler<ProjectDTO>() {

						@Override
						protected void onCommandSuccess(ProjectDTO result) {
							project.setAmendmentState(result.getAmendmentState());
							eventBus.navigateRequest(injector.getPageManager().getCurrentPageRequest(), loadable);
						}
					}, loadable);
				}
			});
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:31,代码来源:ProjectPresenter.java


示例18: MenuAction

import com.extjs.gxt.ui.client.event.Events; //导入依赖的package包/类
/**
 * Builds this action.
 */
public MenuAction() {

	item = new MenuItem(getText(), getIcon());

	// Action.
	item.addListener(Events.Select, new Listener<BaseEvent>() {

		@Override
		public void handleEvent(BaseEvent be) {
			perform();
		}
	});

	// Defines the default policy.
	inactivationPolicy = InactivationPolicy.DISABLE_POLICY;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:20,代码来源:MenuAction.java


示例19: onBind

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

	view.getSaveButton().addListener(Events.OnClick, new Listener<BaseEvent>() {

		@Override
		public void handleEvent(BaseEvent be) {

			if (view.getForm().isValid()) {
				currentBudgetSubField.setLabel(view.getNameField().getValue());
				eventBus.fireEvent(new UpdateEvent(UpdateEvent.EDIT_FLEXIBLEELEMNT_EDIT_BUDGETSUBFIELD));
				view.hide();
			}

		}
	});

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


示例20: reportModelSectionAddButtonListener

import com.extjs.gxt.ui.client.event.Events; //导入依赖的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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java XMLChar类代码示例发布时间:2022-05-22
下一篇:
Java AmazonS3EncryptionClient类代码示例发布时间: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