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.
		
		
		
		
		
			
		
			
				
					
					
						
							107 lines
						
					
					
						
							3.3 KiB
						
					
					
				
			
		
		
	
	
							107 lines
						
					
					
						
							3.3 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;
 | 
						|
 | 
						|
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.*;
 | 
						|
 | 
						|
/**
 | 
						|
 *
 | 
						|
 * @author fpalma
 | 
						|
 */
 | 
						|
public class ConsultaPanel extends JPanel
 | 
						|
		implements ActionListener
 | 
						|
{
 | 
						|
	protected JCalendarPanel dataConsultaPanel;
 | 
						|
	protected JToggleButton porRealizarButton;
 | 
						|
	protected JToggleButton realizadaButton;
 | 
						|
	protected JToggleButton desmarcadaTrabalhadorButton;
 | 
						|
	protected JToggleButton desmarcadaSHSTButton;
 | 
						|
	protected JToggleButton faltouButton;
 | 
						|
	protected JButton emailButton;
 | 
						|
	protected JButton observacoesButton;
 | 
						|
	
 | 
						|
	public static void main( String args[] )
 | 
						|
		throws Exception
 | 
						|
	{
 | 
						|
		JFrame frm = new JFrame();
 | 
						|
		frm.getContentPane().setLayout( new GridLayout( 1, 1 ) );
 | 
						|
		frm.getContentPane().add( new ConsultaPanel() );
 | 
						|
		frm.pack();
 | 
						|
		frm.addWindowListener( new java.awt.event.WindowAdapter(){
 | 
						|
			public void windowClosing( java.awt.event.WindowEvent e )
 | 
						|
			{
 | 
						|
				System.exit( 0 );
 | 
						|
			}
 | 
						|
		} );
 | 
						|
		frm.setVisible( true );
 | 
						|
	}
 | 
						|
	
 | 
						|
	/** Creates a new instance of ConsultaPanel */
 | 
						|
	public ConsultaPanel()
 | 
						|
	{
 | 
						|
		setupComponents();
 | 
						|
	}
 | 
						|
	
 | 
						|
	private void setupComponents()
 | 
						|
	{
 | 
						|
		JLabel dataLabel = new JLabel( "Data" );
 | 
						|
		dataConsultaPanel = new JCalendarPanel( null );
 | 
						|
		ButtonGroup estadoGroup = new ButtonGroup();
 | 
						|
		porRealizarButton = new JToggleButton( "Por Realizar" );
 | 
						|
		estadoGroup.add( porRealizarButton );
 | 
						|
		realizadaButton = new JToggleButton( "Realizada" );
 | 
						|
		estadoGroup.add( realizadaButton );
 | 
						|
		desmarcadaTrabalhadorButton = new JToggleButton( "Desmarcada pelo Trabalhador" );
 | 
						|
		estadoGroup.add( desmarcadaTrabalhadorButton );
 | 
						|
		desmarcadaSHSTButton = new JToggleButton( "Desmarcada pela S.I.P.R.P." );
 | 
						|
		estadoGroup.add( desmarcadaSHSTButton );
 | 
						|
		faltouButton = new JToggleButton( "Faltou" );
 | 
						|
		estadoGroup.add( faltouButton );
 | 
						|
		JPanel estadoPanel = new JPanel();
 | 
						|
		emailButton = new JButton( "Email" );
 | 
						|
		observacoesButton = new JButton( "Coment\u00e1rio" );
 | 
						|
		
 | 
						|
		estadoPanel.setLayout( new GridLayout( 5, 1 ) );
 | 
						|
		estadoPanel.setBorder( 
 | 
						|
				BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(),
 | 
						|
													"Estado" ) );
 | 
						|
		estadoPanel.add( porRealizarButton );
 | 
						|
		estadoPanel.add( realizadaButton );
 | 
						|
		estadoPanel.add( desmarcadaTrabalhadorButton );
 | 
						|
		estadoPanel.add( desmarcadaSHSTButton );
 | 
						|
		estadoPanel.add( faltouButton );
 | 
						|
		
 | 
						|
		double cols[] =
 | 
						|
				new double[]{ TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.PREFERRED };
 | 
						|
		double rows[] = 
 | 
						|
				new double[]{ TableLayout.MINIMUM, TableLayout.FILL, 
 | 
						|
								TableLayout.MINIMUM, TableLayout.MINIMUM };
 | 
						|
		
 | 
						|
		TableLayout tableLayout = new TableLayout( cols, rows );
 | 
						|
		setLayout( tableLayout );
 | 
						|
		
 | 
						|
		add( dataLabel, new TableLayoutConstraints( 0, 0 ) );
 | 
						|
		add( dataConsultaPanel, new TableLayoutConstraints( 1, 0 ) );
 | 
						|
		add( estadoPanel, new TableLayoutConstraints( 0, 1, 1, 3 ) );
 | 
						|
		add( emailButton, new TableLayoutConstraints( 2, 2 ) );
 | 
						|
		add( observacoesButton, new TableLayoutConstraints( 2, 3 ) );
 | 
						|
	}
 | 
						|
 | 
						|
	public void actionPerformed(ActionEvent e)
 | 
						|
	{
 | 
						|
	}
 | 
						|
}
 |