public ValuePicker(CellList<T> cellList) { this.cellList = cellList; initWidget(cellList); cellList.setSelectionModel(smodel); smodel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() { public void onSelectionChange(SelectionChangeEvent event) { setValue(smodel.getSelectedObject(), true); } }); }
public ValuePicker(Renderer<? super T> renderer) { this(new CellList<T>(new DefaultCell<T>(renderer))); }
public void setAcceptableValues(Collection<T> values) { cellList.setRowData(new ArrayList<T>(values)); }
/** * Get the {@link Element} for the specified index. If the element has not * been created, null is returned. * * @param indexOnPage the index on the page * @return the element, or null if it doesn't exists * @throws IndexOutOfBoundsException if the index is outside of the current * page */ public Element getRowElement(int indexOnPage) { getPresenter().flush(); checkRowBounds(indexOnPage); if (childContainer.getChildCount() > indexOnPage) { return childContainer.getChild(indexOnPage).cast(); } return null; }
m_reportList = new CellList<KscReportDetail>(new KscReportDetailCell()); m_reportList.setPageSize(10); m_reportList.getElement().getStyle().setFontSize(12, Unit.PX); m_reportList.setSelectionModel(m_selectionModel);
m_autoComplete = new CellList<NodeMarker>(cell); m_autoComplete.setSelectionModel(m_selectionModel); m_autoComplete.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION); m_autoComplete.setVisible(false); m_autoComplete.addStyleName("search-autocomplete"); setIdIfMissing(m_autoComplete, "searchControl.autoComplete");
if (widgetStyle != null) { addStyleName(widgetStyle); DivElement outerDiv = getElement().cast(); outerDiv.appendChild(childContainer); adopt(messagesPanel); messagesPanel.add(emptyListWidgetContainer); messagesPanel.add(loadingIndicatorContainer);
public ComboBox(String cssSuffix) { cellList = new CellList<String>(new TextCell() cellList.setSelectionModel(selectionModel);
@PostConstruct private void init() { issuesList.setKeyboardPagingPolicy(HasKeyboardPagingPolicy.KeyboardPagingPolicy.INCREASE_RANGE); issuesList.setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy.BOUND_TO_SELECTION); issuesList.setSelectionModel(getSelectionModel()); }
private void refeshCellList() { cellList.setRowCount(this.values.size(), true); cellList.setRowData(0, this.values); }
public void setPageSize(int size) { cellList.setPageSize(size); }
@Override public void execute() { setFocus(true); } });
m_nodeList = new CellList<NodeDetail>(new NodeDetailCell()); m_nodeList.setPageSize(10); m_nodeList.getElement().getStyle().setFontSize(12, Unit.PX); m_nodeList.setSelectionModel(m_selectionModel);
m_autoComplete = new CellList<NodeMarker>(cell); m_autoComplete.setSelectionModel(m_selectionModel); m_autoComplete.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION); m_autoComplete.setVisible(false); m_autoComplete.addStyleName("search-autocomplete"); setIdIfMissing(m_autoComplete, "searchControl.autoComplete");
if (widgetStyle != null) { addStyleName(widgetStyle); DivElement outerDiv = getElement().cast(); outerDiv.appendChild(childContainer); adopt(messagesPanel); messagesPanel.add(emptyListWidgetContainer); messagesPanel.add(loadingIndicatorContainer);
public void setPageSize(int size) { cellList.setPageSize(size); }
/** * Get the {@link Element} for the specified index. If the element has not * been created, null is returned. * * @param indexOnPage the index on the page * @return the element, or null if it doesn't exists * @throws IndexOutOfBoundsException if the index is outside of the current * page */ public Element getRowElement(int indexOnPage) { getPresenter().flush(); checkRowBounds(indexOnPage); if (childContainer.getChildCount() > indexOnPage) { return childContainer.getChild(indexOnPage).cast(); } return null; }
@Override public void execute() { setFocus(true); } });
m_reportLabel.getElement().getStyle().setFontSize(12, Unit.PX); m_reportList = new CellList<KscReport>(new KscReportCell()); m_reportList.setPageSize(10); m_reportList.getElement().getStyle().setFontSize(12, Unit.PX); m_reportList.setSelectionModel(m_selectionModel);
if (widgetStyle != null) { addStyleName(widgetStyle); DivElement outerDiv = getElement().cast(); outerDiv.appendChild(childContainer); adopt(messagesPanel); messagesPanel.add(emptyListWidgetContainer); messagesPanel.add(loadingIndicatorContainer);