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


Java SelectionChangeEvent类代码示例

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


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

示例1: CodeListView

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
public CodeListView(EventBus eventBus, OntoBrowserServiceAsync service) {
	super(eventBus,service);
	
	Image emptyListWidget = new Image(ImageResources.INSTANCE.spinner());
	emptyListWidget.setStyleName("float-right");
	list.setEmptyListWidget(emptyListWidget);
	list.setKeyboardPagingPolicy(KeyboardPagingPolicy.CURRENT_PAGE);
	list.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
	list.setSelectionModel(selection);
	selection.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
		public void onSelectionChange(SelectionChangeEvent event) {
			Term selected = selection.getSelectedObject();
			if(selected != null) {
				History.newItem(selected.getReferenceId());
			}
		}
	});
			
	codelistContainer.add(list);
	
	initWidget(codelistContainer);
	addStyleName("padded-border vert-scroll");
	eventBus.addHandler(ViewTermEvent.TYPE, this);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:25,代码来源:CodeListView.java

示例2: postConstruct

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
/**
 * Called after construction.
 */
@PostConstruct
protected void postConstruct() {
	// SelectionModel to handle Source selection 
	dsSelectionModel = new SingleSelectionModel<String>();
	viewSourceNamesTable.setSelectionModel(dsSelectionModel); 
	dsSelectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
		public void onSelectionChange( SelectionChangeEvent event) { 
			String selectedRow = dsSelectionModel.getSelectedObject();
			selectedSource = selectedRow;
			if(selectedSource!=null) {
				deleteButton.setEnabled(true);
			} else {
				deleteButton.setEnabled(false);
			}
		} });
	
	// Initially disabled.  Enables when user makes a selection
	deleteButton.setEnabled(false);
	
	// Tooltips
	addButton.setTitle(i18n.format("viewsource-panel.addButton.tooltip"));
	addButton.setIcon(IconType.PLUS);
	deleteButton.setTitle(i18n.format("viewsource-panel.deleteButton.tooltip"));
	deleteButton.setIcon(IconType.MINUS);
	viewSourceNamesTable.setTitle(i18n.format("viewsource-panel.viewSourceNamesTable.tooltip"));
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:30,代码来源:ViewSourcePanel.java

示例3: bind

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
/**
 * Bind this control to a {@link ApplicationServicesList}.
 * 
 * @param applicationServicesList the {@link ApplicationServicesList} to listen to.
 */
public void bind(final ApplicationServicesList applicationServicesList) {
    applicationServicesList.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            Service selected = applicationServicesList.getSelection();
            if (selected == null) {
                return;
            }
            String promotedServiceName = selected.getPromotedService();
            if (promotedServiceName == null) {
                return;
            }
            for (ComponentService service : getData()) {
                if (promotedServiceName.equals(KEY_PROVIDER.getKey(service))) {
                    setSelection(service);
                    return;
                }
            }
            setSelection(null);
        }
    });
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:28,代码来源:ComponentServicesList.java

示例4: ServiceView

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
/**
 * Create a new ServiceView.
 */
public ServiceView() {
    super();
    _servicesList = new ServicesList();
    _servicesList.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            // prevent infinite recursion
            if (_servicesList.getSelection() != _selectedService) {
                _presenter.onServiceSelected(_servicesList.getSelection());
            }
        }
    });

    _serviceEditor = new ServiceEditor();

}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:20,代码来源:ServiceView.java

示例5: ReferenceView

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
/**
 * Create a new ReferenceView.
 */
public ReferenceView() {
    super();
    _referencesList = new ReferencesList();
    _referencesList.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            // prevent infinite recursion
            if (_referencesList.getSelection() != _selectedReference) {
                _presenter.onReferenceSelected(_referencesList.getSelection());
            }
        }
    });

    _referenceEditor = new ReferenceEditor();
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:19,代码来源:ReferenceView.java

示例6: setSelectionModel

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
@Override
public void setSelectionModel(SelectionModel<? super T> selectionModel) {

    clearSelectionModel();

    // Set the new selection model.
    this.selectionModel = selectionModel;
    if (selectionModel != null) {
        selectionHandler = selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {

            @Override
            public void onSelectionChange(SelectionChangeEvent event) {

            	updateSelection();
            }
        });
    }

    // Update the current selection state based on the new model.
    updateSelection();
}
 
