@Override
    protected void preprocessShowingTableDisplay(List<TableDisplay> showingTableDisplays) {

      for (final TableDisplay d : showingTableDisplays) {

        final JGroupableTable table = d.getTable();

        table.addMouseListener(
            new MouseAdapter() {

              @Override
              @SuppressWarnings("unchecked")
              public void mouseClicked(MouseEvent e) {

                if (e.getClickCount() == 2 && SwingUtilities.isLeftMouseButton(e)) {

                  JGroupableTable table = d.getTable();

                  String tabStatus = d.getStatus();

                  MyTableModel model = (MyTableModel) table.getModel();

                  int row = table.getSelectedRow();

                  List viewList =
                      (List)
                          ObjectUtil.deepCopy(
                              ListUtil.convertToTableViewOrderList(model.getList(), table));

                  new ZcEbReportOffLineDialog(self, viewList, row, tabStatus);
                }
              }
            });
      }
    }
    @Override
    protected void handleTableDisplayActived(
        AbstractSearchConditionItem[] searchConditionItems, final TableDisplay tableDisplay) {

      elementConditionDto.setWfcompoId(getCompoId());

      elementConditionDto.setExecutor(WorkEnv.getInstance().getCurrUserId());

      elementConditionDto.setNd(WorkEnv.getInstance().getTransNd());

      elementConditionDto.setStatus(tableDisplay.getStatus());

      elementConditionDto.setZcText0("offLine");

      for (AbstractSearchConditionItem item : searchConditionItems) {

        item.putToElementConditionDto(elementConditionDto);
      }

      final Container c = tableDisplay.getTable().getParent();

      UIUtilities.asyncInvoke(
          new DefaultInvokeHandler<TableModel>() {

            @Override
            public void before() {

              assert c != null;

              installLoadingComponent(c);
            }

            @Override
            public void after() {

              assert c != null;

              unInstallLoadingComponent(c);

              c.add(tableDisplay.getTable());
            }

            public TableModel execute() throws Exception {

              return new ZcEbEvalReportToTableModelConverter()
                  .convertToTableModel(
                      self.zcEbEvalServiceDelegate.getZcEbEvalReportList(
                          elementConditionDto, requestMeta));
            }

            public void success(TableModel model) {

              tableDisplay.setTableModel(model);

              setButtonsVisiable();
            }
          });
    }
Пример #3
0
package com.ufgov.zc.client.zc.auditsheet;