Package quickfix.banzai.ui

Source Code of quickfix.banzai.ui.ExecutionTable

package quickfix.banzai.ui;

import quickfix.banzai.ExecutionTableModel;
import quickfix.banzai.Execution;
import javax.swing.table.*;
import javax.swing.*;
import java.awt.*;

public class ExecutionTable extends JTable {
    public ExecutionTable(ExecutionTableModel executionTableModel) {
        super(executionTableModel);
    }

    public Component prepareRenderer(TableCellRenderer renderer,
                                     int row, int column) {
        Execution execution = (Execution)((ExecutionTableModel)dataModel)
                              .getExecution(row);

        DefaultTableCellRenderer r = (DefaultTableCellRenderer)renderer;
        r.setForeground(Color.black);

        if((row%2) == 0)
            r.setBackground(Color.white);
        else
            r.setBackground(Color.lightGray);

        return super.prepareRenderer(renderer, row, column);
    }
}
TOP

Related Classes of quickfix.banzai.ui.ExecutionTable

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.