forked from Coded/SIPRP
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							63 lines
						
					
					
						
							1.1 KiB
						
					
					
				
			
		
		
	
	
							63 lines
						
					
					
						
							1.1 KiB
						
					
					
				| /*
 | |
|  * DiaLine.java
 | |
|  *
 | |
|  * Created on 8 de Fevereiro de 2006, 22:43
 | |
|  *
 | |
|  * To change this template, choose Tools | Template Manager
 | |
|  * and open the template in the editor.
 | |
|  */
 | |
| 
 | |
| package siprp.higiene.mapa;
 | |
| 
 | |
| import java.util.*;
 | |
| 
 | |
| import com.evolute.utils.tables.*;
 | |
| 
 | |
| /**
 | |
|  *
 | |
|  * @author Frederico
 | |
|  */
 | |
| public class DiaLine implements ColumnizedObjectForUpdate
 | |
| {
 | |
| 	protected Integer day;
 | |
| 	protected Vector data[];
 | |
| 	
 | |
| 	/** Creates a new instance of DiaLine */
 | |
| 	public DiaLine( int day, Vector data[] )
 | |
| 	{
 | |
| 		this.day = new Integer( day );
 | |
| 		this.data = data;
 | |
| 	}
 | |
| 	
 | |
| 	public Object getValue( int col )
 | |
| 	{
 | |
| 		switch( col )
 | |
| 		{
 | |
| 			case 0:
 | |
| 				return day;
 | |
| 				
 | |
| 			default:
 | |
| 				return data[ col - 1 ].toArray( new Object[ 0 ][] );
 | |
| 		}
 | |
| 	}
 | |
| 	
 | |
| 	public int[] getUpdateableColumns()
 | |
| 	{
 | |
| 		return new int[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
 | |
| 	}
 | |
| 	
 | |
| 	public void setValueAt( Object value, int col )
 | |
| 	{
 | |
| //		data[ col - 1 ].clear();
 | |
| 		if( value != null && value instanceof Vector )
 | |
| 		{
 | |
| 			data[ col - 1 ].addAll( ( Vector ) value );
 | |
| 		}
 | |
| 	}
 | |
| 	
 | |
| 	public void clear( int col )
 | |
| 	{
 | |
| 		data[ col - 1 ].clear();
 | |
| 	}
 | |
| }
 |