本文整理汇总了Java中com.google.gwt.event.logical.shared.HasSelectionHandlers类的典型用法代码示例。如果您正苦于以下问题:Java HasSelectionHandlers类的具体用法?Java HasSelectionHandlers怎么用?Java HasSelectionHandlers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HasSelectionHandlers类属于com.google.gwt.event.logical.shared包,在下文中一共展示了HasSelectionHandlers类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setItemSelected
import com.google.gwt.event.logical.shared.HasSelectionHandlers; //导入依赖的package包/类
public void setItemSelected(JavaScriptObject aValue) {
if (itemSelected != aValue) {
if (selectedItemReg != null) {
selectedItemReg.removeHandler();
selectedItemReg = null;
}
itemSelected = aValue;
if (component instanceof HasSelectionHandlers<?>) {
selectedItemReg = ((HasSelectionHandlers<Object>) component).addSelectionHandler(new SelectionHandler<Object>() {
@Override
public void onSelection(SelectionEvent<Object> event) {
JavaScriptObject published = ((HasPublished) event.getSource()).getPublished();
Object oItem = event.getSelectedItem();
if (oItem instanceof HasPublished)
oItem = ((HasPublished) oItem).getPublished();
executeEvent(itemSelected, EventsPublisher.publishItemEvent(published, oItem instanceof JavaScriptObject ? (JavaScriptObject) oItem : null));
}
});
}
}
}
示例2: addSelectionHandler
import com.google.gwt.event.logical.shared.HasSelectionHandlers; //导入依赖的package包/类
protected void addSelectionHandler(HasSelectionHandlers<PartDefinition> widget) {
widget.addSelectionHandler(new SelectionHandler<PartDefinition>() {
@Override
public void onSelection(final SelectionEvent<PartDefinition> event) {
panelManager.onPartLostFocus();
panelManager.onPartFocus(event.getSelectedItem());
}
});
}
示例3: getTabPanelSelector
import com.google.gwt.event.logical.shared.HasSelectionHandlers; //导入依赖的package包/类
public HasSelectionHandlers<Integer> getTabPanelSelector() {
return tab_panel;
}
示例4: getTabPanelSelector
import com.google.gwt.event.logical.shared.HasSelectionHandlers; //导入依赖的package包/类
HasSelectionHandlers<Integer> getTabPanelSelector();