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.
		
		
		
		
		
			
		
			
				
					
					
						
							95 lines
						
					
					
						
							2.5 KiB
						
					
					
				
			
		
		
	
	
							95 lines
						
					
					
						
							2.5 KiB
						
					
					
				| /*
 | |
|  * ConsultaPanel.java
 | |
|  *
 | |
|  * Created on March 22, 2007, 10:58 AM
 | |
|  *
 | |
|  * To change this template, choose Tools | Template Manager
 | |
|  * and open the template in the editor.
 | |
|  */
 | |
| 
 | |
| package siprp.medicina.processo.detalhes;
 | |
| 
 | |
| import com.evolute.utils.ui.calendar.JCalendarPanel;
 | |
| import info.clearthought.layout.TableLayout;
 | |
| import info.clearthought.layout.TableLayoutConstraints;
 | |
| import java.awt.GridLayout;
 | |
| import java.awt.event.ActionEvent;
 | |
| import java.awt.event.ActionListener;
 | |
| import javax.swing.*;
 | |
| import javax.swing.event.ChangeEvent;
 | |
| import javax.swing.event.ChangeListener;
 | |
| import siprp.medicina.MedicinaConstants;
 | |
| 
 | |
| /**
 | |
|  *
 | |
|  * @author fpalma
 | |
|  */
 | |
| public class ConsultaPanel extends JPanel
 | |
| 		implements ActionListener, MedicinaConstants, ChangeListener
 | |
| {
 | |
| 	protected JFrame owner;
 | |
| 	protected JCalendarPanel dataConsultaPanel;
 | |
| 	protected JButton estadoButton;
 | |
| 	protected JButton emailButton;
 | |
| 	protected JButton observacoesButton;
 | |
| 	
 | |
| 	protected ObservacoesDialog observacoesDialog;
 | |
| 	
 | |
| 	/** Creates a new instance of ConsultaPanel */
 | |
| 	public ConsultaPanel( JFrame owner )
 | |
| 	{
 | |
| 		this.owner = owner;
 | |
| 		setupComponents();
 | |
| 	}
 | |
| 	
 | |
| 	private void setupComponents()
 | |
| 	{
 | |
| 		JLabel dataLabel = new JLabel( "Data" );
 | |
| 		dataConsultaPanel = new JCalendarPanel( null );
 | |
| 		dataConsultaPanel.addChangeListener( this );
 | |
| 		estadoButton = new JButton( " " );
 | |
| 		estadoButton.addActionListener( this );
 | |
| 		emailButton = new JButton( "Email" );
 | |
| 		emailButton.addActionListener( this );
 | |
| 		observacoesButton = new JButton( "Coment\u00e1rio" );
 | |
| 		observacoesButton.addActionListener( this );
 | |
| 		
 | |
| 		double cols[] =
 | |
| 				new double[]{ TableLayout.MINIMUM, TableLayout.FILL };
 | |
| 		double rows[] = 
 | |
| 				new double[]{ TableLayout.MINIMUM, TableLayout.MINIMUM, 
 | |
| 								TableLayout.MINIMUM, TableLayout.MINIMUM };
 | |
| 		
 | |
| 		TableLayout tableLayout = new TableLayout( cols, rows );
 | |
| 		tableLayout.setVGap( 5 );
 | |
| 		setLayout( tableLayout );
 | |
| 		
 | |
| 		add( dataLabel, new TableLayoutConstraints( 0, 0 ) );
 | |
| 		add( dataConsultaPanel, new TableLayoutConstraints( 1, 0 ) );
 | |
| 		add( estadoButton, new TableLayoutConstraints( 0, 1, 1, 1 ) );
 | |
| 		add( emailButton, new TableLayoutConstraints( 0, 2, 1, 2 ) );
 | |
| 		add( observacoesButton, new TableLayoutConstraints( 0, 3, 1, 3 ) );
 | |
| 	}
 | |
| 
 | |
| 	public void actionPerformed(ActionEvent e)
 | |
| 	{
 | |
| 		Object source = e.getSource();
 | |
| 		if( source.equals( observacoesButton ) )
 | |
| 		{
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	public void stateChanged(ChangeEvent e)
 | |
| 	{
 | |
| 	}
 | |
| 	
 | |
| 	protected void editarObservacoes()
 | |
| 	{
 | |
| 		if( observacoesDialog == null )
 | |
| 		{
 | |
| 			observacoesDialog = new ObservacoesDialog( owner );
 | |
| 		}
 | |
| 		
 | |
| 	}
 | |
| }
 |