Package javax.swing.table

Examples of javax.swing.table.DefaultTableModel


    final PageFormat pageFormat = new PageFormat();
    pageFormat.setPaper(fmFactory.createPaper((double) sequence.getPageWidth(), 1000d));

    final SimplePageDefinition pageDefinition = new SimplePageDefinition(pageFormat);
    final ProcessingContext processingContext = new DefaultProcessingContext();
    final DebugExpressionRuntime runtime = new DebugExpressionRuntime(new DefaultTableModel(), 0, processingContext);

    final TableDebugOutputProcessor outputProcessor = new TableDebugOutputProcessor(metaData);
    final TableDebugRenderer flowRenderer = new TableDebugRenderer(outputProcessor);
    final MasterReport report = new MasterReport();
    report.setPageDefinition(pageDefinition);
View Full Code Here


   *
   * @return A <code>TableModel</code>.
   */
  public static TableModel createData()
  {
    final DefaultTableModel data = new DefaultTableModel();
    data.addColumn("Data");
    data.addColumn("A");
    data.addColumn("B");
    data.addColumn("C");
    data.addRow(new Object[]{"data.firstElement", new Double(43.0), new Double(127.5), new Double(10001.999)});
    data.addRow(new Object[]{"data.secondElement", new Double(57.0), new Double(108.5), new Double(-10001.999)});
    data.addRow(new Object[]{"data.thirdElement", new Double(35.0), new Double(164.8), new Double(-999.9999)});
    data.addRow(new Object[]{"data.fourthElement", new Double(86.0), new Double(164.0), new Double(999.9999)});
    data.addRow(new Object[]{"data.lastElement", new Double(12.0), new Double(103.2), new Double(0.999)});
    return data;
  }
View Full Code Here

    };

    final String[] names = new String[]{
      "CMR", "OC", "RowIndicator"
    };
    final DefaultTableModel model = new DefaultTableModel(data, names);
    return model;
  }
View Full Code Here

    report.getReportHeader().addElement(rectangleElementFactory.createElement());
    report.getReportHeader().addElement(labelElement);

    report.setDataFactory(new TableDataFactory
        ("default", new DefaultTableModel()));

    ClassicEngineBoot.getInstance().start();
    PreviewFrame preview = new PreviewFrame(report);
    preview.pack();
    preview.setVisible(true);
View Full Code Here

    final String[] names = new String[]{
        resources.getString("libraries-table.column.name"),
        resources.getString("libraries-table.column.version"),
        resources.getString("libraries-table.column.licence"),
        resources.getString("libraries-table.column.info")};
    final DefaultTableModel model = new DefaultTableModel(names, libraries.size());
    for (int i = 0; i < libraries.size(); i++)
    {
      final DependencyInformation depInfo = (DependencyInformation) libraries.get(i);
      model.setValueAt(depInfo.getName(), i, 0);
      model.setValueAt(depInfo.getVersion(), i, 1);
      model.setValueAt(depInfo.getLicenseName(), i, 2);
      model.setValueAt(depInfo.getInfo(), i, 3);
    }

    this.table = new JTable(model);
    add(new JScrollPane(this.table));
View Full Code Here

  public void testPre112() throws ReportProcessingException, IOException, ReportDefinitionException
  {
    ClassicEngineBoot.getInstance().start();
//     String outputFilename = getReportOutputPath() + "/report-282.html"; //$NON-NLS-1$
    final MasterReport report = parseReport(getReportDefinitionSource());
    report.setDataFactory(new TableDataFactory(report.getQuery(), new DefaultTableModel(10, 10)));
    //HtmlReportUtil.createStreamHTML(report, outputFilename);
    TestSystem.showPreview(report);
    assertTrue(true);
  }
View Full Code Here

  }

  public static TableModel createMainTableModel()
  {
    logger.debug("TestDataFactory.createTableModel");
    return new DefaultTableModel(new String[][]{{"1.1", "1.2"}, {"2.1", "2.2"}}, new String[]{"c1", "c2"});
  }
View Full Code Here

  }

  public static TableModel createSubReportTableModel(final String param1)
  {
    logger.debug("TestDataFactory.createTableModel(" + param1 + ")");
    return new DefaultTableModel(new String[][]{{"1.1:" + param1, "1.2:" + param1}, {"2.1:" + param1, "2.2:" + param1}}, new String[]{"t1", "t2"});
  }
View Full Code Here

    ClassicEngineBoot.getInstance().start();
    String[] COLNAMES = {
            "ONR", "TEXT"
    };

    final DefaultTableModel tableModel = new DefaultTableModel(COLNAMES,6);
    tableModel.setValueAt(new Integer(1), 0, 0);
    tableModel.setValueAt(new Integer(1), 1, 0);
    tableModel.setValueAt(new Integer(2), 2, 0);
    tableModel.setValueAt(new Integer(2), 3, 0);
    tableModel.setValueAt(new Integer(3), 4, 0);
    tableModel.setValueAt(new Integer(3), 5, 0);
    tableModel.setValueAt("A", 0, 1);
    tableModel.setValueAt("AA", 1, 1);
    tableModel.setValueAt("B", 2, 1);
    tableModel.setValueAt("BB", 3, 1);
    tableModel.setValueAt("C", 4, 1);
    tableModel.setValueAt("CC", 5, 1);

    final URL in = ObjectUtilities.getResource(URLNAME, Pre85ReportTest.class);
    final MasterReport report = ReportGenerator.getInstance().parseReport(in);

    final TableDataFactory tdf = new TableDataFactory("Test Query", tableModel);
View Full Code Here

    };

    final String[][] data = new String[][]{
      colnames, colnames
    };
    final TableModel model = new DefaultTableModel(data, colnames);
//    final JFreeReport report = new BandInBandStackingDemoHandler().createReport();
    System.out.println (model.getRowCount());
    final MasterReport report = TestSystem.loadReport(URLNAME, model);
//    FunctionalityTestLib.createXLS(report);
    ExcelReportUtil.createXLS(report, "/tmp/export.xls");
    HtmlReportUtil.createStreamHTML(report, "/tmp/export.html");
//    FunctionalityTestLib.createXLS(report);
View Full Code Here

TOP

Related Classes of javax.swing.table.DefaultTableModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.