com.extjs.gxt.ui.client.widget.grid.Grid.getStore()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(107)

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

Grid.getStore介绍

[英]Returns the grid's store.
[中]返回网格的存储。

代码示例

代码示例来源:origin: com.extjs/gxt

@Override
 protected Store<ModelData> getStore() {
  return grid.getStore();
 }
}

代码示例来源:origin: com.extjs/gxt

@SuppressWarnings({"unchecked", "rawtypes"})
public void bind(Grid grid) {
 this.grid = grid;
 this.store = grid.getStore();
 this.cm = grid.getColumnModel();
}

代码示例来源:origin: pl.touk.top/file-upload-gwtclient-lib

/**
 * Updates displayed list of attachments.
 * @param attachments Corrective invoice attachments to display.
 */
public void updateAttachments(List<FileDescriptor> attachments) {
  attachmentsGrid.getStore().removeAll();
  attachmentsGrid.getStore().add(beanModelFactory.createModel(attachments));    
}

代码示例来源:origin: com.extjs/gxt

protected int[] getVisibleRows(int count) {
 int sc = scroller.getScrollTop();
 int start = sc / getCalculatedRowHeight();
 int first = Math.max(start, 0);
 int last = Math.min(start + count, grid.getStore().getCount() - 1);
 int[] i = new int[] {first, last};
 return i;
}

代码示例来源:origin: com.extjs/gxt

/**
 * Returns the model.
 * 
 * @return the model
 */
public M getModel() {
 if (getRowIndex() != -1) {
  model = grid.getStore().getAt(rowIndex);
 }
 return model;
}

代码示例来源:origin: pl.touk.top/file-upload-gwtclient-lib

public void setCorrectiveInvoiceId(Long correctiveInvoiceId) {
    this.correctiveInvoiceId = correctiveInvoiceId;
    attachmentsGrid.getStore().getLoader().load();
  }
}

代码示例来源:origin: bedatadriven/activityinfo

private Set<String> otherPartnerNames(PartnerDTO editingPartner) {
  List<PartnerDTO> models = grid.getStore().getModels();
  Set<String> names = Sets.newHashSet();
  for (PartnerDTO partner : models) {
      names.add(partner.getName() != null ? partner.getName().trim() : "");
  }
  if(editingPartner.getName() != null) {
    names.remove(editingPartner.getName());
  }
  return names;
}

代码示例来源:origin: com.extjs/gxt

private int adjustIndex(DNDEvent event, int index) {
 Object data = event.getData();
 int i = index;
 List<ModelData> models = prepareDropData(data, true);
 for (ModelData m : models) {
  int idx = grid.getStore().indexOf(m);
  if (idx > -1 && (before ? idx < index : idx <= index)) {
   i--;
  }
 }
 return before ? i : i + 1;
}

代码示例来源:origin: com.extjs/gxt

@Override
public M getModel() {
 if (getRowIndex() != -1) {
  model = getGrid().getStore().getAt(getRowIndex() + viewIndex - liveStoreOffset);
 }
 return model;
}

代码示例来源:origin: pl.touk/wonderful-security-lib

public void handleEvent(GridEvent be) {
    ModelData md = be.getGrid().getStore().getAt(be.getRowIndex());
    onGridRowDoubleClick(md);
  }
});

代码示例来源:origin: bedatadriven/activityinfo

public int getRowY(IndicatorDTO indicator) {
  int rowIndex = grid.getStore().indexOf(indicator);
  if (rowIndex == -1) {
    throw new IllegalArgumentException("indicatorId=" + indicator.getId());
  }
  Element row = grid.getView().getRow(rowIndex);
  Point p = El.fly(row).getAnchorXY("c", false);
  return p.y;
}

代码示例来源:origin: geoserver/geofence

public void onSuccess(Void result)
  {
    // grid.getStore().sort(BeanKeyValue.USER_NAME.getValue(),SortDir.ASC);//<<-- ric mod 20100215
    grid.getStore().getLoader().load();
    grid.repaint();
    Dispatcher.forwardEvent(
      GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
    Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
      new String[] {  /* TODO: I18nProvider.getMessages().ruleServiceName()*/"User Service",
        /* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "User removed successfully!" });
  }
});

代码示例来源:origin: geoserver/geofence

public void onSuccess(Void result)
  {
    // grid.getStore().sort(BeanKeyValue.NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
    grid.getStore().getLoader().load();
    grid.repaint();
    Dispatcher.forwardEvent(
      GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
    Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
      new String[] {  /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Instance Service",
        /* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Instance saved successfully!" });
  }
});

代码示例来源:origin: geoserver/geofence

public void onSuccess(Void result)
  {
    // grid.getStore().sort(BeanKeyValue.USER_NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
    grid.getStore().getLoader().load();
    grid.repaint();
    Dispatcher.forwardEvent(
      GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
    Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
      new String[] {  /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Instance Service",
        /* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Instance removed successfully!" });
  }
});

代码示例来源:origin: geoserver/geofence

public void onSuccess(Void result)
  {
    // grid.getStore().sort(BeanKeyValue.NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
    grid.getStore().getLoader().load();
    grid.repaint();
    Dispatcher.forwardEvent(
      GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
    Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
      new String[] {  /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Profile Service",
        /* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Profile saved successfully!" });
  }
});

代码示例来源:origin: geoserver/geofence

public void onSuccess(Void result)
  {
    // grid.getStore().sort(BeanKeyValue.USER_NAME.getValue(), SortDir.ASC);<<-- ric mod 20100215
    grid.getStore().getLoader().load();
    grid.repaint();
    Dispatcher.forwardEvent(
      GeofenceEvents.BIND_MEMBER_DISTRIBUTION_NODES, result);
    Dispatcher.forwardEvent(GeofenceEvents.SEND_INFO_MESSAGE,
      new String[] {  /* TODO: I18nProvider.getMessages().ruleServiceName()*/"Profile Service",
        /* TODO: I18nProvider.getMessages().ruleFetchSuccessMessage() */ "Profile removed successfully!" });
  }
});

代码示例来源:origin: com.extjs/gxt

protected void onKeyLeft(GridEvent<?> ce) {
 if (grid.getSelectionModel().getSelectedItem() != null) {
  collapseRow(grid.getStore().indexOf(grid.getSelectionModel().getSelectedItem()));
 }
}

代码示例来源:origin: com.extjs/gxt

protected void onKeyRight(GridEvent<?> ce) {
 if (grid.getSelectionModel().getSelectedItem() != null) {
  expandRow(grid.getStore().indexOf(grid.getSelectionModel().getSelectedItem()));
 }
}

代码示例来源:origin: geoserver/geofence

public void handleEvent(GridEvent<RuleModel> be) {
    for (int i = 0; i < be.getGrid().getStore().getCount(); i++) {
      final Widget wid = be.getGrid().getView().getWidget(i, be.getColIndex());
      if ((wid != null) && (wid instanceof BoxComponent)) {
        ((BoxComponent) wid).setWidth(be.getWidth() - offset);
      }
    }
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
public FormDialogTether showAddDialog(ProjectDTO project, FormDialogCallback callback) {
  ProjectForm form = new ProjectForm();
  form.getBinding().bind(project);
  form.getNameField().setValidator(new UniqueNameValidator(grid.getStore().getModels()));
  FormDialogImpl<ProjectForm> dlg = new FormDialogImpl<>(form);
  dlg.setWidth(450);
  dlg.setHeight(300);
  dlg.setHeadingText(messages.createProject());
  dlg.show(callback);
  return dlg;
}

相关文章