Examples of toTableModel()


Examples of org.apache.metamodel.data.DataSet.toTableModel()

        DataContext dc = getDataContext();
        DataSet data = dc.executeQuery(q);
        assertEquals(1, data.getSelectItems().length);

        @SuppressWarnings("deprecation")
        TableModel tableModel = data.toTableModel();

        // should correspond to these lines:

        // data.add(new Object[] { 4, 1, "advisor" });
        // data.add(new Object[] { 1, 1, "developer" });
View Full Code Here

Examples of org.apache.metamodel.data.DataSet.toTableModel()

        DataSet data = dc.executeQuery(q);
        assertEquals(1, data.getSelectItems().length);
        assertEquals("SUM(r.project_id)", data.getSelectItems()[0].toString());

        @SuppressWarnings("deprecation")
        TableModel tableModel = data.toTableModel();
        assertEquals(3, tableModel.getRowCount());
        assertEquals(1, tableModel.getColumnCount());
        assertEquals(1.0, tableModel.getValueAt(0, 0));
        assertEquals(9.0, tableModel.getValueAt(1, 0));
        assertEquals(2.0, tableModel.getValueAt(2, 0));
View Full Code Here

Examples of org.apache.metamodel.data.DataSet.toTableModel()

        DataContext dc = getDataContext();
        DataSet data = dc.executeQuery(q);
        assertEquals(1, data.getSelectItems().length);

        @SuppressWarnings("deprecation")
        TableModel tableModel = data.toTableModel();

        // should correspond to these lines:

        // data.add(new Object[] { 4, 1, "advisor" });
        // data.add(new Object[] { 1, 1, "developer" });
View Full Code Here

Examples of org.apache.metamodel.data.DataSet.toTableModel()

        DataSet data = dc.executeQuery(q);
        assertEquals(1, data.getSelectItems().length);
        assertEquals("SUM(r.project_id)", data.getSelectItems()[0].toString());

        @SuppressWarnings("deprecation")
        TableModel tableModel = data.toTableModel();
        assertEquals(3, tableModel.getRowCount());
        assertEquals(1, tableModel.getColumnCount());
        assertEquals(1.0, tableModel.getValueAt(0, 0));
        assertEquals(9.0, tableModel.getValueAt(1, 0));
        assertEquals(2.0, tableModel.getValueAt(2, 0));
View Full Code Here

Examples of org.eobjects.metamodel.data.DataSet.toTableModel()

    _title = "DataSet: " + _query.toSql();
    _tableModelCallable = new Callable<TableModel>() {
      @Override
      public TableModel call() throws Exception {
        DataSet dataSet = dataContext.executeQuery(_query);
        return dataSet.toTableModel();
      }
    };
    _previousPageButton = WidgetFactory.createButton("Previous page", "images/actions/back.png");
    _previousPageButton.setEnabled(false);
    _nextPageButton = WidgetFactory.createButton("Next page", "images/actions/forward.png");
View Full Code Here

Examples of org.eobjects.metamodel.data.DataSet.toTableModel()

      @Override
      protected void done() {
        try {
          DataSet dataSet = get();
          if (dataSet != null) {
            _previewTable.setModel(dataSet.toTableModel());
          }
        } catch (Throwable e) {
          if (e instanceof ExecutionException) {
            // get the cause of the execution exception (it's a
            // wrapper around the throwable)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.