diff --git a/trunk/siprp/importer/Importer.java b/trunk/siprp/importer/Importer.java index 482c2d76..2847e67f 100644 --- a/trunk/siprp/importer/Importer.java +++ b/trunk/siprp/importer/Importer.java @@ -25,6 +25,17 @@ import jxl.*; */ public class Importer extends CustomJDialog { + public String NOME = "Nome do Funcion\u00e1rio"; + public String SEXO = "Sexo"; + public String NACIONALIDADE = "Nacionalidade"; + public String DATA_NASCIMENTO = "Data Nascimento"; + public String NUMERO_MECANOGRAFICO = "N\u00famero Mecanogr\u00e1fico"; + public String DATA_ADMISSAO = "Data Admiss\u00e3o"; + public String CATEGORIA = "Categoria"; + public String LOCAL_TRABALHO = "Local Trabalho"; + public String FUNCAO = "Fun\u00e7\u00e3o"; + public String DATA_ADMISSAO_FUNCAO = "Data Admiss\u00e3o na Fun\u00e7\u00e3o"; + private JPanel panel; private BaseTable table; private Excel2DArray e2da; @@ -32,6 +43,18 @@ public class Importer extends CustomJDialog private DataChooserWindow dcw; private String vals[]; + private final String names[] = new String[]{ + NOME, + SEXO, + NACIONALIDADE, + DATA_NASCIMENTO, + NUMERO_MECANOGRAFICO, + DATA_ADMISSAO, + CATEGORIA, + LOCAL_TRABALHO, + FUNCAO, + DATA_ADMISSAO_FUNCAO + }; /** Creates a new instance of Importer */ public Importer( JFrame modalFrame, String filename ) throws Exception @@ -94,7 +117,7 @@ public class Importer extends CustomJDialog gbcConstraints.gridx = 0; gbcConstraints.gridy = 3; gblGridBag.setConstraints( sp, gbcConstraints ); - + panel.add( sp ); JPanel jpButtons = new JPanel(); @@ -104,7 +127,6 @@ public class Importer extends CustomJDialog JButton jbCancel = new JButton( "Cancelar" ); jpButtons.add( jbCancel ); - gbcConstraints.gridheight = 1; gbcConstraints.weightx = 1; gbcConstraints.weighty = 0; @@ -151,7 +173,10 @@ public class Importer extends CustomJDialog private void acceptResult() { - vals = e2da.getRow( table.getSelectedRow() ); + Vector v = new Vector( Arrays.asList( e2da.getRow( table.getSelectedRow() ) ) ); + v.add( "" ); + vals = + /* System.out.println( "row: " + table.getSelectedRow() ); System.out.print( "vals: " ); @@ -168,15 +193,6 @@ public class Importer extends CustomJDialog public Hashtable getData() { - String names[] = new String[]{ "Nome do Funcion\u00e1rio", - "Data Nascimento", - "Sexo", - "Nacionalidade", - "Data Admiss\u00e3o", - "Categoria", - "Fun\u00e7\u00e3o", - "Local Trabalho" - }; dcw = new DataChooserWindow( null, names, vals ); if( canceled || ( dcw == null ) )