git-svn-id: https://svn.coded.pt/svn/SIPRP@563 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
Frederico Palma 18 years ago
parent 5523be149b
commit ce374e57ea

@ -0,0 +1,93 @@
package siprp.medicina.processo.detalhes;
import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstraints;
import java.awt.GridLayout;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import siprp.medicina.processo.ProcessoDataProvider;
import com.evolute.utils.tables.BaseTable;
import com.evolute.utils.tables.VectorTableModel;
public class ProcessoInfoPanel
extends JPanel
{
protected JFrame owner;
protected BaseTable ecdsTable;
protected VectorTableModel ecdsModel;
protected BaseTable consultasTable;
protected VectorTableModel consultasModel;
protected BaseTable fichaAptidaoTable;
protected VectorTableModel fichaAptidaoModel;
protected ProcessoDataProvider processoProvider;
public ProcessoInfoPanel( JFrame owner )
throws Exception
{
this.owner = owner;
processoProvider = ProcessoDataProvider.getProvider();
setupComponents();
}
private void setupComponents()
{
ecdsModel = new VectorTableModel( new String[]{ "Situa\u00e7\u00e3o", "#", "\u00DAltima Data" } );
ecdsTable = new BaseTable( ecdsModel );
JScrollPane ecdsScroll =
new JScrollPane( ecdsTable, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
consultasModel = new VectorTableModel( new String[]{ "Situa\u00e7\u00e3o", "#", "\u00DAltima Data" } );
consultasTable = new BaseTable( consultasModel );
JScrollPane consultasScroll =
new JScrollPane( consultasTable, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
fichaAptidaoModel = new VectorTableModel( new String[]{ "Situa\u00e7\u00e3o", "Resultado", "\u00DAltima Data" } );
fichaAptidaoTable = new BaseTable( fichaAptidaoModel );
JScrollPane fichaAptidaoScroll =
new JScrollPane( fichaAptidaoTable, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
JPanel ecdsPanel = new JPanel();
ecdsPanel.setBorder(
BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
"ECDs") );
ecdsPanel.setLayout( new GridLayout( 1, 1 ) );
ecdsPanel.add( ecdsScroll );
JPanel consultasPanel = new JPanel();
consultasPanel.setBorder(
BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
"Consultas") );
consultasPanel.setLayout( new GridLayout( 1, 1 ) );
consultasPanel.add( consultasScroll );
JPanel fichaAptidaoPanel = new JPanel();
fichaAptidaoPanel.setBorder(
BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
"Ficha de Aptid\u00e3o") );
fichaAptidaoPanel.setLayout( new GridLayout( 1, 1 ) );
fichaAptidaoPanel.add( fichaAptidaoScroll );
double rows[] = new double[]{ TableLayoutConstraints.FILL, TableLayoutConstraints.FILL,
TableLayoutConstraints.FILL };
double cols[] = new double[]{ TableLayoutConstraints.FILL };
TableLayout layout = new TableLayout( cols, rows );
layout.setHGap( 5 );
layout.setVGap( 5 );
setLayout( layout );
add( ecdsPanel, new TableLayoutConstraints( 0, 0 ) );
add( consultasPanel, new TableLayoutConstraints( 0, 1 ) );
add( fichaAptidaoPanel, new TableLayoutConstraints( 0, 2 ) );
}
}
Loading…
Cancel
Save