Package org.eobjects.datacleaner.widgets.table

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


  @Override
  public DCPanel render(final AnnotatedRowsResult result) {
    DCPanel panel = new DCPanel();
    panel.setLayout(new VerticalLayout(4));

    final DCTable table = new DCTable();
    table.setColumnControlVisible(false);

    InputColumn<?>[] highlightedColumns = result.getHighlightedColumns();
    List<InputColumn<?>> inputColumns = result.getInputColumns();

    DCPanel buttonPanel = new DCPanel();
    buttonPanel.setLayout(new HorizontalLayout(4));

    if (highlightedColumns.length == 1 && inputColumns.size() > 1) {
      final JComboBox comboBox = new JComboBox(VIEWS);
      comboBox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
          if (comboBox.getSelectedItem() == VIEWS[0]) {
            applyDetailedView(table, result);
          } else {
            applyDistinctValuesView(table, result);
          }
        }
      });
      comboBox.setSelectedItem(VIEWS[0]);

      buttonPanel.add(comboBox);
    } else {
      applyDetailedView(table, result);
    }

    final JButton saveToFileButton = new JButton("Save dataset", ImageManager.getInstance().getImageIcon(
        "images/actions/save.png"));
    saveToFileButton.addActionListener(new SaveDataSetActionListener(result.getInputColumns(), result.getRows(),
        userPreferences));
    buttonPanel.add(saveToFileButton);

    panel.add(buttonPanel);
    panel.add(table.toPanel());
    return panel;
  }
View Full Code Here


    super(ImageManager.getInstance().getImage("images/window/metadata-tab-background.png"), 95, 95,
        WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
    _analysisJobBuilder = analysisJobBuilder;
    _analysisJobBuilder.getSourceColumnListeners().add(this);

    _table = new DCTable(columnNames);
    _table.setAlignment(5, Alignment.CENTER);
    _table.setAlignment(6, Alignment.CENTER);

    setLayout(new BorderLayout());
    DCPanel tablePanel = _table.toPanel();
View Full Code Here

public class TableModelResultSwingRenderer extends AbstractRenderer<TableModelResult, JComponent> {

  @Override
  public JComponent render(TableModelResult result) {
    TableModel tableModel = result.toTableModel();
    DCTable table = new DCTable(tableModel);
    return table.toPanel();
  }
View Full Code Here

   * @return
   */
  protected CrosstabPanel renderInternal(R result, boolean allowAnimations) {
    _drillToDetailsCallback = new DrillToDetailsCallbackImpl(_windowContext, getRendererFactory());

    final DCTable table = renderTable(result.getCrosstab());

    final CrosstabPanel crosstabPanel = new CrosstabPanel(table, allowAnimations);

    decorate(result, table, crosstabPanel.getDisplayChartCallback());

    // make the first column packed to fit it's size.
    table.packColumn(0, 2);

    return crosstabPanel;
  }
View Full Code Here

  private DCTable renderTable(Crosstab<?> crosstab) {
    final CrosstabRenderer renderer = new CrosstabRenderer(crosstab);
    final RendererCallback rendererCallback = new RendererCallback();
    final TableModel tableModel = renderer.render(rendererCallback);
    final Alignment alignment = rendererCallback.getAlignment();
    final DCTable table = new DCTable(tableModel);

    table.setSortable(false);
    table.setAlignment(0, Alignment.LEFT);
    final int columnCount = table.getColumnCount();
    for (int i = 1; i < columnCount; i++) {
      table.setAlignment(i, alignment);
    }

    if (columnCount >= 10) {
      table.setHorizontalScrollEnabled(true);
    }

    table.setRowHeight(22);
    return table;
  }
View Full Code Here

    if (isDirectoryBased()) {
      _filenameField.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    }

    if (isPreviewTableEnabled()) {
      _previewTable = new DCTable(new DefaultTableModel(7, 10));
      _previewTablePanel = _previewTable.toPanel();
      _previewTablePanel.setBorder(new EmptyBorder(0, 10, 0, 10));
      _loadingIcon = new LoadingIcon();
      _loadingIcon.setVisible(false);
      _loadingIcon.setPreferredSize(_previewTablePanel.getPreferredSize());
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.