diff --git a/trunk/siprp/medicina/processo/ConsultaPanel.java b/trunk/siprp/medicina/processo/ConsultaPanel.java new file mode 100644 index 00000000..20f73dc9 --- /dev/null +++ b/trunk/siprp/medicina/processo/ConsultaPanel.java @@ -0,0 +1,93 @@ +/* + * 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 javax.swing.*; + +/** + * + * @author fpalma + */ +public class ConsultaPanel extends JPanel +{ + 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 ); + porRealizarButton = new JToggleButton( "Por Realizar" ); + realizadaButton = new JToggleButton( "Realizada" ); + desmarcadaTrabalhadorButton = new JToggleButton( "Desmarcada pelo Trabalhador" ); + desmarcadaSHSTButton = new JToggleButton( "Desmarcada pela S.I.P.R.P." ); + faltouButton = new JToggleButton( "Faltou" ); + 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 ) ); + } +}