开发者ID:waynedyck,项目名称:gwt-gantt,代码行数:22,代码来源:TaskDisplayPresenter.java

示例7: PermissionTreeModel

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
public PermissionTreeModel() {
	selectionModel.addSelectionChangeHandler(new Handler() {
		@Override
		public void onSelectionChange(SelectionChangeEvent event) {
			for (GlobalPermissionEnum permission : GlobalPermissionEnum.values()) {
				boolean selected = selectionModel.isSelected(permission);

				GlobalPermissionEnum parent = permission.getParent();
				while (parent != null) {
					selected = selected && selectionModel.isSelected(parent);
					parent = parent.getParent();
				}
				
				selectionModel.setSelected(permission, selected);
			}
		}
	});
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:19,代码来源:PermissionTree.java

示例8: onAttach

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
@Override
protected void onAttach() {
    super.onAttach();

    registerHandler(
        sortableIneTable
            .getSelectionModel()
            .addSelectionChangeHandler(new SelectionChangeEvent.Handler() {

                @Override
                public void onSelectionChange(SelectionChangeEvent event) {
                    AssistedObject selected = sortableIneTable
                        .getSingleSelectionModel()
                        .getSelectedObject();
                    if (selected != null) {
                        sortableIneTable.getSelectionModel().setSelected(selected, false);

                        eventBus.fireEvent(
                            new PlaceRequestEvent(
                                oneParamPlace.getChildPlaceToken(selected.getId().toString())));
                    }
                }
            }));
}
 
开发者ID:inepex,项目名称:ineform,代码行数:25,代码来源:MeetingSelectorPage.java

示例9: ListView

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
public ListView(final ListPresenter<LISTITEM> presenter, Cell<LISTITEM> itemDisplayCell) {
	this.presenter = presenter;	
	this.cellList = new CellList<LISTITEM>(itemDisplayCell);
	
	cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);

    // Add a selection model to handle user selection.
    final SingleSelectionModel<LISTITEM> selectionModel = new SingleSelectionModel<LISTITEM>();
    cellList.setSelectionModel(selectionModel);
    selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
      public void onSelectionChange(SelectionChangeEvent event) {
        LISTITEM selected = selectionModel.getSelectedObject();
        if (selected != null) {
          presenter.onSelectionChanged(event, selectionModel);
        }
      }
    });
	this.pagerTop = new SimplePager();
	this.pagerTop.setDisplay(this.cellList);
	this.pagerBottom = new SimplePager();
	this.pagerBottom.setDisplay(this.cellList);
	
	initWidget((Widget)uiBinder.createAndBindUi(this));		
}
 
开发者ID:jkonert,项目名称:socom,代码行数:25,代码来源:ListView.java

示例10: ReportSelectListViewImpl

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
public ReportSelectListViewImpl(List<ResourceListItem> dataList) {
    m_dataList = dataList;
    
    m_selectionModel = new MultiSelectionModel<ResourceListItem>();
    m_selectionModel.addSelectionChangeHandler(new Handler() {
        
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            if(m_selectionModel.getSelectedSet().size() > 0) {
                m_selectedReports = new ArrayList<ResourceListItem>(m_selectionModel.getSelectedSet());
            }else {
                m_selectedReports = null;
            }
            
        }
    });
    
    initWidget(uiBinder.createAndBindUi(this));
    
    m_layoutPanel.setSize("100%", "500px");
    m_layoutPanel.getElement().getStyle().setOverflow(Overflow.AUTO);
    m_treeContainer.add(makeCellTree(m_dataList));
    
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:25,代码来源:ReportSelectListViewImpl.java

示例11: DefaultResourceListViewImpl

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
public DefaultResourceListViewImpl() {
    initWidget(uiBinder.createAndBindUi(this));
    
    m_layoutPanel.setSize("100%", "335px");
    
    m_dataProvider = new ListDataProvider<ResourceListItem>();
    m_dataProvider.addDataDisplay(m_resourceTable);
    
    SimplePager pager = new SimplePager(TextLocation.CENTER);
    pager.setStyleName("onms-table-no-borders-margin");
    pager.getElement().getStyle().setBackgroundColor("#E0E0E0");
    pager.getElement().getStyle().setWidth(100, Unit.PCT);
    pager.setDisplay(m_resourceTable);
    m_simplePagerContainer.add(pager);
    
    m_resourceTable.getSelectionModel().addSelectionChangeHandler(new Handler() {
        
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            m_presenter.onResourceItemSelected();
        }
    });
    
    m_resourceTable.setWidth("100%");
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:26,代码来源:DefaultResourceListViewImpl.java

