Java 类com.google.gwt.event.logical.shared.HasSelectionHandlers 实例源码

项目:platypus-js    文件:EventsExecutor.java   
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));
                }

            });
        }
    }
}
项目:appformer    文件:AbstractWorkbenchPanelView.java   
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());
        }
    });
}
项目:rosa    文件:SequenceView.java   
public HasSelectionHandlers<Integer> getTabPanelSelector() {
    return tab_panel;
}
项目:rosa    文件:SequencePanelPresenter.java   
HasSelectionHandlers<Integer> getTabPanelSelector();