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

Java ComponentEvent类代码示例

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

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



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

示例1: PageSizePagingToolBar

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
public PageSizePagingToolBar(int pageSize) {
	super(pageSize);
	add(new SeparatorToolItem());
	pageSizeField = new TextField<String>();
	pageSizeField.setWidth(30);
	pageSizeField.setValue("" + pageSize);
	pageSizeField.addKeyListener(new KeyListener() {

		@Override
		public void componentKeyUp(ComponentEvent event) {
			if (event.getKeyCode() ==  KeyboardListener.KEY_ENTER) {
				refresh();
			}
		}
		
	});
	add(new AdapterToolItem(pageSizeField));
	add(new AdapterToolItem(new LabelField("Page Size")));
	//add(new AdapterToolItem(getSecurityGroupCombo()));
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:21,代码来源:PageSizePagingToolBar.java


示例2: selectNewTemplate

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
protected void selectNewTemplate(final EditorGrid<CIModelCollection> editGrid, Element target) {
	List<String> types = new ArrayList<String>();
	types.add(gridConfig.getNewModel().getAlias());
	CITemplateBrowser template = new CITemplateBrowser(gridConfig.getMDR(), types);
	//template.setCheckable(true, null);
	final SelectContentPanel<CIModel> sel = new SelectContentPanel<CIModel>("Select a template", template);
	final AdaptableMenu menu = new AdaptableMenu(sel, "");
	
	
	menu.addListener(Events.Select, new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent ce) {
          menu.hide();
          CIModel model = sel.getValue();  
          addNewItem(editGrid, model);
        }
      });
      menu.addListener(Events.Hide, new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent be) {
          menu.hide();
        }
      });
      
      menu.show(target, "tl-bl?");
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:26,代码来源:EditableCIInstanceGrid.java


示例3: getDeleteCI

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private SelectionListener getDeleteCI(final CIModel model) {
	return(new SelectionListener<ComponentEvent>() {

		@Override
		public void componentSelected(ComponentEvent ce) {
			ArrayList<CIModel> local = new ArrayList<CIModel>();
			ArrayList<CIModel> base = new ArrayList<CIModel>();
			base.add(model);
			StoreAction.store(mdr, local, base, new CMDBAsyncCallback<StoreResult>() {

				public void onSuccess(StoreResult result) {
					if (result.isRejected()) {
						MessageBox.alert("Failed", "Delete rejected, cause " + result.getRejectCause(), null);
						return;
					}
					lP.load();
				}
			});
		}

	});

}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:24,代码来源:CITemplateReferenceTree.java


示例4: addTab

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