示例12: initialize

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
private void initialize() {
	Resources resources = GWT.create(Resources.class);
	EventCell eventCell = new EventCell(resources.tux());
	cellList = new CellList<EventProxy>(eventCell);
	cellList.setPageSize(10);
	cellList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
	cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);

	final SingleSelectionModel<EventProxy> selectionModel = new SingleSelectionModel<EventProxy>();
	cellList.setSelectionModel(selectionModel);
	selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {

		@Override
		public void onSelectionChange(SelectionChangeEvent event) {
			presenter.goEventDetailView(selectionModel.getSelectedObject().getId());
		}
	});

	eventPagerPanel.setDisplay(cellList);
}
 
开发者ID:burakince,项目名称:open-course-organizer,代码行数:21,代码来源:EventsView.java

示例13: StudentEditorPresenter

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
public StudentEditorPresenter(final GwtPreferences preferences) {
    this.preferences = preferences;
    initWidget(uiBinder.createAndBindUi(this));
    TextCell textCell = new TextCell();
    studentDisplay = new CellList<String>(textCell);
    studentList = new ListDataProvider<>(preferences.getStudentNames());
    studentList.addDataDisplay(studentDisplay);
    selectionModel = new SingleSelectionModel<>();
    studentDisplay.setSelectionModel(selectionModel);
    selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
        @Override
        public void onSelectionChange(SelectionChangeEvent event) {
            updateSelectedStudent();
            oldStudentName = selectionModel.getSelectedObject();
            studentName.setText(oldStudentName);
        }
    });
    studentPanel.add(studentDisplay);
    selectionModel.setSelected(studentList.getList().get(0), true);
}
 
开发者ID:donkirkby,项目名称:vograbulary,代码行数:21,代码来源:StudentEditorPresenter.java

示例14: initialiseAvailableTypes

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
private void initialiseAvailableTypes() {
    availableTypesContainer.add(availableTypesWidget);
    availableTypesWidget.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
    availableTypesWidget.setMinimumWidth(270);

    final Label lstEmpty = new Label(GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailablePatterns());
    lstEmpty.setStyleName(WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem());
    availableTypesWidget.setEmptyListWidget(lstEmpty);

    final MultiSelectionModel<String> selectionModel = new MultiSelectionModel<String>();
    availableTypesWidget.setSelectionModel(selectionModel);

    selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {

        @Override
        public void onSelectionChange(final SelectionChangeEvent event) {
            availableTypesSelections = selectionModel.getSelectedSet();
            btnAdd.setEnabled(availableTypesSelections.size() > 0);
        }
    });
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:22,代码来源:FactPatternsPageViewImpl.java

示例15: initialiseAvailableFactTypes

import com.google.gwt.view.client.SelectionChangeEvent; //导入依赖的package包/类
private void initialiseAvailableFactTypes() {
    availableFactTypesContainer.add( availableFactTypesWidget );
    availableFactTypesWidget.setKeyboardSelectionPolicy( KeyboardSelectionPolicy.ENABLED );
    availableFactTypesWidget.setMinimumWidth( 130 );

    final Label lstEmpty = new Label( GuidedDecisionTableConstants.INSTANCE.DecisionTableWizardNoAvailablePatterns() );
    lstEmpty.setStyleName( WizardCellListResources.INSTANCE.cellListStyle().cellListEmptyItem() );
    availableFactTypesWidget.setEmptyListWidget( lstEmpty );

    final MultiSelectionModel<String> selectionModel = new MultiSelectionModel<String>();
    availableFactTypesWidget.setSelectionModel( selectionModel );

    selectionModel.addSelectionChangeHandler( new SelectionChangeEvent.Handler() {

        @Override
        public void onSelectionChange( final SelectionChangeEvent event ) {
            availableFactTypesSelections = selectionModel.getSelectedSet();
            btnAddFactTypes.setEnabled( availableFactTypesSelections.size() > 0 );
        }

    } );
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:23,代码来源:ActionInsertFactFieldsPageViewImpl.java


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