• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CellList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ListView

import com.google.gwt.user.cellview.client.CellList; //导入依赖的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


示例2: initialize

import com.google.gwt.user.cellview.client.CellList; //导入依赖的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


示例3: StudentEditorPresenter

import com.google.gwt.user.cellview.client.CellList; //导入依赖的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


示例4: ManifestView

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
public ManifestView() {
	CellList.Resources cell_res = GWT.create(CellListResources.class);
	
	Panel main = new FlowPanel();
    top = new ScrollPanel(main);
    top.setStylePrimaryName("View");
    
    this.cell_list = new CellList<Reference<Sequence>>(new ReferenceCell<Sequence>(), cell_res);
    this.selection_model = new SingleSelectionModel<Reference<Sequence>>();
    
    cell_list.addStyleName("CellList");
    cell_list.setSelectionModel(selection_model);

    Label panel_title = new Label(Messages.INSTANCE.manifestInstruction());
    panel_title.setStylePrimaryName("PanelTitle");

    this.manifest_label = new Label();
    manifest_label.setStylePrimaryName("PanelHeader");

    main.add(panel_title);
    main.add(manifest_label);
    main.add(cell_list);

    addContent(top);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:26,代码来源:ManifestView.java


示例5: EditDatasourcesViewImpl

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
@Inject
public EditDatasourcesViewImpl(final EditDatadourceViewImplUiBinder uiBinder,
                               final EditDatasourceMessages messages,
                               final @Named(DatasourceKeyProvider.NAME) DatasourceKeyProvider keyProvider,
                               final DatasourceCellListResources dsListResources,
                               final DatasourceCell datasourceCell,
                               final @NotNull EditWindowFooter editWindowFooter) {
    this.messages = messages;
    Widget widget = uiBinder.createAndBindUi(this);
    setWidget(widget);

    this.datasourceList = new CellList<>(datasourceCell, dsListResources, keyProvider);
    this.pagerPanel.setIncrementSize(DATASOURCES_LIST_INCREMENT);
    this.pagerPanel.setDisplay(this.datasourceList);

    this.footer = editWindowFooter;

    this.setTitle(messages.editDatasourcesDialogText());
    this.getFooter().add(editWindowFooter);

    this.datasourceList.setEmptyListWidget(new Label(messages.emptyDatasourceList()));
    this.datasourceList.setPageSize(DATASOURCES_LIST_PAGE_SIZE);
    this.datasourceList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
    this.datasourceList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:26,代码来源:EditDatasourcesViewImpl.java


示例6: makeTemplateSelector

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
/**
 * Creates the scrollable list of cells each of which serves as a link to a template.
 *
 * @param list an ArrayList of TemplateInfo
 * @return A CellList widget
 */
public CellList<TemplateInfo> makeTemplateSelector(ArrayList<TemplateInfo> list) {
  TemplateCell templateCell = new TemplateCell(list.get(0), templateHostUrl);

  CellList<TemplateInfo> templateCellList = new CellList<TemplateInfo>(templateCell,TemplateInfo.KEY_PROVIDER);
  templateCellList.setPageSize(list.size() + 10);
  templateCellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
  templateCellList.setWidth("250px");
  templateCellList.setHeight("400px");
  templateCellList.setVisible(true);

  // Add a selection model to handle user selection.
  final SingleSelectionModel<TemplateInfo> selectionModel =
    new SingleSelectionModel<TemplateInfo>(TemplateInfo.KEY_PROVIDER);
  templateCellList.setSelectionModel(selectionModel);
  selectionModel.setSelected(list.get(0), true);
  final TemplateUploadWizard wizard = this;
  selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
      public void onSelectionChange(SelectionChangeEvent event) {
        TemplateInfo selected = selectionModel.getSelectedObject();
        if (selected != null) {
          selectedTemplateNAME = selected.name;
          TemplateWidget.setTemplate(selected, wizard.getTemplateUrlHost());
        }
      }
    });

  // Set the total row count. This isn't strictly necessary, but it affects
  // paging calculations, so its good habit to keep the row count up to date.
  templateCellList.setRowCount(list.size(), true);

  // Push the data into the widget.
  templateCellList.setRowData(0, list);
  return templateCellList;
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:41,代码来源:TemplateUploadWizard.java


示例7: createListPanel

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
/**
 * Create the panel
 * @return the panel widget
 */
protected void createListPanel() {
   	CellList.Resources resources = GWT.create(CellListResources.class);
    DataSourceCell dataSourceCell = new DataSourceCell( );
    
	dsList = new CellList<DataSourcePageRow>(dataSourceCell,resources);
	dsList.setPageSize(3);
	
    scrollPanel.add(dsList);
    scrollPanel.setHeight("600px");
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:15,代码来源:DataSourceListWidget.java


示例8: showAchievements

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
private void showAchievements(int gameIndex, String categoryName) {
	if(lastAchievementWidget != null) {
		remove(lastAchievementWidget);
	}
	
	AchievementGame game = games.get(gameIndex);
	
	if(categoryName == AchievementGame.FirstCategory) {
		List<AchievementSummary> summary = new ArrayList<AchievementSummary>();
		summary.add(new AchievementSummary(game.getAchievements()));
		CellList<AchievementSummary> summaryList = new CellList<AchievementSummary>(new AchievementSummaryCell());
		summaryList.setRowCount(summary.size());
		summaryList.setRowData(0, summary);
		
		lastAchievementWidget = summaryList;
		add(summaryList);
	}
	else {
		List<Achievement> achievements = game.getAchievements(categoryName);
		CellList<Achievement> achievementList = new CellList<Achievement>(new AchievementCell());
		achievementList.setRowCount(achievements.size());
		achievementList.setRowData(0, achievements);
		
		lastAchievementWidget = achievementList;
		add(achievementList);
	}
}
 
开发者ID:jkonert,项目名称:socom,代码行数:28,代码来源:AchievementsPanel.java


示例9: StudentChooserPresenter

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
public StudentChooserPresenter(GwtPreferences preferences) {
    this.preferences = preferences;
    initWidget(uiBinder.createAndBindUi(this));
    TextCell textCell = new TextCell();
    studentList = new CellList<String>(textCell);
    selectionModel = new MultiSelectionModel<>();
    studentList.addCellPreviewHandler(new Handler<String>() {
        @Override
        public void onCellPreview(CellPreviewEvent<String> event) {
            if (BrowserEvents.CLICK.equals(event.getNativeEvent().getType())) {
                boolean isSelected = selectionModel.isSelected(event.getValue());
                selectionModel.setSelected(event.getValue(), ! isSelected);
                event.setCanceled(true);
            }
        }
    });
    DefaultSelectionEventManager<String> selectionManager =
            DefaultSelectionEventManager.createCheckboxManager();
    studentList.setSelectionModel(selectionModel, selectionManager);
    studentPanel.add(studentList);
    studentList.setRowData(preferences.getStudentNames());
    setListBoxValue(
            wordLength,
            preferences.getUltraghostMinimumWordLength());
    setListBoxValue(
            vocabularySize,
            preferences.getComputerStudentVocabularySize());
}
 
开发者ID:donkirkby,项目名称:vograbulary,代码行数:29,代码来源:StudentChooserPresenter.java


示例10: MobileTaskListView

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
/**
 * Construct a new {@link MobileTaskListView}.
 */
public MobileTaskListView() {

  // Create the CellList.
  CellListResources cellListRes = GWT.create(CellListResources.class);
  taskList = new CellList<TaskProxy>(new TaskProxyCell(), cellListRes);
  taskList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);

  /*
   * Inform the presenter when the user selects a task from the task list. We
   * use a NoSelectionModel because we don't want the task to remain selected,
   * we just want to be notified of the selection event.
   */
  final NoSelectionModel<TaskProxy> selectionModel = new NoSelectionModel<TaskProxy>();
  taskList.setSelectionModel(selectionModel);
  selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
    public void onSelectionChange(SelectionChangeEvent event) {
      // Edit the task.
      if (presenter != null) {
        presenter.selectTask(selectionModel.getLastSelectedObject());
      }
    }
  });

  // Initialize the widget.
  initWidget(uiBinder.createAndBindUi(this));
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:30,代码来源:MobileTaskListView.java


