本文整理汇总了Java中com.extjs.gxt.ui.client.event.MenuEvent类的典型用法代码示例。如果您正苦于以下问题:Java MenuEvent类的具体用法?Java MenuEvent怎么用?Java MenuEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MenuEvent类属于com.extjs.gxt.ui.client.event包,在下文中一共展示了MenuEvent类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildReportsMenu
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
private void buildReportsMenu(MenuBar mainMenu)
{
Menu reportsMenu = new Menu();
List<Map<String, Object>> reports = getClientModel().getAvailableReports();
for (final Map<String, Object> report : reports)
{
MenuItem menuItem = new MenuItem((String)report.get(Constants.I18N), new SelectionListener<MenuEvent>()
{
@Override
public void componentSelected(MenuEvent ce)
{
displayReportDialog(report);
}
});
reportsMenu.add(menuItem);
}
mainMenu.add(new MenuBarItem(textMessages.reports(), reportsMenu));
}
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:19,代码来源:WebPasswordSafe.java
示例2: getOperationListener
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
private Listener<MenuEvent> getOperationListener() {
if (opSelection == null) {
opSelection = new Listener<MenuEvent>() {
public void handleEvent(MenuEvent be) {
CheckMenuItem item = (CheckMenuItem) be.item;
if (item.isChecked()) {
getLoadConfig().set("searchOperation", item.getData("operation"));
getLoadConfig().set("searchOperationNot", item.getData("notOperation"));
} else {
}
}
};
}
return(opSelection);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:GridControllToolBar.java
示例3: getSearchOnListener
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
private Listener<MenuEvent> getSearchOnListener() {
if (searchOnListener == null) {
searchOnListener = new Listener<MenuEvent>() {
public void handleEvent(MenuEvent be) {
CheckMenuItem item = (CheckMenuItem) be.item;
if (item.isChecked()) {
getLoadConfig().set("searchAttributeConfig", item.getData("cfg"));
} else {
}
}
};
}
return(searchOnListener);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:18,代码来源:GridControllToolBar.java
示例4: buildFilterMenu
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
/**
* Builds a new filter {@link MenuItem}.
*
* @param label
* The menu label.
* @param icon
* The menu icon, may be {@code null}.
* @param filterListener
* The filter listener triggered when menu item is selected.
* @param storeFilter
* The store filter instance, may be {@code null}.
* @return The menu item component.
*/
private static <E extends AbstractModelDataEntityDTO<?>> MenuItem buildFilterMenu(final String label, final AbstractImagePrototype icon,
final FilterSelectionListener<E> filterListener, final StoreFilter<E> storeFilter) {
final MenuItem filterMenu = new MenuItem(label, icon);
filterMenu.addSelectionListener(new SelectionListener<MenuEvent>() {
@Override
public void componentSelected(final MenuEvent ce) {
if (filterListener != null) {
filterListener.filter(filterMenu, storeFilter);
}
}
});
return filterMenu;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:31,代码来源:ProjectDashboardView.java
示例5: DesktopMgr
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的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
示例6: getRefDisplListener
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
private Listener<MenuEvent> getRefDisplListener() {
if (refDisplListener == null) {
refDisplListener = new Listener<MenuEvent>() {
public void handleEvent(MenuEvent be) {
CheckMenuItem item = (CheckMenuItem) be.item;
if (item.isChecked()) {
setDisplayMode((Integer) item.getData("value"));
}
}
};
}
return(refDisplListener);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:CITemplateReferenceTree.java
示例7: getRefDirectionListener
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
private Listener<MenuEvent> getRefDirectionListener() {
if (refTypeListener == null) {
refTypeListener = new Listener<MenuEvent>() {
public void handleEvent(MenuEvent be) {
CheckMenuItem item = (CheckMenuItem) be.item;
if (item.isChecked()) {
setRelTypeMode((Integer) item.getData("value"));
}
}
};
}
return(refTypeListener);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:16,代码来源:CITemplateReferenceTree.java
示例8: handleEvent
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
@Override
public void handleEvent(final MenuEvent be) {
if (be.getType() == Events.Select) {
onMenuSelect(be);
}
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:ClosedFilter.java
示例9: componentSelected
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void componentSelected(final MenuEvent ce) {
final Component sourceItem = (Component) ce.getSource();
final Page page = createReportMenu ? Page.REPORT_CREATE : Page.ATTACH_FILE;
eventBus.navigateRequest(page.requestWith(RequestParameter.ID, containerId).addParameter(RequestParameter.NAME, phaseName)
.addData(RequestParameter.DTO, flexibleElement).addData(RequestParameter.SOURCE, sourceItem));
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:13,代码来源:ReportMenuSelectionListener.java
示例10: itemSelected
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
/**
* Handles window selection events
* @param ce The event to handle
*/
private void itemSelected(ComponentEvent ce)
{
Window w;
if (ce instanceof MenuEvent)
{
MenuEvent me = (MenuEvent) ce;
w = me.getItem().getData("window");
}
else
{
w = ce.getComponent().getData("window");
}
if (!desktop.getWindows().contains(w))
{
desktop.addWindow(w);
}
if (w != null && !w.isVisible())
{
w.show();
}
else
{
w.toFront();
}
}
开发者ID:recon-null,项目名称:eve_finger,代码行数:31,代码来源:DesktopMgr.java
示例11: setMenuListener
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
public void setMenuListener(Listener<MenuEvent> menuListener) {
this.menuListener = menuListener;
}
开发者ID:luox12,项目名称:onecmdb,代码行数:4,代码来源:EditableCIInstanceGrid.java
示例12: doAssignmentTreeGrid
import com.extjs.gxt.ui.client.event.MenuEvent; //导入依赖的package包/类
private TreeGrid<ModelData> doAssignmentTreeGrid(){
assignmentStore = new TreeStore<ModelData>();
ColumnConfig name = new ColumnConfig("name", "Name", 100);
name.setRenderer(new TreeGridCellRenderer<ModelData>());
ColumnConfig index = new ColumnConfig("assignmentIndex", "Index", 100);
index.setSortable(false);
index.setFixed(true);
index.setMenuDisabled(true);
ColumnConfig status = new ColumnConfig("status", "Status", 100);
ColumnModel cm = new ColumnModel(Arrays.asList(name, index, status));
assignmentTreeGrid = new TreeGrid<ModelData>(assignmentStore, cm);
assignmentTreeGrid.setBorders(true);
assignmentTreeGrid.setAutoExpandColumn("name");
assignmentTreeGrid.setTrackMouseOver(false);
assignmentTreeGrid.setLoadMask(true);
assignmentTreeGrid.setWidth(600);
assignmentTreeGrid.setHeight(580);
assignmentTreeGrid.setBorders(true);
assignmentTreeGrid.getView().setEmptyText("no data");
assignmentTreeGrid.setId("myAssignmentTreeGridid");
assignmentTreeGrid.getSelectionModel().addListener(Events.SelectionChange,
new Listener<SelectionChangedEvent<ModelData>>() {
public void handleEvent(SelectionChangedEvent<ModelData> be) {
if (be.getSelection().size() > 0) {
assignmentId = Integer.parseInt(assignmentTreeGrid.getSelectionModel().getSelectedItem().get("index").toString());
userDepartmentReportContentPanel.loadData(assignmentId, departmentId);
loadUserAssignmentCheckGrid();
assignmentDetailPanel.setData(assignmentId, departmentId);
} else {
//panel.clear();
}
}
});
Menu menu = new Menu();
MenuItem addUserToAssignmentMenuItem = new MenuItem();
addUserToAssignmentMenuItem.setText("Add/Remove User to Assignment");
addUserToAssignmentMenuItem.setIcon(Resources.ICONS.add16());
addUserToAssignmentMenuItem.addSelectionListener(new SelectionListener<MenuEvent>(){
@Override public void componentSelected(MenuEvent ce) {
addUserToAssignmentWindow();
}
});
menu.add(addUserToAssignmentMenuItem);
assignmentTreeGrid.setContextMenu(menu);
return assignmentTreeGrid;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:56,代码来源:DepartmentPanel.java
注:本文中的com.extjs.gxt.ui.client.event.MenuEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论