Class PTableCellRendererUtil

java.lang.Object
com.portal.app.cc.comp.PTableCellRendererUtil

public class PTableCellRendererUtil extends Object
This class takes care of setting a table column's horizontal alignment to SwingConstants.LEFT, SwingConstants.CENTER, or SwingConstants.RIGHT. Two convenience functions provided for seting a column or a list of columns to RIGHT alignment. These three functions need to be called after setIdxDisplayFieldFormat, since this function will create a TableCellRenderer internally.
Version:
%version: 1 % %date_modified: Thu May 31 18:02:40 2001 %
Author:
simonw
  • Method Details

    • setAlignmentToRight

      public static void setAlignmentToRight(JTable table, int col)
      Sets a column's alignment to SwingConstants.RIGHT.
      Parameters:
      table - will be a PIASpecSpreadSheet in most cases
      col - the column number
    • setAlignmentToRight

      public static void setAlignmentToRight(JTable table, int[] col)
      Sets a list of columns' alignment to SwingConstants.RIGHT.
      Parameters:
      table - will be a PIASpecSpreadSheet in most cases
      col - the column number array
    • setAlignment

      public static void setAlignment(JTable table, int col, int alignment)
      Sets a column's alignment to alighment supplied.
      Parameters:
      table - will be a PIASpecSpreadSheet in most cases
      col - the column number
      alignment - a SwingConstants, LEFT, RIGHT, or CENTER