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();