org.zkoss.zul.Listbox.getItemCount()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.zkoss.zul.Listbox.getItemCount()方法的一些代码示例,展示了Listbox.getItemCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Listbox.getItemCount()方法的具体详情如下:
包路径:org.zkoss.zul.Listbox
类名称:Listbox
方法名:getItemCount

Listbox.getItemCount介绍

[英]Returns the number of items.
[中]返回项目数。

代码示例

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.vitals

private void setSelectedRow(String test) {
  if (StringUtils.isEmpty(test)) {
    setSelectedRow(-1);
  } else {
    for (int i = 0; i < lstVitals.getItemCount(); i++) {
      if (test.equals(getValue(0, i))) {
        setSelectedRow(i);
        break;
      }
    }
  }
}

代码示例来源:origin: org.zkoss.zk/zul

/**
 * Scroll to the specified item by the given index.
 * @param index the index of item
 * @since 8.5.2
 */
public void scrollToIndex(int index) {
  ListModel<Object> model = getModel();
  int itemCount = model != null ? model.getSize() : getItemCount();
  if (index < 0 || index > itemCount - 1) {
    throw new IndexOutOfBoundsException("Illegal index: " + index);
  }
  response(new AuInvoke(this, "scrollToIndex", index, (double) index / itemCount));
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.vitals

private Listcell getCell(int col, int row) {
  Listitem item;
  
  while (row >= lstVitals.getItemCount()) {
    item = new Listitem();
    item.setVisible(false);
    item.setParent(lstVitals);
  }
  
  item = lstVitals.getItemAtIndex(row);
  
  while (col >= item.getChildren().size()) {
    Listcell cell = new Listcell("");
    cell.setParent(item);
  }
  
  return (Listcell) item.getChildren().get(col);
}

代码示例来源:origin: org.zkoss.zk/zul

Listgroup lg = (Listgroup) newItem;
if (_groupsInfo.isEmpty())
  _groupsInfo.add(new int[] { lg.getIndex(), getItemCount() - lg.getIndex(), -1 });
else {
  int idx = 0;

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.documents

/**
 * Update the display count of selected documents.
 *
 * @param selCount The selection count.
 */
private void updateSelectCount(int selCount) {
  if (selCount == 0) {
    btnView.setLabel(lblBtnViewSelectAll);
    btnClear.setDisabled(true);
  } else {
    btnView.setLabel(viewText + " (" + selCount + ")");
    btnClear.setDisabled(false);
  }
  
  btnView.setDisabled(listBox.getItemCount() == 0);
}

代码示例来源:origin: org.zkoss.zk/zul

if (_listbox.getItemCount() > 0) {
  Component item = _listbox.getItems().get(0);
  while (item != null) {

代码示例来源:origin: org.zkoss.zk/zul

if (idx != -1) {
        final int realIndex = getRealIndex(idx) - 1;
        if (realIndex >= 0 && realIndex < getItemCount())
          removeChild(getChildren().get(realIndex));
if (hasGroupsModel() && getItemCount() <= 0) { // remove to empty,

代码示例来源:origin: org.zkoss.zats/zats-mimic

public void render(int x, int y) {
    Listbox listbox = target.as(Listbox.class);
    if(x==-1) x = 0;
    if(y==-1) y = listbox.getItemCount()-1;
    ArrayList<String> ids = new ArrayList<String>();
    while(true){
      if(x > y) break;
      Listitem item = listbox.getItemAtIndex(x++);
      if(item!=null && !item.isLoaded()){
        ids.add(item.getUuid());
      }
      
    }
    if(ids.size()==0) return;
    
    String desktopId = target.getDesktop().getId();
    String cmd = Events.ON_RENDER;
    Map<String, Object> data = EventDataManager.getInstance().build(
        new RenderEvent(cmd, new HashSet<String>(ids)));
    ((ClientCtrl) target.getClient()).postUpdate(desktopId, target.getUuid(), cmd, data, false);
    ((ClientCtrl) getClient()).flush(desktopId);
  };
}

代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.problem

for (int i = 0; i < lbProblems.getItemCount(); i++) {
  Listitem li = lbProblems.getItemAtIndex(i);

代码示例来源:origin: org.zkoss.zk/zul

final int tsz = getItemCount();
final int toUI = Math.min(to, tsz - 1); // capped by size
if (!isMultiple() || shift == 0) {

代码示例来源:origin: org.zkoss.zk/zul

ofs = _pgi.getActivePage() * pgsz;
} else {
  pgsz = inSelectMold() ? getItemCount() : getDataLoader().getLimit();
  ofs = inSelectMold() ? 0 : getDataLoader().getOffset();
final int cnt = getItemCount() + getDataLoader().getOffset();
if (ofs >= cnt) { // not possible; just in case
  ofs = cnt - pgsz;

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.vitals

int colcount = hdrVitals.getChildren().size() - 1;
if (row < 0 || row >= lstVitals.getItemCount() || colcount < 0) {
  return;

代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1

/**
 * Update control states.
 */
private void updateControls() {
  if (manageListMode) {
    boolean filterSelected = lstManagedListFilter.getSelectedItem() != null;
    boolean patientSelected = lstManagedList.getSelectedItem() != null;
    btnManagedListFilterRename.setDisabled(!filterSelected);
    btnManagedListFilterDelete.setDisabled(!filterSelected);
    btnManagedListAddCurrent.setDisabled(!filterSelected || PatientContext.getActivePatient() == null);
    btnManagedListAdd.setDisabled(!filterSelected || activePatient == null);
    btnManagedListImport.setDisabled(!filterSelected || lstPatientList.getModel() == null);
    btnManagedListRemove.setDisabled(!patientSelected);
    btnManagedListRemoveAll.setDisabled(lstManagedList.getItemCount() == 0);
    btnOK.setDisabled(false);
    btnManageList.setDisabled(true);
  } else {
    btnManageList.setDisabled(activeList == null
        || (activeList.getItemManager() == null && activeList.getFilterManager() == null));
    btnOK.setDisabled(activePatient == null);
  }
}

代码示例来源:origin: org.zkoss.zk/zul

final int newsz = _model.getSize(), oldsz = _listbox.getItemCount();
int min = event.getIndex0(), max = event.getIndex1(), cnt;

代码示例来源:origin: org.zkoss.zk/zul

final int oldsz = _listbox.getItemCount();
final Paginal _pgi = _listbox.getPaginal();
final boolean inPaging = inPagingMold();

相关文章