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;
import javax.swing.*;
import javax.swing.tree.*;
import java.util.*;
import com.evolute.utils.*;
import com.evolute.utils.tracker.*;
import siprp.*;
import siprp.ficha.*;
import siprp.clientes.*;
import siprp.estatistica.*;
@ -21,6 +18,7 @@ import siprp.higiene.mapa.*;
import siprp.higiene.marcacoes.*;
import siprp.impressaofichas.*;
import siprp.medicina.*;
import siprp.medicina.presencas.RegistarPresencasWindow;
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 GESTAO_CLIENTES = "Gest\u00e3o de Clientes";
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 RELATORIO_ANUAL = "Relat\u00f3rio Anual";
public static final String LISTAGENS = "Listagens";
@ -120,9 +120,11 @@ public class SIPRPTracker extends WindowTracker
return clientesWindow;
}
} );
rootNode.add( new DefaultMutableTreeNode( MEDICINA ) );
creators.put( MEDICINA, new WindowCreator() {
DefaultMutableTreeNode medicinaNode = new DefaultMutableTreeNode( MEDICINA );
medicinaNode.add( new DefaultMutableTreeNode( MEDICINA_MARCACOES ) );
creators.put( MEDICINA_MARCACOES, new WindowCreator() {
public TrackableWindow create()
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 );
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.MappableObject;
import com.evolute.utils.tracker.TrackableWindow;
import com.evolute.utils.ui.calendar.JCalendarPanel;
import com.evolute.utils.ui.panel.multipleactionlist.MultipleActionListPanel;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*;
/**
@ -24,7 +27,7 @@ import javax.swing.*;
* @author fpalma
*/
public class RegistarPresencasWindow extends JFrame
implements ActionListener
implements ActionListener, TrackableWindow
{
protected JCalendarPanel dataPanel;
protected JButton carregarButton;
@ -44,7 +47,7 @@ public class RegistarPresencasWindow extends JFrame
throws Exception
{
setupComponents();
setExtendedState( getExtendedState() | MAXIMIZED_BOTH );
}
private void setupComponents()
@ -80,6 +83,14 @@ public class RegistarPresencasWindow extends JFrame
upperPanel.add( dataPanel );
upperPanel.add( carregarButton );
setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE );
addWindowListener( new WindowAdapter(){
public void windowClosing( WindowEvent e )
{
close();
}
} );
}
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" ) } );
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