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


Java BeforeSelectionHandler类代码示例

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


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

示例1: TextWord

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public TextWord(PlatformContext context, WordPresenter presenter,
		FileModel fmodel) {
	super(context, presenter);
	this.model = fmodel;

	if (fmodel.isAdmin() || context.getUser().isSuper()) {
		add(getEditTab(), new TabItemConfig("编辑", false));
	} else {
		add(getViewTab(), new TabItemConfig("查看", false));
	}
	addBeforeSelectionHandler(new BeforeSelectionHandler<Widget>() {
		public void onBeforeSelection(BeforeSelectionEvent<Widget> event) {
			if (event.getItem() == getViewTab()) {
				if (editTab.getNewContent() != null) {
					getViewTab().refresh(editTab.getNewContent());
				} else if (model.getContent() != null) {
					getViewTab().refresh(model.getContent());
				}
			} else if (event.getItem() == getEditTab()) {
				getEditTab().getCodeMirror().refresh();
			}
		}
	});
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:25,代码来源:TextWord.java

示例2: asWidget

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
/**
 * @return this editor as a Widget.
 */
public Widget asWidget() {
    VerticalPanel panel = new VerticalPanel();
    panel.add(new ContentGroupLabel(Singleton.MESSAGES.label_serviceDetails()));
    panel.add(new ContentDescription(Singleton.MESSAGES.description_serviceDetails()));
    panel.add(createImplementationDetailsPanel());

    TabPanel tabs = new TabPanel();
    tabs.setStyleName("default-tabpanel"); //$NON-NLS-1$
    tabs.getElement().setAttribute("style", "margin-top:15px;"); //$NON-NLS-1$ //$NON-NLS-2$
    tabs.add(createGatewayDetailsPanel(), Singleton.MESSAGES.label_gateways());
    tabs.add(createThrottlingDetailsPanel(), Singleton.MESSAGES.label_throttling());
    tabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
        @Override
        public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {
            _toolstrip.doCancel();
        }
    });

    panel.add(tabs);
    tabs.selectTab(0);

    return panel;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:27,代码来源:ServiceEditor.java

示例3: ShellWord

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public ShellWord(PlatformContext context,WordPresenter presenter,FileModel fmodel) {
	super(context ,presenter);
	this.model=fmodel;
	
	if(fmodel.isAdmin() || context.getUser().isSuper()){
		add(getEditTab(), new TabItemConfig("编辑", false));
		add(getHistoryTab(),new TabItemConfig("调试历史", false));
		setActiveWidget(editTab);
	}else{
		add(getViewTab(), new TabItemConfig("查看", false));
	}
	addBeforeSelectionHandler(new BeforeSelectionHandler<Widget>() {
				public void onBeforeSelection(
						BeforeSelectionEvent<Widget> event) {
					if (event.getItem() == getViewTab()) {
						if(editTab.getNewContent()!=null){
							getViewTab().refresh(editTab.getNewContent());
						}else if (model.getContent() != null) {
							getViewTab().refresh(model.getContent());
						}
					}else if(event.getItem()==getEditTab()){
						getEditTab().getCodeMirror().refresh();
					}else if(event.getItem() == getHistoryTab()){
						getHistoryTab().refresh();
					}
				}
			});
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:29,代码来源:ShellWord.java

示例4: HiveWord

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public HiveWord(PlatformContext context, WordPresenter presenter,
		FileModel fmodel) {
	super(context, presenter);
	this.model = fmodel;

	if (fmodel.isAdmin() || context.getUser().isSuper()) {
		add(getEditTab(), new TabItemConfig("编辑", false));
		add(getHistoryTab(), new TabItemConfig("调试历史", false));
		setActiveWidget(editTab);
	} else {
		add(getViewTab(), new TabItemConfig("查看", false));
	}
	addBeforeSelectionHandler(new BeforeSelectionHandler<Widget>() {
		@Override
		public void onBeforeSelection(BeforeSelectionEvent<Widget> event) {
			if (event.getItem() == getViewTab()) {
				if (editTab.getNewContent() != null) {
					getViewTab().refresh(editTab.getNewContent());
				} else if (model.getContent() != null) {
					getViewTab().refresh(model.getContent());
				}
			} else if (event.getItem() == getEditTab()) {
				getEditTab().getCodeMirror().refresh();
			} else if (event.getItem() == getHistoryTab()) {
				getHistoryTab().refresh();
			}
		}
	});
}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:30,代码来源:HiveWord.java

示例5: makeUI

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public void makeUI() {
        spacialOpsTabs.addSelectionHandler(new SelectionHandler<Integer>() {
            public void onSelection(SelectionEvent<Integer> event) {
                if (tabUpdateOn) updateSelectedTab();
            }
        });

        spacialOpsTabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
            public void onBeforeSelection(BeforeSelectionEvent<Integer> ev) {
                preSelectedTab(ev.getItem());
            }
        });

        makeSingle();
        makeIbeSingle();
        makeMulti();
        makeIbeMulti();
        makePolygon();
        makeAllSky();

        reinitTabPane(true, true, true, true, true, true);
        mainPanel.add(spacialOpsTabs);
        spacialOpsTabs.setSize("100%", "100%");