示例11: createTaskTemplateList

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
private CellList<TaskProxy> createTaskTemplateList() {
  CellList<TaskProxy> list =
      new CellList<TaskProxy>(new TaskTemplateCell());
  list.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);

  // Create the templates.
  List<TaskProxy> templates = new ArrayList<TaskProxy>();
  templates.add(new TaskProxyImpl("Call mom", null));
  templates.add(new TaskProxyImpl("Register to vote", "Where is my polling location again?"));
  templates.add(new TaskProxyImpl("Replace air filter", "Size: 24x13x1"));
  templates.add(new TaskProxyImpl("Take out the trash", null));
  list.setRowData(templates);

  return list;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:16,代码来源:DesktopTaskEditView.java


示例12: CollectionView

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
public CollectionView() {
    CellList.Resources cell_res = GWT.create(CellListResources.class);

    main = new FlowPanel();
    top = new ScrollPanel();
    top.setStylePrimaryName("View");

    cell_list = new CellList<Reference<Manifest>>(
            new ReferenceCell<Manifest>(), cell_res);

    top.add(cell_list);
    cell_list.addStyleName("CellList");

    selection_model = new SingleSelectionModel<Reference<Manifest>>();
    cell_list.setSelectionModel(selection_model);

    Label panel_title = new Label(Messages.INSTANCE.collectionInstruction());
    panel_title.setStylePrimaryName("PanelTitle");

    main.add(panel_title);

    collection_label = new Label();
    collection_label.setStylePrimaryName("PanelHeader");

    main.add(collection_label);
    main.add(top);

    addContent(main);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:30,代码来源:CollectionView.java


示例13: shouldBeAbleToInstantiateCellLists

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
@Test
public void shouldBeAbleToInstantiateCellLists() {
  assertNotNull(new CellList<String>(new AbstractCell<String>() {
    @Override
    public void render(Context context, String value, SafeHtmlBuilder sb) {}
  }));
}
 
开发者ID:google,项目名称:gwtmockito,代码行数:8,代码来源:GwtMockitoTest.java


示例14: getCellList

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
@Override
public CellList<EventProxy> getCellList() {
	return cellList;
}
 
开发者ID:burakince,项目名称:open-course-organizer,代码行数:5,代码来源:EventsView.java


示例15: cellListStyle

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
@Source({CellList.Style.DEFAULT_CSS, "MobileCellList.css"})
CellListStyle cellListStyle();
 
开发者ID:Peergos,项目名称:Peergos,代码行数:3,代码来源:MobileTaskListView.java


示例16: HomeView

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
public HomeView() {
	CellList.Resources cell_res = GWT.create(CellListResources.class); 
	
	this.load_button = new Button(Messages.INSTANCE.load());
    this.user_textbox = new TextBox();
    this.is_col_checkbox = new CheckBox("Collection");
    
    TextCell text_cell = new TextCell();
    this.cell_list = new CellList<String>(text_cell, cell_res);
    this.selection_model = new SingleSelectionModel<String>();
    
    cell_list.addStyleName("CellList");
    cell_list.setWidth(250 + "px");
    cell_list.setSelectionModel(selection_model);

    main = new FlowPanel();
    top = new ScrollPanel(main);
    top.setStylePrimaryName("View");

    Label panel_title = new Label(Messages.INSTANCE.homeLabel());
    panel_title.setStylePrimaryName("PanelTitle");

    main.add(panel_title);
    main.add(cell_list);

    FlowPanel toolbar_panel = new FlowPanel();
    toolbar_panel.setStylePrimaryName("PanelToolbar");

    Label panel_header = new Label(Messages.INSTANCE.homeLabelUser());
    panel_header.setStylePrimaryName("PanelHeader");

    main.add(panel_header);
    main.add(new Label(Messages.INSTANCE.homeUserInstruction()));

    main.add(toolbar_panel);

    toolbar_panel.add(user_textbox);
    toolbar_panel.add(is_col_checkbox);
    toolbar_panel.add(load_button);

    addContent(top);
}
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:43,代码来源:HomeView.java


示例17: cellListStyle

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
@Source(
	"rosa/scanvas/demo/website/client/CellList.css")
CellList.Style cellListStyle();
 
开发者ID:jhu-digital-manuscripts,项目名称:rosa,代码行数:4,代码来源:CellListResources.java


示例18: getClassesToStub

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
/**
 * Returns a collection of classes whose non-abstract methods should always be replaced with
 * no-ops. By default, this list includes {@link Composite}, {@link DOM} {@link UIObject},
 * {@link Widget}, {@link Image}, and most subclasses of {@link Panel}. It will also include any
 * classes specified via the {@link WithClassesToStub} annotation on the test class. This makes
 * it much safer to test code that uses or extends these types.
 * <p>
 * This list can be customized via {@link WithClassesToStub} or by defining a new test runner
 * extending {@link GwtMockitoTestRunner} and overriding this method. This allows users to
 * explicitly stub out particular classes that are causing problems in tests. If you override this
 * method, you will probably want to retain the classes that are stubbed here by doing something
 * like this:
 *
 * <pre>
 * &#064;Override
 * protected Collection&lt;Class&lt;?&gt;&gt; getClassesToStub() {
 *   Collection&lt;Class&lt;?&gt;&gt; classes = super.getClassesToStub();
 *   classes.add(MyBaseWidget.class);
 *   return classes;
 * }
 * </pre>
 *
 * @return a collection of classes whose methods should be stubbed with no-ops while running tests
 */
protected Collection<Class<?>> getClassesToStub() {
  Collection<Class<?>> classes = new LinkedList<Class<?>>();
  classes.add(Composite.class);
  classes.add(DOM.class);
  classes.add(UIObject.class);
  classes.add(Widget.class);

  classes.add(DataGrid.class);
  classes.add(HTMLTable.class);
  classes.add(Image.class);

  classes.add(AbsolutePanel.class);
  classes.add(CellList.class);
  classes.add(CellPanel.class);
  classes.add(CellTable.class);
  classes.add(ComplexPanel.class);
  classes.add(DeckLayoutPanel.class);
  classes.add(DeckPanel.class);
  classes.add(DecoratorPanel.class);
  classes.add(DockLayoutPanel.class);
  classes.add(DockPanel.class);
  classes.add(FlowPanel.class);
  classes.add(FocusPanel.class);
  classes.add(HorizontalPanel.class);
  classes.add(HTMLPanel.class);
  classes.add(LayoutPanel.class);
  classes.add(Panel.class);
  classes.add(PopupPanel.class);
  classes.add(RenderablePanel.class);
  classes.add(ResizeLayoutPanel.class);
  classes.add(SimpleLayoutPanel.class);
  classes.add(SimplePanel.class);
  classes.add(SplitLayoutPanel.class);
  classes.add(StackPanel.class);
  classes.add(VerticalPanel.class);
  classes.add(ValueListBox.class);

  WithClassesToStub annotation = unitTestClass.getAnnotation(WithClassesToStub.class);
  if (annotation != null) {
    classes.addAll(Arrays.asList(annotation.value()));
  }

  return classes;
}
 
开发者ID:google,项目名称:gwtmockito,代码行数:69,代码来源:GwtMockitoTestRunner.java


示例19: cellListStyle

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
/**
 * The styles used in the main menu. We extend
 * {@link CellList.Style#DEFAULT_CSS} with the styles defined in
 * MainMenuCellList.css.
 */
@Source({"MainMenuCellList.css", CellList.Style.DEFAULT_CSS})
MainMenuStyle cellListStyle();
 
开发者ID:Peergos,项目名称:Peergos,代码行数:8,代码来源:MobileWebAppShellDesktop.java


示例20: getCellList

import com.google.gwt.user.cellview.client.CellList; //导入依赖的package包/类
CellList<EventProxy> getCellList(); 
开发者ID:burakince,项目名称:open-course-organizer,代码行数:2,代码来源:EventsDisplay.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ChecksumUtil类代码示例发布时间:2022-05-21
下一篇:
Java OFGroupDelete类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap