no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@273 bb69d46d-e84e-40c8-a05a-06db0d633741
Frederico Palma 19 years ago
parent 14c5d1d383
commit 2a859d0c3b

@ -6,14 +6,11 @@
package siprp; package siprp;
import javax.swing.*;
import javax.swing.tree.*; import javax.swing.tree.*;
import java.util.*; import java.util.*;
import com.evolute.utils.*; import com.evolute.utils.*;
import com.evolute.utils.tracker.*; import com.evolute.utils.tracker.*;
import siprp.*;
import siprp.ficha.*; import siprp.ficha.*;
import siprp.clientes.*; import siprp.clientes.*;
import siprp.estatistica.*; import siprp.estatistica.*;
@ -21,6 +18,7 @@ import siprp.higiene.mapa.*;
import siprp.higiene.marcacoes.*; import siprp.higiene.marcacoes.*;
import siprp.impressaofichas.*; import siprp.impressaofichas.*;
import siprp.medicina.*; import siprp.medicina.*;
import siprp.medicina.presencas.RegistarPresencasWindow;
import siprp.pesquisas.*; import siprp.pesquisas.*;
/** /**
* *
@ -32,6 +30,8 @@ public class SIPRPTracker extends WindowTracker
public static final String CRIACAO_FICHA_APTIDAO = "Cria\u00e7\u00e3o de Fichas de Aptid\u00e3o"; public static final String CRIACAO_FICHA_APTIDAO = "Cria\u00e7\u00e3o de Fichas de Aptid\u00e3o";
public static final String GESTAO_CLIENTES = "Gest\u00e3o de Clientes"; public static final String GESTAO_CLIENTES = "Gest\u00e3o de Clientes";
public static final String MEDICINA = "Medicina"; public static final String MEDICINA = "Medicina";
public static final String MEDICINA_MARCACOES = "Marca\u00e7\u00f5es";
public static final String MEDICINA_PRESENCAS = "Presen\u00e7as";
public static final String HIGIENE_SEGURANCA = "Higiene e Seguran\u00e7a"; public static final String HIGIENE_SEGURANCA = "Higiene e Seguran\u00e7a";
public static final String RELATORIO_ANUAL = "Relat\u00f3rio Anual"; public static final String RELATORIO_ANUAL = "Relat\u00f3rio Anual";
public static final String LISTAGENS = "Listagens"; public static final String LISTAGENS = "Listagens";
@ -120,9 +120,11 @@ public class SIPRPTracker extends WindowTracker
return clientesWindow; return clientesWindow;
} }
} ); } );
rootNode.add( new DefaultMutableTreeNode( MEDICINA ) ); DefaultMutableTreeNode medicinaNode = new DefaultMutableTreeNode( MEDICINA );
creators.put( MEDICINA, new WindowCreator() {
medicinaNode.add( new DefaultMutableTreeNode( MEDICINA_MARCACOES ) );
creators.put( MEDICINA_MARCACOES, new WindowCreator() {
public TrackableWindow create() public TrackableWindow create()
throws Exception throws Exception
{ {
@ -135,6 +137,17 @@ public class SIPRPTracker extends WindowTracker
} }
} ); } );
medicinaNode.add( new DefaultMutableTreeNode( MEDICINA_PRESENCAS ) );
creators.put( MEDICINA_PRESENCAS, new WindowCreator() {
public TrackableWindow create()
throws Exception
{
return new RegistarPresencasWindow();
}
} );
rootNode.add( medicinaNode );
DefaultMutableTreeNode higieneNode = new DefaultMutableTreeNode( HIGIENE_SEGURANCA ); DefaultMutableTreeNode higieneNode = new DefaultMutableTreeNode( HIGIENE_SEGURANCA );
higieneNode.add( new DefaultMutableTreeNode( MarcacoesHigieneWindow.TITLE ) ); higieneNode.add( new DefaultMutableTreeNode( MarcacoesHigieneWindow.TITLE ) );

@ -11,12 +11,15 @@ package siprp.medicina.presencas;
import com.evolute.utils.data.IDObject; import com.evolute.utils.data.IDObject;
import com.evolute.utils.data.MappableObject; import com.evolute.utils.data.MappableObject;
import com.evolute.utils.tracker.TrackableWindow;
import com.evolute.utils.ui.calendar.JCalendarPanel; import com.evolute.utils.ui.calendar.JCalendarPanel;
import com.evolute.utils.ui.panel.multipleactionlist.MultipleActionListPanel; import com.evolute.utils.ui.panel.multipleactionlist.MultipleActionListPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.FlowLayout; import java.awt.FlowLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*; import javax.swing.*;
/** /**
@ -24,7 +27,7 @@ import javax.swing.*;
* @author fpalma * @author fpalma
*/ */
public class RegistarPresencasWindow extends JFrame public class RegistarPresencasWindow extends JFrame
implements ActionListener implements ActionListener, TrackableWindow
{ {
protected JCalendarPanel dataPanel; protected JCalendarPanel dataPanel;
protected JButton carregarButton; protected JButton carregarButton;
@ -44,7 +47,7 @@ public class RegistarPresencasWindow extends JFrame
throws Exception throws Exception
{ {
setupComponents(); setupComponents();
setExtendedState( getExtendedState() | MAXIMIZED_BOTH );
} }
private void setupComponents() private void setupComponents()
@ -80,6 +83,14 @@ public class RegistarPresencasWindow extends JFrame
upperPanel.add( dataPanel ); upperPanel.add( dataPanel );
upperPanel.add( carregarButton ); upperPanel.add( carregarButton );
setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
addWindowListener( new WindowAdapter(){
public void windowClosing( WindowEvent e )
{
close();
}
} );
} }
public void actionPerformed( ActionEvent e ) public void actionPerformed( ActionEvent e )
@ -89,4 +100,31 @@ public class RegistarPresencasWindow extends JFrame
new MappableObject( new Integer( 1 ), "Sr. António da loja ao lado da do Sr. Fernando" ) } ); new MappableObject( new Integer( 1 ), "Sr. António da loja ao lado da do Sr. Fernando" ) } );
listScroll.setViewportView( listPanel ); listScroll.setViewportView( listPanel );
} }
public void refresh()
{
}
public void open()
{
setVisible( true );
setExtendedState( getExtendedState() | MAXIMIZED_BOTH );
}
public void close()
{
SwingUtilities.invokeLater( new Runnable() {
public void run()
{
setVisible( false );
dispose();
}
} );
}
public boolean closeIfPossible()
{
close();
return true;
}
} }

Loading…
Cancel
Save