/*
 * RecomendacoesPanel.java
 *
 * Created on 29 de Marco de 2004, 11:58
 */

package siprp.ficha;

import java.awt.*;
import javax.swing.*;

import com.evolute.utils.documents.*;
import com.evolute.utils.ui.*;
import com.evolute.utils.ui.calendar.*;
import com.evolute.utils.ui.text.*;

/**
 *
 * @author  fpalma
 */
public class RecomendacoesPanel extends JPanel
{
	private JTextArea recomendacoesText;
	private JCalendarPanel proximoExamePanel;
	/** Creates a new instance of RecomendacoesPanel */
	public RecomendacoesPanel()
	{
		setupComponents();
	}
	
	private void setupComponents()
	{
		setBorder( BorderFactory.createTitledBorder(
					BorderFactory.createEtchedBorder(),
					"Outras Recomenda\u00e7\u00f5es" ) );
	
		JScrollPane scp = new JScrollPane();
		scp.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
		scp.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
		recomendacoesText = new JTextArea();
		recomendacoesText.setLineWrap( true );
		recomendacoesText.setWrapStyleWord( true );
		recomendacoesText.setDocument( new MaximumLengthDocument( 150 ) );
		scp.setViewportView( recomendacoesText );
		JPanel rightPanel = new JPanel();
		JLabel proximoExameLabel = new JLabel( "Pr\u00f3ximo Exame" );
		proximoExamePanel = new JCalendarPanel( null );
		
		setLayout( new GridLayout( 1, 2, 0, 0 ) );
		add( scp );
		add( rightPanel );
		
		rightPanel.setLayout( new BorderLayout() );
		rightPanel.add( proximoExameLabel, BorderLayout.WEST );
		rightPanel.add( proximoExamePanel, BorderLayout.CENTER );
		
		new CopyPasteHandler( recomendacoesText );
	}
}
