avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject cvs commit: avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http AbstractHTMLHandler.java HTMLSampleHandler.java
Date Tue, 02 Mar 2004 15:33:48 GMT
leif        2004/03/02 07:33:48

  Modified:    instrument-manager/src/java/org/apache/excalibur/instrument/manager/http
                        AbstractHTMLHandler.java HTMLSampleHandler.java
  Log:
  Right align numerical values so they are easier to view.
  
  Revision  Changes    Path
  1.5       +10 -4     avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/AbstractHTMLHandler.java
  
  Index: AbstractHTMLHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/AbstractHTMLHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractHTMLHandler.java	28 Feb 2004 11:47:21 -0000	1.4
  +++ AbstractHTMLHandler.java	2 Mar 2004 15:33:48 -0000	1.5
  @@ -189,6 +189,12 @@
           out.print( "<td nowrap>" + value + "</td>" );
       }
       
  +    protected void tableCellRight( PrintStream out, String value )
  +        throws IOException
  +    {
  +        out.print( "<td align='right' nowrap>" + value + "</td>" );
  +    }
  +    
       protected void tableRow( PrintStream out, int row, String label, String value )
           throws IOException
       {
  @@ -275,10 +281,10 @@
               tableCell( out, "<a href='sample.html?name=" + urlEncode( desc.getName()
) + "'>"
                   + desc.getDescription() + "</a> (<a href='sample.html?name="
                   + urlEncode( desc.getName() ) + "&chart=true'>Chart</a>)"
);
  -            tableCell( out, Integer.toString( desc.getValue() ) );
  +            tableCellRight( out, Integer.toString( desc.getValue() ) );
               tableCell( out, new Date( desc.getTime() ).toString() );
  -            tableCell( out, Long.toString( desc.getInterval() ) );
  -            tableCell( out, Integer.toString( desc.getSize() ) );
  +            tableCellRight( out, Long.toString( desc.getInterval() ) );
  +            tableCellRight( out, Integer.toString( desc.getSize() ) );
               String value;
               if ( desc.getLeaseExpirationTime() == 0 )
               {
  
  
  
  1.7       +2 -2      avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/HTMLSampleHandler.java
  
  Index: HTMLSampleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/http/HTMLSampleHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HTMLSampleHandler.java	29 Feb 2004 18:11:04 -0000	1.6
  +++ HTMLSampleHandler.java	2 Mar 2004 15:33:48 -0000	1.7
  @@ -164,7 +164,7 @@
               {
                   startTableRow( out, i );
                   tableCell( out, new Date( time ).toString() );
  -                tableCell( out, Integer.toString( samples[samples.length - i - 1] ) );
  +                tableCellRight( out, Integer.toString( samples[samples.length - i - 1]
) );
                   endTableRow( out );
                   
                   time -= snapshot.getInterval();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message