From ea470a36bf7774227905692e687953523c2bc20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Sim=C3=A3o?= Date: Thu, 5 Jun 2008 14:33:25 +0000 Subject: [PATCH] git-svn-id: https://svn.coded.pt/svn/SIPRP@724 bb69d46d-e84e-40c8-a05a-06db0d633741 --- .../processo/ui/MedicinaProcessoWindow.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/MedicinaProcessoWindow.java b/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/MedicinaProcessoWindow.java index a9e54e3e..ae185ae2 100755 --- a/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/MedicinaProcessoWindow.java +++ b/trunk/SIPRPSoft/src/siprp/medicina/processo/ui/MedicinaProcessoWindow.java @@ -15,6 +15,7 @@ import leaf.LeafWindow; import leaf.OrderedMap; import leaf.LeafLogic.LeafUIActionBinding; import siprp.database.cayenne.objects.PrtGruposProtocolo; +import siprp.database.cayenne.objects.Trabalhadores; import siprp.database.cayenne.objects.TrabalhadoresEcd; import siprp.database.cayenne.objects.TrabalhadoresEcdsDatas; import siprp.medicina.MedicinaConstants; @@ -44,14 +45,29 @@ public class MedicinaProcessoWindow extends LeafWindow public MedicinaProcessoWindow() throws Exception { super( new MedicinaProcessoLogic() ); - setSize( WINDOW_DIMENSION ); - setTitle( TITLE ); - panelProcessoDados = new ProcessoDadosPanel( this ); panelProcessoToolbar = new ProcessoAccoesPanel( this ); panelProcessoTree = new ProcessoTreePanel( this ); panelTrabalhadoresChooser = new TrabalhadoresChooserPanel( this ); + + startup(); + } + public MedicinaProcessoWindow( Trabalhadores trabalhador ) throws Exception + { + super( new MedicinaProcessoLogic() ); + panelProcessoDados = new ProcessoDadosPanel( this ); + panelProcessoToolbar = new ProcessoAccoesPanel( this ); + panelProcessoTree = new ProcessoTreePanel( this ); + panelTrabalhadoresChooser = new TrabalhadoresChooserPanel( this ); + startup(); + runAction( MedicinaProcessoLogic.LOAD_TRABALHADOR, trabalhador ); + } + + private void startup() + { + setSize( WINDOW_DIMENSION ); + setTitle( TITLE ); setupLayout(); setupComponents(); placeComponents();