Esempio n. 1
0
    /** @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */
    public void actionPerformed(ActionEvent arg0) {
      Batchable batch = (Batchable) batchSelectionList.getSelection();
      ExcelUtil excelUtil =
          new ExcelUtil(
              tableModel, "Avstemmingsrapport - " + batch.getFileName(), "Avstemmingsrapport");
      try {
        excelUtil.showDataInExcel(
            directory + "/" + applUser.getUserName() + "/",
            "Avstemming.xls",
            (List<Integer>) null,
            (List<Integer>) null,
            (JLabel) null);

        GuiUtil.showMsgFrame(
            window.getComponent(),
            "Excefil",
            "Dersom ikke excel starter automatisk, ligger excelfil med navn Avstemming.xls"
                + " under katalog "
                + directory
                + "/"
                + applUser.getUserName()
                + "/");
      } catch (FrafException e) {
        e.printStackTrace();
        GuiUtil.showErrorMsgDialog(window.getComponent(), "Feil", e.getMessage());
      }
    }
Esempio n. 2
0
    /** @see java.awt.event.ComponentListener#componentShown(java.awt.event.ComponentEvent) */
    @Override
    public void componentShown(ComponentEvent evt) {
      Bunt bunt = deductBatchViewHandler.getSelectedBatch();

      if (lastBunt == null || !lastBunt.equals(bunt)) {
        lastBunt = bunt;
        if (bunt != null) {
          GuiUtil.setWaitCursor(FrafMain.getInstance());
          loadImport(bunt);
          GuiUtil.setDefaultCursor(FrafMain.getInstance());
        }
      }
    }
Esempio n. 3
0
  /**
   * Viser rapport
   *
   * @param window
   */
  void showReport(WindowInterface window) {
    GuiUtil.setWaitCursor(window);
    Batchable batch = (Batchable) batchSelectionList.getSelection();
    if (batch != null) {
      List<ReconcilVInterface> lines = reconcilVManager.findByBatchId(batch.getBatchId());

      if (lines != null) {
        reportList.clear();
        reportList.addAll(lines);
      }
    }
    table.packAll();
    GuiUtil.setDefaultCursor(window);
  }
Esempio n. 4
0
 /** Laster data */
 protected void loadData() {
   if (!guiInitiated) {
     init();
   }
   Threadable loadClass = getLoadClass();
   if (loadClass != null) {
     if (runInWheel) {
       GuiUtil.runInThreadWheel(departmentFrame.getRootPane(), loadClass, null);
     } else {
       GuiUtil.runInThread(
           departmentFrame,
           getHeading(),
           "Henter " + getHeading().toLowerCase() + "...",
           loadClass,
           null);
     }
   }
 }
Esempio n. 5
0
  /**
   * @see no.ica.fraf.gui.model.interfaces.Threadable#doWork(java.lang.Object[], javax.swing.JLabel)
   */
  public Object doWork(Object[] params, JLabel labelInfo) {
    try {
      final ExcelUtil excelUtil = new ExcelUtil(getExcelTableModel(), "", "Sheet1");
      final String dir = excelUtil.prepare(currentApplUser, departmentFrame);

      excelUtil.showDataInExcel(dir, "tmp.xls", getSumColumns(), getNumberCols(), labelInfo);
    } catch (FrafException e) {
      GuiUtil.showErrorMsgFrame(departmentFrame, "Feil", e.getMessage());
      e.printStackTrace();
    }
    return new Boolean(true);
  }
Esempio n. 6
0
 /** Eksporterer data til excel */
 public void showInExcel() {
   GuiUtil.runInThread(departmentFrame, "Excel", "Generer excel-fil", this, null);
 }