//        mainPanel.setSize("700px", "245px");
        mainPanel.setSize("600px", NORMAL_HEIGHT_REQUIRED+"px");
        GwtUtil.setStyle(mainPanel,"paddingTop", PADDING_TOP+"px");
    }
 
开发者ID:lsst,项目名称:firefly,代码行数:28,代码来源:SpacialSelectUI.java

示例6: PreferencePanel

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public PreferencePanel() {
    //populatePreferences();
    String[] items = WebProp.getItems(PROP_BASE);
    groupPanels = new PrefGroupPanel[items.length];
    int idx = 0;
    for (String s : items) {
        // construct tab
        String title = WebProp.getTitle(PROP_BASE+"."+s);
        groupPanels[idx] = new PrefGroupPanel(PROP_BASE+"."+s+".field");
        tabs.addTab(groupPanels[idx], title);
        idx++;
    }
    panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    panel.add(grid);
    panel.addStyleName("content-panel");
    WebAppProperties wap = Application.getInstance().getProperties();
    hasViewAll = wap.getBooleanProperty(PROP_BASE+".hasViewAll");
    if (hasViewAll) {
        tabs.addTab(panel, "View All");
    }

    // make sure preference view is in sync with the latest updates
    tabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
        public void onBeforeSelection(BeforeSelectionEvent<Integer> ev) {
            int tabIndex= ev.getItem();
            if (hasViewAll && tabIndex == tabs.getWidgetCount()-1) {
                populatePreferences();
            }
            lastTab = tabIndex;
        }

    });
    tabs.setSize("99%", "99%");
    tabs.selectTab(0);
    initWidget(tabs);

}
 
开发者ID:lsst,项目名称:firefly,代码行数:38,代码来源:PreferencePanel.java

示例7: onRender

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
      super.onRender(parent, index);
      topStatistics.setWidth("100%");
      topStatistics.setHeight("30");
      topDate.setHeight("30");
      searchconditions.setWidth("100%");
      add(topStatistics);
      add(getTopDate());
      add(searchconditions);
      searchconditions.setHorizontalAlignment(searchconditions.ALIGN_CENTER);        
      tabPanel.setWidth("100%");
      tabPanel.setAnimationEnabled(true);
      tabPanel.add(orderReportPanel , "订单概况");
      tabPanel.add(shippingReportPanel , "配送方式");
      tabPanel.add(payReportPanel , "支付方式");
      tabPanel.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
          
          public void onBeforeSelection(BeforeSelectionEvent<Integer> sender) {
              int tabIndex  = sender.getItem();
		if(tabIndex == 0){
			setOrderReportPanel();
		}else if(tabIndex == 1){
			setShippingReportPanel();
		}else if(tabIndex == 2){
			setPayReportPanel();
		}else{
			System.out.println("Error in tab select");
		}
	}
});
      searchconditions.add(tabPanel);
  }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:33,代码来源:OrderStatistics.java

示例8: addBeforeSelectionHandler

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public HandlerRegistration addBeforeSelectionHandler(BeforeSelectionHandler<Node> handler) {
  return ensureHandlers().addHandler(BeforeSelectionEvent.getType(), handler);
}
 
开发者ID:eclipse,项目名称:che,代码行数:6,代码来源:SelectionModel.java

示例9: addBeforeSelectionHandler

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public HandlerRegistration addBeforeSelectionHandler(BeforeSelectionHandler<Integer> h) {
    return tabPanel.addBeforeSelectionHandler(h);
}
 
开发者ID:lsst,项目名称:firefly,代码行数:4,代码来源:TabPane.java

示例10: addBeforeSelectionHandler

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
@Override
public HandlerRegistration addBeforeSelectionHandler(BeforeSelectionHandler<Integer> handler) {

    return addHandler(handler, BeforeSelectionEvent.getType());
}
 
开发者ID:uom-daris,项目名称:daris,代码行数:6,代码来源:CTabPanel.java

示例11: addBeforeSelectionHandler

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
@Override
public HandlerRegistration addBeforeSelectionHandler(final BeforeSelectionHandler<PartDefinition> handler) {
    return addHandler(handler,
                      BeforeSelectionEvent.getType());
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:6,代码来源:UberTabPanel.java

示例12: addBeforeSelectionHandler

import com.google.gwt.event.logical.shared.BeforeSelectionHandler; //导入依赖的package包/类
public HandlerRegistration addBeforeSelectionHandler(
    BeforeSelectionHandler<Integer> handler) {
  return addHandler(handler, BeforeSelectionEvent.getType());
}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:5,代码来源:TabLayoutPanelCopy.java


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