Package org.eobjects.datacleaner.widgets.table

Examples of org.eobjects.datacleaner.widgets.table.DCTable


    _viewOnlineButton.setEnabled(false);
    _viewOnlineButton.setOpaque(false);
    _viewOnlineButton.setFocusPainted(false);
    _viewOnlineButton.setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);

    _regexSelectionTable = new DCTable();
    _regexSelectionTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        int selectedRow = _regexSelectionTable.getSelectedRow();
        if (selectedRow >= 0) {
          String regexName = (String) _regexSelectionTable.getValueAt(selectedRow, 0);
View Full Code Here


    this(query, dataContext, -1, windowContext);
  }

  public DataSetWindow(final Query query, final DataContext dataContext, int pageSize, WindowContext windowContext) {
    super(windowContext);
    _table = new DCTable();
    _query = query;
    _pageSize = pageSize;
    _title = "DataSet: " + _query.toSql();
    _tableModelCallable = new Callable<TableModel>() {
      @Override
View Full Code Here

    _nextPageButton.setEnabled(false);
  }

  public DataSetWindow(String title, Callable<TableModel> tableModelCallable, WindowContext windowContext) {
    super(windowContext);
    _table = new DCTable();
    _query = null;
    _pageSize = -1;
    _title = title;
    _tableModelCallable = tableModelCallable;
    _previousPageButton = null;
View Full Code Here

    }

    final List<InputColumn<?>> list = Arrays.asList(currentValue);
    logger.info("Selected columns before reordering: {}", list);

    final DCTable table = new DCTable();
    table.setRowHeight(22);

    updateTableModel(table, list);

    final Image image = ImageManager.getInstance().getImage("images/actions/reorder-columns.png");

    final DCPanel tablePanel = table.toPanel();
    tablePanel.setBorder(new CompoundBorder(WidgetUtils.BORDER_SHADOW, WidgetUtils.BORDER_THIN));

    final JDialog dialog = new JDialog();

    final JButton button = new JButton("Save order", new ImageIcon(image));
View Full Code Here

  }

  @Override
  public JComponent render(CrosstabResult result) {
    final CrosstabPanel crosstabPanel = super.renderInternal(result, false);
    final DCTable table = crosstabPanel.getTable();
    if (isInitiallyCharted(table) || isTooLimitedToChart(table)) {
      return crosstabPanel;
    }

    final DCPanel headerPanel = new DCPanel();
View Full Code Here

    int i = 0;
    for (Object object : values) {
      model.setValueAt(object, i, 0);
      i++;
    }
    DCTable table = new DCTable(model);
    return table.toPanel();
  }
View Full Code Here

   */
  public ValueDistributionResultSwingRendererGroupDelegate(String groupOrColumnName, int preferredSlices, int maxSlices) {
    _groupOrColumnName = groupOrColumnName;
    _preferredSlices = preferredSlices;
    _maxSlices = maxSlices;
    _table = new DCTable("Value", LabelUtils.COUNT_LABEL);
    _table.setRowHeight(22);
  }
View Full Code Here

        popup.show(addDriverButton, 0, addDriverButton.getHeight());
      }
    });
    toolBar.add(addDriverButton);

    final DCTable table = getDatabaseDriverTable();
    this.add(toolBar, BorderLayout.NORTH);
    this.add(table.toPanel(), BorderLayout.CENTER);
  }
View Full Code Here

  private DCTable getDatabaseDriverTable() {
    final List<DatabaseDriverDescriptor> databaseDrivers = _databaseDriverCatalog.getDatabaseDrivers();
    final TableModel tableModel = new DefaultTableModel(new String[] { "", "Database", "Driver class", "Installed?",
        "Used?" }, databaseDrivers.size());

    final DCTable table = new DCTable(tableModel);

    final Icon validIcon = imageManager.getImageIcon("images/status/valid.png", IconUtils.ICON_SIZE_SMALL);
    final Icon invalidIcon = imageManager.getImageIcon("images/status/error.png", IconUtils.ICON_SIZE_SMALL);

    final int installedCol = 3;
    final int usedCol = 4;
    int row = 0;
    for (final DatabaseDriverDescriptor dd : databaseDrivers) {
      final String driverClassName = dd.getDriverClassName();
      final String displayName = dd.getDisplayName();

      final Icon driverIcon = imageManager.getImageIcon(DatabaseDriverCatalog.getIconImagePath(dd),
          IconUtils.ICON_SIZE_SMALL);

      tableModel.setValueAt(driverIcon, row, 0);
      tableModel.setValueAt(displayName, row, 1);
      tableModel.setValueAt(driverClassName, row, 2);
      tableModel.setValueAt("", row, 3);
      tableModel.setValueAt("", row, 4);

      final DatabaseDriverState state = _databaseDriverCatalog.getState(dd);
      if (state == DatabaseDriverState.INSTALLED_WORKING) {
        tableModel.setValueAt(validIcon, row, installedCol);
      } else if (state == DatabaseDriverState.INSTALLED_NOT_WORKING) {
        tableModel.setValueAt(invalidIcon, row, installedCol);
      } else if (state == DatabaseDriverState.NOT_INSTALLED) {
        final String[] downloadUrls = dd.getDownloadUrls();
        if (downloadUrls != null) {
          final DCPanel buttonPanel = new DCPanel();
          buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 4, 0));

          final JButton downloadButton = WidgetFactory.createSmallButton("images/actions/download.png");
          downloadButton.setToolTipText("Download and install the driver for " + dd.getDisplayName());

          downloadButton.addActionListener(createDownloadActionListener(dd));
          buttonPanel.add(downloadButton);

          tableModel.setValueAt(buttonPanel, row, installedCol);
        }
      }

      if (isUsed(driverClassName)) {
        tableModel.setValueAt(validIcon, row, usedCol);
      }

      row++;
    }

    table.setAlignment(installedCol, Alignment.CENTER);
    table.setAlignment(usedCol, Alignment.CENTER);

    table.setRowHeight(IconUtils.ICON_SIZE_SMALL + 4);
    table.getColumn(0).setMaxWidth(IconUtils.ICON_SIZE_SMALL + 4);
    table.getColumn(installedCol).setMaxWidth(84);
    table.getColumn(usedCol).setMaxWidth(70);
    table.setColumnControlVisible(false);
    return table;
  }
View Full Code Here

      headerPanel.add(Box.createHorizontalStrut(4));
      headerPanel.add(removeButton);
      add(headerPanel, BorderLayout.NORTH);
    }

    _columnTable = new DCTable(headers);
    _columnTable.setColumnControlVisible(false);
    _columnTable.setRowHeight(IconUtils.ICON_SIZE_SMALL + 4);

    JPanel tablePanel = _columnTable.toPanel();
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.widgets.table.DCTable

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.