/*
  This software is the confidential and proprietary information of
  Smardec. You shall not disclose or distribute such Confidential Information.
  This software shall not be integrated, copied (partially or fully),
  or reverse engineered into any other software, program, or code that is
  not intended for Smardec. You shall use it only in accordance with the terms
  of the license agreement you entered into with Smardec.

  Copyright (C) 2003-2006 Smardec. All rights reserved.

  http://www.smardec.com

*/

package com.smardec.demo.asc.spantable;

import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.*;
import java.awt.*;


public class HtmlRenderer extends DefaultTableCellRenderer {
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        HtmlTextWrapper textWrapper = (HtmlTextWrapper) value;
        JLabel tableCellRendererComponent = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        tableCellRendererComponent.setVerticalAlignment(SwingConstants.TOP);
        tableCellRendererComponent.setText(textWrapper.getText());
        return tableCellRendererComponent;
    }
}
