当前位置: 首页>>代码示例>>Java>>正文


Java Events类代码示例

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


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


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