private Detail getDetails(Row row) {
     if (row.getValue() instanceof TaskQualityForm) {
         return ((Detail) row.getFirstChild());
     } else {
         return ((Detail) row.getGrid().getParent());
     }
 }
コード例 #2
0
  private void removeRow(Row row) {
    try {
      if (row.getGrid().getRows() != null) {
        row.getGrid().renderAll();
        int rowIndex = row.getGrid().getRows().getChildren().indexOf(row);

        ListModelList model = (ListModelList) row.getGrid().getListModel();
        DefaultFormatMapEntries entries = (DefaultFormatMapEntries) model.get(rowIndex);
        model.remove(rowIndex);
        String rateformtname = entries.getRateFormat();
        if (rateformtname.contains("VF_")) rateformtname = rateformtname.replaceAll("VF_", "");
        rateForamatSelected.remove(rateformtname);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 private TaskQualityForm getTaskQualityFormByRow(final Row row) {
     try {
         return (TaskQualityForm) ((Row) row.getGrid().getParent()
                 .getParent()).getValue();
     } catch (Exception e) {
         return null;
     }
 }
コード例 #4
0
ファイル: RowCollectionItem.java プロジェクト: apextw/zk
 public Component getComponentCollectionOwner(Component comp) {
   if (comp instanceof Row) {
     final Row row = (Row) comp;
     return row.getGrid();
   } else {
     throw new UiException("Unsupported type for RowCollectionItem: " + comp);
   }
 }
コード例 #5
0
ファイル: RowCollectionItem.java プロジェクト: apextw/zk
 public void setupBindingRenderer(Component comp, DataBinder binder) {
   if (comp instanceof Row) {
     final Row row = (Row) comp;
     final Grid grid = row.getGrid();
     if (grid.getRowRenderer() == null) {
       grid.setRowRenderer(new BindingRowRenderer(row, binder));
     }
   }
 }