FileDocCategorySizeDatePackage
PrincipalsRenderer.javaAPI DocGlassfish v2 API3249Fri May 04 22:34:56 BST 2007com.sun.enterprise.tools.common.properties

PrincipalsRenderer

public class PrincipalsRenderer extends JLabel implements TableCellRenderer
author
shirleyc
version

Fields Summary
private static ResourceBundle
bundle
Constructors Summary
public PrincipalsRenderer()

 //NOI18N
    
      
    
Methods Summary
public java.awt.ComponentgetTableCellRendererComponent(javax.swing.JTable jTable, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)

        if (value == null) {
            setText(MessageFormat.format(bundle.getString("PLURAL_PRIN_CAPTION"), new Object[] {"0"}));  //NOI18N
        }
        else if (value instanceof Vector) {
            if (((Vector)value).size() == 1)
                setText(bundle.getString("SINGLE_PRIN_CAPTION"));   //NOI18N
            else
                setText(MessageFormat.format(bundle.getString("PLURAL_PRIN_CAPTION"), new Object[] {new Integer(((Vector)value).size())}));   //NOI18N
        }
        else 
            System.out.println(value);            
        return this;