Package org.eobjects.datacleaner.widgets

Examples of org.eobjects.datacleaner.widgets.Alignment


      result = _delegate.getTableCellRendererComponent(_table, value, isSelected, hasFocus, row, column);
      assert result instanceof JLabel;
    }

    // alignment is applied to all labels or panels (with flowlayout)
    Alignment alignment = _alignmentOverrides.get(column);
    if (alignment == null) {
      alignment = Alignment.LEFT;
    }

    // set alignment
    if (value instanceof JPanel) {
      final LayoutManager layout = ((JPanel) value).getLayout();
      if (layout instanceof FlowLayout) {
        final FlowLayout flowLayout = (FlowLayout) layout;
        flowLayout.setAlignment(alignment.getFlowLayoutAlignment());
      }
    } else if (result instanceof JLabel) {
      final JLabel label = (JLabel) result;
      label.setHorizontalAlignment(alignment.getSwingContstantsAlignment());

      WidgetUtils.setAppropriateFont(label);
    }

    return result;
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();
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.widgets.Alignment

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.