示例5: onBind

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

	// Enter key handler.
	view.getEmailField().addListener(Events.KeyDown, new KeyListener() {

		@Override
		public void componentKeyDown(final ComponentEvent event) {
			if (event.getKeyCode() == KeyCodes.KEY_ENTER) {
				onValidateAction();
			}
		}
	});

	// Validate button action handler.
	view.getValidateButton().addListener(Events.Select, new Listener<BaseEvent>() {

		@Override
		public void handleEvent(final BaseEvent be) {
			onValidateAction();
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:27,代码来源:LostPasswordPresenter.java


示例6: mask

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
protected final void mask() {

		if (component == null) {
			return;
		}

		if (component.isRendered()) {
			// If the component is already rendered, apply mask immediately.
			handleRenderEvent(null, null);

		} else {
			// If the component is not rendered yet, wait until after it is all layed out before applying the mask.
			final EventType eventType = component instanceof Container ? Events.AfterLayout : Events.Render;
			component.addListener(eventType, new Listener<ComponentEvent>() {

				@Override
				public void handleEvent(final ComponentEvent be) {
					handleRenderEvent(eventType, this);
				}
			});
		}
	}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:23,代码来源:LoadingMask.java


示例7: initTools

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
@Override
protected void initTools()
{
	// Actually init the tools
	super.initTools();
	
	// Please implement delegates...
	final Window thisAlias = this;
	
	// The close button needs to remove the window from the desktop
	closeBtn.addListener(Events.Select, new Listener<ComponentEvent>() 
			{
		        public void handleEvent(ComponentEvent ce) 
		        {
		        	desk.removeWindow(thisAlias);
		        }
			});	
}
 
开发者ID:recon-null,项目名称:eve_finger,代码行数:19,代码来源:WinViewChar.java


示例8: DesktopMgr

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
/**
 * Default constructor
 */
public DesktopMgr()
{		
	// Listener for taskbar menu items
	menuListener = new SelectionListener<MenuEvent>() 
		{
			@Override
			public void componentSelected(MenuEvent me) 
			{
				itemSelected(me);
			}
	    };

	// Listener for shortcuts
	shortcutListener = new SelectionListener<ComponentEvent>()
	    {
			@Override
			public void componentSelected(ComponentEvent ce)
			{
				itemSelected(ce);
			}
	    };
	
}
 
开发者ID:recon-null,项目名称:eve_finger,代码行数:27,代码来源:DesktopMgr.java


示例9: generateDatePickerObj

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private AdapterField generateDatePickerObj()
{
	final DatePicker dateObj = new DatePicker();
	final AdapterField field = new AdapterField(dateObj);
	field.setToolTip("点击修改内容");
	dateObj.addListener(Events.Select, new Listener<ComponentEvent>() {
               public void handleEvent(ComponentEvent be) {
                   String d = DateTimeFormat.getFormat("yyyy-MM-dd hh:mm:ss").format(dateObj.getValue());
   //              dateObj.setData(d);
                   field.setValue(d);
                   
                   dateObj.hide();                
               }
		});
	return field;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:17,代码来源:UpdateGoodsOnSellAuto.java


示例10: onBlur

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
@Override
protected void onBlur(final ComponentEvent ce) {
  Rectangle rec = trigger.getBounds();
  if (rec.contains(BaseEventPreview.getLastClientX(), BaseEventPreview.getLastClientY())) {
    ce.stopEvent();
    return;
  }
  if (menu != null && menu.isVisible()) {
    return;
  }
  hasFocus = false;
  doBlur(ce);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:14,代码来源:AdaptableTriggerField.java


示例11: onTriggerClick

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
@Override
protected void onTriggerClick(ComponentEvent ce) {
  super.onTriggerClick(ce);
  if (disabled || isReadOnly()) {
    return;
  }

  expand();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:10,代码来源:AdaptableTriggerField.java


示例12: doBlur

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private void doBlur(ComponentEvent ce) {
  if (menu != null && menu.isVisible()) {
    menu.hide();
  }
  super.onBlur(ce);
  focusPreview.remove();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:8,代码来源:AdaptableTriggerField.java


示例13: getMenuItem

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
public static Item getMenuItem(final CMDBDesktopMenuItem desktopItem) {
	if (desktopItem.isSeparator()) {
		return(new SeparatorMenuItem());
	}
	MenuItem item = new MenuItem();
	item.setText(desktopItem.getText());
	item.setIconStyle(desktopItem.getIconStyle());
	String toolTip = desktopItem.getTooltip();
	if (toolTip != null && toolTip.length() > 0) {
		item.setToolTip(toolTip);
	}
	if (desktopItem.getWindowItem() != null) {
		item.addSelectionListener(new SelectionListener<ComponentEvent>() {

			@Override
			public void componentSelected(ComponentEvent ce) {
				Dispatcher.get().dispatch(new AppEvent<CMDBDesktopMenuItem>(CMDBEvents.DESKTOP_MENU_SELECTED, desktopItem));
			}
		});
		if (desktopItem.getWindowItem().isOpenAtStartup()) {
			Dispatcher.get().dispatch(new AppEvent<CMDBDesktopMenuItem>(CMDBEvents.DESKTOP_MENU_SELECTED, desktopItem));
		}
	}
	
	// Check if submenus.
	if (desktopItem.getMenuItem()!= null && desktopItem.getMenuItem().size() > 0) {
		Menu subMenu = new Menu();
		List items = desktopItem.getMenuItem();
		for (CMDBDesktopMenuItem dItem : desktopItem.getMenuItem()) {
			subMenu.add(getMenuItem(dItem));
		}
		item.setSubMenu(subMenu);
	}
	
	return(item);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:37,代码来源:DesktopMenuFactory.java


示例14: updateShortcuts

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
public static void updateShortcuts(Desktop desktop, final CMDBDesktopMenuItem desktopItem) {
	if (desktopItem.getWindowItem() != null) {
		CMDBDesktopWindowItem windowItem = desktopItem.getWindowItem();
	
		Object o = windowItem.get("shortcut");
		if (o instanceof BaseModel) {
			BaseModel shortcut = windowItem.get("shortcut");
		
			Shortcut s = new Shortcut();
			String sText = shortcut.get("text", "[Not specified!}");
			String style = shortcut.get("style", "shortcuts-default");
			String tooltip = shortcut.get("tooltip");
				
			s.setText(sText);
			s.setId(style);
			if (tooltip != null && tooltip.length() > 0) {
				s.setToolTip(tooltip);
			}
			s.addSelectionListener(new SelectionListener<ComponentEvent>() {
				@Override
				public void componentSelected(ComponentEvent ce) {
					Dispatcher.get().dispatch(new AppEvent<CMDBDesktopMenuItem>(CMDBEvents.DESKTOP_MENU_SELECTED, desktopItem));
				}
			});
			desktop.addShortcut(s);
		}
	}
	// Check if submenus.
	if (desktopItem.getMenuItem()!= null && desktopItem.getMenuItem().size() > 0) {
		for (CMDBDesktopMenuItem childItem : desktopItem.getMenuItem()) {
			updateShortcuts(desktop, childItem);
		}
	}
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:35,代码来源:DesktopMenuFactory.java


示例15: getDataSourcePreviewTab

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private ContentPanel getDataSourcePreviewTab() {
	final ContentPanel panel = new ContentPanel();
	panel.setLayout(new FitLayout());
	panel.getHeader().addTool(new ToolButton("x-tool-refresh", new SelectionListener<ComponentEvent>() {

		@Override
		public void componentSelected(ComponentEvent ce) {
			reloadPreview(panel);
		}
		
	}));
    preview = new PreviewTableWidget(transformConfig);
	/*
    preview.addListener(CMDBEvents.MDR_GRID_AVAILIABLE, new Listener<BaseEvent>()  {

		
		public void handleEvent(BaseEvent be) {
			if (be.source instanceof GridModelConfig) {
				setSourceColumns((GridModelConfig)be.source);
			}
		}

		
	});
	*/
	panel.add(preview);
	return(panel);
	/*
	LayoutContainer container = new LayoutContainer();
	container.setLayout(new FitLayout());
	container.add(new WidgetComponent(new TextArea()));
	return(container);
	*/
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:35,代码来源:MDRConfigureWindow.java


示例16: CloseTextToolItem

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
public CloseTextToolItem(Widget w) {
	this.widget = w;
	setText("Close");
	setIconStyle("close-icon");
	setToolTip("Close this window");
	addSelectionListener(new SelectionListener<ComponentEvent>() {

		@Override
		public void componentSelected(ComponentEvent ce) {
			closeParentWindow(widget);
		}

		
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:CloseTextToolItem.java


示例17: initUI

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
public void initUI() {
	add(new FillToolItem());
	TextToolItem next = new TextToolItem("Next");
	next.addSelectionListener(new SelectionListener<ComponentEvent>() {

		@Override
		public void componentSelected(ComponentEvent ce) {
			nextTab.getTabPanel().setSelection(nextTab);
		}
			
	});
	add(next);
	layout();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:15,代码来源:TabWizardBar.java


示例18: getPropertySelection

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private SelectionListener getPropertySelection() {
	SelectionListener<ComponentEvent> selection = new SelectionListener<ComponentEvent>() {

		@Override
		public void componentSelected(ComponentEvent ce) {
			
			CIModelCollection dataCol = new CIModelCollection();
			dataCol.addCIModel("offspring", modelLocal);
			String rootCI = "Ci";
			if (roots.contains("Root")) {
				rootCI = "Root";
			}
			final CIPropertyPanel panel = new CIPropertyPanel(mdr, dataCol, rootCI);
			panel.setPermissions(permission);
			Window w = WindowFactory.getWindow("Properties for " + dataCol.getCIModels().get(0).getDisplayName(), panel);
			w.addListener(Events.Close, new Listener<BaseEvent>() {

				public void handleEvent(BaseEvent be) {
					if (panel.isModelChanged()) {
						reloadModel();
					}
				}
				
			});
			
			w.show();
			w.layout();
			w.toFront();
	}
		
	};
	
	return(selection);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:35,代码来源:CIModelInternalBrowser.java


示例19: getUndoSelection

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private SelectionListener getUndoSelection() {
	return(new SelectionListener<ComponentEvent>() {
		@Override
		public void componentSelected(ComponentEvent ce) {
			attributeGrid.restore();
			defaultValueGrid.restore();
		}
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:10,代码来源:CIModelInternalBrowser.java


示例20: getAddAttributeSelection

import com.extjs.gxt.ui.client.event.ComponentEvent; //导入依赖的package包/类
private SelectionListener getAddAttributeSelection() {
	return(new SelectionListener<ComponentEvent>() {
		@Override
		public void componentSelected(ComponentEvent ce) {
			attributeGrid.addAttribute();
		}
		
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:10,代码来源:CIModelInternalBrowser.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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