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.
		
		
		
		
		
			
		
			
				
					
					
						
							90 lines
						
					
					
						
							2.0 KiB
						
					
					
				
			
		
		
	
	
							90 lines
						
					
					
						
							2.0 KiB
						
					
					
				/*
 | 
						|
 * DetalhesProcessoPanel.java
 | 
						|
 *
 | 
						|
 * Created on 25 de Abril de 2007, 17:34
 | 
						|
 *
 | 
						|
 * To change this template, choose Tools | Template Manager
 | 
						|
 * and open the template in the editor.
 | 
						|
 */
 | 
						|
 | 
						|
package siprp.medicina.processo.detalhes;
 | 
						|
 | 
						|
import java.awt.CardLayout;
 | 
						|
import java.util.Vector;
 | 
						|
import javax.swing.JFrame;
 | 
						|
import javax.swing.JPanel;
 | 
						|
import siprp.medicina.processo.*;
 | 
						|
 | 
						|
/**
 | 
						|
 *
 | 
						|
 * @author Frederico
 | 
						|
 */
 | 
						|
public class DetalhesProcessoPanel extends JPanel
 | 
						|
{
 | 
						|
	private final Vector<ProcessoListener> PROCESSO_LISTENERS = new Vector<ProcessoListener>();
 | 
						|
	
 | 
						|
	private static final String CARD_BLANK = "";
 | 
						|
	private static final String CARD_CONSULTA = "CONSULTA";
 | 
						|
	private static final String CARD_ECDS = "ECDS";
 | 
						|
	
 | 
						|
	protected JFrame owner;
 | 
						|
	
 | 
						|
	protected JPanel blankPanel;
 | 
						|
	protected ConsultaPanel consultaPanel;
 | 
						|
	protected ECDsPanel ecdsPanel;
 | 
						|
	
 | 
						|
	protected CardLayout cardLayout;
 | 
						|
	
 | 
						|
	/**
 | 
						|
	 * Creates a new instance of DetalhesProcessoPanel
 | 
						|
	 */
 | 
						|
	public DetalhesProcessoPanel( JFrame owner )
 | 
						|
	{
 | 
						|
		this.owner = owner;
 | 
						|
		setupComponents();
 | 
						|
	}
 | 
						|
	
 | 
						|
	private void setupComponents()
 | 
						|
	{
 | 
						|
		blankPanel = new JPanel();
 | 
						|
		consultaPanel = new ConsultaPanel( owner );
 | 
						|
		ecdsPanel = new ECDsPanel( owner );
 | 
						|
		
 | 
						|
		cardLayout = new CardLayout();
 | 
						|
		setLayout( cardLayout );
 | 
						|
		add( blankPanel, CARD_BLANK );
 | 
						|
		add( consultaPanel, CARD_CONSULTA );
 | 
						|
		add( ecdsPanel, CARD_ECDS );
 | 
						|
	}
 | 
						|
	
 | 
						|
	public void addProcessoListener( ProcessoListener listener )
 | 
						|
	{
 | 
						|
		PROCESSO_LISTENERS.add( listener );
 | 
						|
		consultaPanel.addProcessoListener( listener );
 | 
						|
		ecdsPanel.addProcessoListener( listener );
 | 
						|
	}
 | 
						|
	
 | 
						|
	public void removeProcessoListener( ProcessoListener listener )
 | 
						|
	{
 | 
						|
		PROCESSO_LISTENERS.remove( listener );
 | 
						|
		consultaPanel.removeProcessoListener( listener );
 | 
						|
		ecdsPanel.removeProcessoListener( listener );
 | 
						|
	}
 | 
						|
	
 | 
						|
	public void clear()
 | 
						|
	{
 | 
						|
		cardLayout.first( this );
 | 
						|
	}
 | 
						|
	
 | 
						|
	public void setConsulta( Integer consultaID )
 | 
						|
	{
 | 
						|
		cardLayout.show( this, CARD_CONSULTA );
 | 
						|
		consultaPanel.fill( consultaID );
 | 
						|
	}
 | 
						|
	
 | 
						|
	public void setECDs( Integer ecdsID )
 | 
						|
	{
 | 
						|
		cardLayout.show( this, CARD_ECDS );
 | 
						|
	}
 | 
						|
}
 |