forked from Coded/SIPRP
no message
git-svn-id: https://svn.coded.pt/svn/SIPRP@329 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
3aabc3e183
commit
05f0f6d030
@ -0,0 +1,118 @@
|
|||||||
|
/*
|
||||||
|
* FaxPrinter.java
|
||||||
|
*
|
||||||
|
* Created on March 1, 2007, 3:26 PM
|
||||||
|
*
|
||||||
|
* To change this template, choose Tools | Template Manager
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package siprp.medicina.locais_realizacao;
|
||||||
|
|
||||||
|
import com.evolute.utils.ui.CustomJDialog;
|
||||||
|
import info.clearthought.layout.TableLayout;
|
||||||
|
import info.clearthought.layout.TableLayoutConstraints;
|
||||||
|
import java.awt.FlowLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fpalma
|
||||||
|
*/
|
||||||
|
public class FaxPrinter extends CustomJDialog
|
||||||
|
implements ActionListener
|
||||||
|
{
|
||||||
|
private JTextField deText;
|
||||||
|
private JTextField deEmailText;
|
||||||
|
private JTextField deFaxText;
|
||||||
|
private JTextField deTelefoneText;
|
||||||
|
private JTextField assuntoText;
|
||||||
|
private JButton imprimirButton;
|
||||||
|
private JButton cancelarButton;
|
||||||
|
|
||||||
|
/** Creates a new instance of FaxPrinter */
|
||||||
|
public FaxPrinter()
|
||||||
|
{
|
||||||
|
setupComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupComponents()
|
||||||
|
{
|
||||||
|
JLabel deLabel = new JLabel( "De" );
|
||||||
|
deText = new JTextField();
|
||||||
|
JLabel deEmailLabel = new JLabel( "E-mail" );
|
||||||
|
deEmailText = new JTextField();
|
||||||
|
JLabel deFaxLabel = new JLabel( "Fax" );
|
||||||
|
deFaxText = new JTextField();
|
||||||
|
JLabel deTelefoneLabel = new JLabel( "N\u00famero de telefone" );
|
||||||
|
deTelefoneText = new JTextField();
|
||||||
|
JLabel assuntoLabel = new JLabel( "Assunto" );
|
||||||
|
assuntoText = new JTextField();
|
||||||
|
imprimirButton = new JButton( "Imprimir" );
|
||||||
|
imprimirButton.addActionListener( this );
|
||||||
|
cancelarButton = new JButton( "Cancelar" );
|
||||||
|
cancelarButton.addActionListener( this );
|
||||||
|
JPanel buttonPanel = new JPanel();
|
||||||
|
|
||||||
|
double cols[] =
|
||||||
|
new double[]{ TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.MINIMUM,
|
||||||
|
TableLayout.PREFERRED, };
|
||||||
|
double rows[] =
|
||||||
|
new double[]{ TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
|
||||||
|
TableLayout.PREFERRED, };
|
||||||
|
|
||||||
|
TableLayout tableLayout = new TableLayout( cols,rows );
|
||||||
|
setLayout( tableLayout );
|
||||||
|
|
||||||
|
add( deLabel, new TableLayoutConstraints( 0, 0 ) );
|
||||||
|
add( deText, new TableLayoutConstraints( 1, 0 ) );
|
||||||
|
add( deEmailLabel, new TableLayoutConstraints( 2, 0 ) );
|
||||||
|
add( deEmailText, new TableLayoutConstraints( 3, 0 ) );
|
||||||
|
add( deFaxLabel, new TableLayoutConstraints( 0, 1 ) );
|
||||||
|
add( deFaxText, new TableLayoutConstraints( 1, 1 ) );
|
||||||
|
add( deTelefoneLabel, new TableLayoutConstraints( 2, 1 ) );
|
||||||
|
add( deTelefoneText, new TableLayoutConstraints( 3, 1 ) );
|
||||||
|
add( assuntoLabel, new TableLayoutConstraints( 0, 2 ) );
|
||||||
|
add( assuntoText, new TableLayoutConstraints( 1, 2, 3, 2 ) );
|
||||||
|
add( buttonPanel, new TableLayoutConstraints( 0, 3, 3, 3 ) );
|
||||||
|
|
||||||
|
buttonPanel.setLayout( new FlowLayout( FlowLayout.CENTER ) );
|
||||||
|
buttonPanel.add( imprimirButton );
|
||||||
|
buttonPanel.add( cancelarButton );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void actionPerformed(ActionEvent e)
|
||||||
|
{
|
||||||
|
Object source = e.getSource();
|
||||||
|
if( source.equals( imprimirButton ) )
|
||||||
|
{
|
||||||
|
print();
|
||||||
|
}
|
||||||
|
else if( source.equals( cancelarButton ) )
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close()
|
||||||
|
{
|
||||||
|
SwingUtilities.invokeLater( new Runnable(){
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
setVisible( false );
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void print()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,295 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
|
||||||
|
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
|
||||||
|
<xsl:template match="fax">
|
||||||
|
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||||
|
<fo:layout-master-set>
|
||||||
|
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm"
|
||||||
|
margin-top="1.5cm" margin-bottom="1.5cm" margin-left="2cm" margin-right="2cm">
|
||||||
|
<fo:region-body margin-top="60pt" margin-bottom="20pt"/>
|
||||||
|
</fo:simple-page-master>
|
||||||
|
</fo:layout-master-set>
|
||||||
|
<fo:page-sequence master-reference="simpleA4">
|
||||||
|
<fo:flow flow-name="xsl-region-body">
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Nº de Páginas (incluíndo esta)</fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Number of pages: </fo:inline>
|
||||||
|
<fo:inline font-weight="bold">
|
||||||
|
<fo:page-number-citation ref-id="endofdoc"/>
|
||||||
|
</fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
<fo:table table-layout="fixed" width="100%">
|
||||||
|
<fo:table-column column-width="100pt"/>
|
||||||
|
<fo:table-column column-width="120pt"/>
|
||||||
|
<fo:table-column column-width="120pt"/>
|
||||||
|
<fo:table-column/>
|
||||||
|
<fo:table-body>
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Data </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Date: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
24-01-2007
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Para </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">To: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell number-columns-spanned="3">
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Anabela Sousa
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Empresa </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Company: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell number-columns-spanned="3">
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Laboratório Dr. David Santos Pinto
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Nº Fax </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Fax number: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell number-columns-spanned="3">
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
217 216 063
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">De </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">From: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Paula Dias
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||||
|
E-mail:
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
pdias@siprp.pt
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Nº Fax </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Fax number: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
(+351) 21 350 45 49
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Nº Tel. </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Phone number: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
(+351) 21 350 45 40
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" number-columns-spanned="4">
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
<fo:inline font-weight="bold">Assunto </fo:inline>
|
||||||
|
/ <fo:inline font-size="8pt">Subject: </fo:inline>
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell number-columns-spanned="3">
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Marcação de Colheitas para Análise
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
</fo:table-body>
|
||||||
|
</fo:table>
|
||||||
|
<fo:table table-layout="fixed" width="100%" space-before="20pt">
|
||||||
|
<fo:table-column column-width="60pt"/>
|
||||||
|
<fo:table-column column-width="200pt"/>
|
||||||
|
<fo:table-column column-width="60pt"/>
|
||||||
|
<fo:table-column/>
|
||||||
|
<fo:table-body>
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||||
|
Cliente:
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Evolute
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||||
|
Local:
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Laboratório Dr. David Santos Pinto
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||||
|
Data:
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
25-01-2007
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||||
|
Hora:
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
08H00
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
</fo:table-body>
|
||||||
|
</fo:table>
|
||||||
|
|
||||||
|
<fo:block font-size="10pt" text-align="left" space-before="20pt">
|
||||||
|
Exmos. Senhores,
|
||||||
|
</fo:block>
|
||||||
|
<fo:block font-size="10pt" text-align="left">
|
||||||
|
Informo que o seguinte colaborador irá comparecer nas vossas instalações para colheita:
|
||||||
|
</fo:block>
|
||||||
|
|
||||||
|
<fo:table space-before="10pt">
|
||||||
|
<fo:table-column column-width="200pt"/>
|
||||||
|
<fo:table-column />
|
||||||
|
<fo:table-column />
|
||||||
|
<fo:table-body>
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="10pt" font-weight="bold" text-align="center" space-before="2pt">
|
||||||
|
NOME DO FUNCIONÁRIO
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="10pt" font-weight="bold" space-before="2pt">
|
||||||
|
DATA_NASCIMENTO
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="10pt" font-weight="bold" text-align="center" space-before="2pt">
|
||||||
|
PERFIL
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="10pt" text-align="left" space-before="2pt">
|
||||||
|
FREDERICO ALEXANDRE DE MATOS MONGE PALMA
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="10pt" text-align="center" space-before="2pt">
|
||||||
|
02-10-1976
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="10pt" text-align="right" space-before="2pt">
|
||||||
|
1
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
</fo:table-body>
|
||||||
|
</fo:table>
|
||||||
|
<fo:block font-size="10pt" text-align="justify" space-before="10pt">
|
||||||
|
<fo:inline font-weight="bold" text-decoration="underline">PERFIL 1</fo:inline>:
|
||||||
|
Hemograma, Vel. Sedimentação, Glicemia em Jejum, Creatinina, Colesterol Total,
|
||||||
|
Colesterol HDL, Triglicéridos, Transaminases, Gama GT e Urina II.
|
||||||
|
</fo:block>
|
||||||
|
<fo:block font-size="10pt" text-align="justify" space-before="10pt">
|
||||||
|
<fo:inline font-weight="bold" text-decoration="underline">PERFIL 2</fo:inline>:
|
||||||
|
Hemograma, Vel. Sedimentação, Glicemia em Jejum, Creatinina, Colesterol Total,
|
||||||
|
Colesterol HDL, Triglicéridos, Transaminases, Gama GT e Urina II.
|
||||||
|
</fo:block>
|
||||||
|
|
||||||
|
<fo:table space-before="20pt">
|
||||||
|
<fo:table-column />
|
||||||
|
<fo:table-body>
|
||||||
|
<fo:table-row>
|
||||||
|
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||||
|
<fo:block font-size="12pt" text-align="LEFT" space-before="2pt">
|
||||||
|
AGRADEÇO QUE ESTA LISTAGEM NOS SEJA REENVIADA COM INDICAÇÃO DAS
|
||||||
|
EVENTUAIS FALTAS OCORRIDAS
|
||||||
|
</fo:block>
|
||||||
|
</fo:table-cell>
|
||||||
|
</fo:table-row>
|
||||||
|
</fo:table-body>
|
||||||
|
</fo:table>
|
||||||
|
|
||||||
|
<fo:block font-size="10pt" text-align="left" space-before="10pt">
|
||||||
|
Sem outro assunto de momento, aproveitamos para apresentar os nossos melhores cumprimentos,
|
||||||
|
</fo:block>
|
||||||
|
|
||||||
|
<fo:block font-size="10pt" text-align="left" space-before="30pt">
|
||||||
|
Paula Dias
|
||||||
|
</fo:block>
|
||||||
|
<fo:block id="endofdoc"></fo:block>
|
||||||
|
</fo:flow>
|
||||||
|
</fo:page-sequence>
|
||||||
|
</fo:root>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Document : fax_ecds_teste.xml
|
||||||
|
Created on : March 1, 2007, 4:28 PM
|
||||||
|
Author : fpalma
|
||||||
|
Description:
|
||||||
|
Purpose of the document follows.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<fax>
|
||||||
|
|
||||||
|
</fax>
|
||||||
Loading…
Reference in new issue