lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/debugger/SimpleMonitor.java
protected void printTable(TextTableModel printTable)
    {
        for (int i = 0; i < printTable.getRowCount(); i++)
        {
            StringBuffer result = new StringBuffer();

            for (int j = 0; j < printTable.getColumnCount(); j++)
            {
                String valueToPrint = printTable.get(j, i);
                valueToPrint = (valueToPrint == null) ? "" : valueToPrint;
                result.append(valueToPrint);

                Integer maxColumnSize = printTable.getMaxColumnSize(j);
                int padding = ((maxColumnSize == null) ? 0 : maxColumnSize) - valueToPrint.length();
                padding = (padding < 0) ? 0 : padding;

                for (int s = 0; s < padding; s++)
                {
                    result.append(" ");
                }

                result.append(" % ");
            }

            result.append("\n");
            System.out.print(result);
        }
    }
protected void printTable(TextTableModel printTable)
    {
        for (int i = 0; i < printTable.getRowCount(); i++)
        {
            StringBuffer result = new StringBuffer();

            for (int j = 0; j < printTable.getColumnCount(); j++)
            {
                String valueToPrint = printTable.get(j, i);
                valueToPrint = (valueToPrint == null) ? "" : valueToPrint;
                result.append(valueToPrint);

                Integer maxColumnSize = printTable.getMaxColumnSize(j);
                int padding = ((maxColumnSize == null) ? 0 : maxColumnSize) - valueToPrint.length();
                padding = (padding < 0) ? 0 : padding;

                for (int s = 0; s < padding; s++)
                {
                    result.append(" ");
                }

                result.append(" % ");
            }

            result.append("\n");
            System.out.print(result);
        }
    }
protected void printTable ( TextTableModel printTable ) { for ( int i = 0 ; i < printTable . getRowCount ( ) ; i ++ ) { StringBuffer result = new StringBuffer ( ) ; for ( int j = 0 ; j < printTable . getColumnCount ( ) ; j ++ ) { String valueToPrint = printTable . get ( j , i ) ; valueToPrint = ( valueToPrint == null ) ? "" : valueToPrint ; result . append ( valueToPrint ) ; Integer maxColumnSize = printTable . getMaxColumnSize ( j ) ; int padding = ( ( maxColumnSize == null ) ? 0 : maxColumnSize ) - valueToPrint . length ( ) ; padding = ( padding < 0 ) ? 0 : padding ; for ( int s = 0 ; s < padding ; s ++ ) { result . append ( " " ) ; } result . append ( " % " ) ; } result . append ( "\n" ) ; System . out . print ( result ) ; } }
Renders the table.
Renders the table .