diff --git a/trunk/.classpath b/trunk/.classpath
index 77a3b804..07ffbb30 100644
--- a/trunk/.classpath
+++ b/trunk/.classpath
@@ -28,12 +28,10 @@
-
-
@@ -42,5 +40,7 @@
+
+
diff --git a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java
index 3a3c69b3..06c93120 100644
--- a/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java
+++ b/trunk/SIPRPSoft/src/siprp/companydataloaders/SIPRPDataLoader.java
@@ -93,20 +93,20 @@ public class SIPRPDataLoader implements CompanyDataLoader
// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local_3" );
// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
//
- Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
- Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
- Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
- Singleton.setInstance( SingletonConstants.LOCAL_URL, "10.158.2.2:5432" );
- Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" );
- Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
-
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
// Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
-// Singleton.setInstance( SingletonConstants.LOCAL_URL, "dbserver:5432" );
-// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local3" );
+// Singleton.setInstance( SingletonConstants.LOCAL_URL, "10.158.2.2:5432" );
+// Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local" );
// Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
+ Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
+ Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
+ Singleton.setInstance( SingletonConstants.LOCAL_URL_PREFIX, "jdbc:postgresql://" );
+ Singleton.setInstance( SingletonConstants.LOCAL_URL, "dbserver:5432" );
+ Singleton.setInstance( SingletonConstants.LOCAL_DB_NAME, "siprp_local3" );
+ Singleton.setInstance( SingletonConstants.LOCAL_DRIVER_NAME, "org.postgresql.Driver" );
+
//
// Singleton.setInstance( SingletonConstants.LOCAL_USER, "postgres" );
// Singleton.setInstance( SingletonConstants.LOCAL_PASSWORD, "Typein" );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/AdicionarPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/AdicionarPanel.java
index 2a8c7900..e34e208c 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/AdicionarPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/AdicionarPanel.java
@@ -18,6 +18,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
public abstract class AdicionarPanel extends JPanel
{
@@ -38,7 +39,7 @@ public abstract class AdicionarPanel extends JPanel
protected final DefaultTreeModel model = new DefaultTreeModel( root );
- protected final JTree tree = new JTree( model );
+ protected final LeafTree tree = new LeafTree( model );
protected final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java
index 7822f64d..ae667cb3 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/AdicionarEquipamentosPanel.java
@@ -22,6 +22,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.TreeInserterDialog;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsEquipamento;
@@ -49,7 +50,7 @@ public class AdicionarEquipamentosPanel extends JPanel
private final DefaultTreeModel model = new DefaultTreeModel( root );
- public final JTree tree = new JTree( model );
+ public final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java
index e2b65f3d..fb7c6ee8 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/equipamentos/GerirEquipamentosPanel.java
@@ -29,6 +29,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.LeafUIConstants;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsEquipamento;
@@ -63,7 +64,7 @@ public class GerirEquipamentosPanel extends JPanel implements CaretListener, Lea
private final DefaultTreeModel model = new DefaultTreeModel( root );
- private final JTree tree = new JTree( model );
+ private final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java
index 97297151..0e966ccc 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/legislacao/GerirLegislacaoPanel.java
@@ -31,6 +31,7 @@ import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
import leaf.ui.LeafTextAreaEditor;
+import leaf.ui.LeafTree;
import leaf.ui.LeafUIConstants;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsLegislacao;
@@ -70,7 +71,7 @@ public class GerirLegislacaoPanel extends JPanel implements LeafUIConstants
private final DefaultTreeModel modelGeral = new DefaultTreeModel( rootGeral );
- private final JTree treeGeral = new JTree( modelGeral );
+ private final LeafTree treeGeral = new LeafTree( modelGeral );
private final JScrollPane scrollGeral = new JScrollPane( treeGeral );
@@ -78,7 +79,7 @@ public class GerirLegislacaoPanel extends JPanel implements LeafUIConstants
private final DefaultTreeModel modelCategorias = new DefaultTreeModel( rootCategorias );
- private final JTree treeCategorias = new JTree( modelCategorias );
+ private final LeafTree treeCategorias = new LeafTree( modelCategorias );
private final JScrollPane scrollCategorias = new JScrollPane( treeCategorias );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java
index c6d60e16..6f2217e4 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/normalizacao/GerirNormalizacaoPanel.java
@@ -37,6 +37,7 @@ import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
import leaf.ui.LeafTextAreaEditor;
+import leaf.ui.LeafTree;
import leaf.ui.LeafUIConstants;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsNormalizacao;
@@ -75,7 +76,7 @@ public class GerirNormalizacaoPanel extends JPanel implements LeafUIConstants, C
private final DefaultTreeModel modelPortuguesa = new DefaultTreeModel( rootPortuguesa );
- private final JTree treePortuguesa = new JTree( modelPortuguesa );
+ private final LeafTree treePortuguesa = new LeafTree( modelPortuguesa );
private final JScrollPane scrollPortuguesa = new JScrollPane( treePortuguesa );
@@ -83,7 +84,7 @@ public class GerirNormalizacaoPanel extends JPanel implements LeafUIConstants, C
private final DefaultTreeModel modelInternacional = new DefaultTreeModel( rootInternacional );
- private final JTree treeInternacional = new JTree( modelInternacional );
+ private final LeafTree treeInternacional = new LeafTree( modelInternacional );
private final JScrollPane scrollInternacional = new JScrollPane( treeInternacional );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java
index 02f3fd27..a02804ec 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/AdicionarAreasPanel.java
@@ -20,6 +20,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.TreeInserterDialog;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.Estabelecimentos;
@@ -48,7 +49,7 @@ public class AdicionarAreasPanel extends JPanel
private final DefaultTreeModel model = new DefaultTreeModel( root );
- public final JTree tree = new JTree( model );
+ public final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java
index 73ae3edc..fd3189bb 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/postos/GerirAreasPanel.java
@@ -34,6 +34,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.LeafUIConstants;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.Empresas;
@@ -69,7 +70,7 @@ public class GerirAreasPanel extends JPanel implements LeafUIConstants
private final DefaultTreeModel model = new DefaultTreeModel( root );
- public final JTree tree = new JTree( model );
+ public final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java
index ce094682..901616e3 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/AdicionarRiscosPanel.java
@@ -21,6 +21,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.TreeInserterDialog;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.BaseObject;
@@ -51,7 +52,7 @@ public class AdicionarRiscosPanel extends JPanel
private final DefaultTreeModel model = new DefaultTreeModel( root );
- public final JTree tree = new JTree( model );
+ public final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java
index 79e22361..322aefeb 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/gestao/riscos/GerirRiscosPanel.java
@@ -28,6 +28,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.LeafUIConstants;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsMedida;
@@ -79,7 +80,7 @@ public class GerirRiscosPanel extends JPanel implements LeafUIConstants
private final DefaultTreeModel model = new DefaultTreeModel( root );
- private final JTree tree = new JTree( model );
+ private final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java
index 1d3d6b85..d3e8c610 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/GerirMedidasRelatorioPanel.java
@@ -30,6 +30,7 @@ import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafDialog;
import leaf.ui.LeafIconButton;
+import leaf.ui.LeafTree;
import leaf.ui.TreeInserterDialog;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.BaseObject;
@@ -67,7 +68,7 @@ public class GerirMedidasRelatorioPanel extends JPanel
private final DefaultTreeModel model = new DefaultTreeModel( root );
- public final JTree tree = new JTree( model );
+ public final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java
index 42a0fa61..eefdd45b 100644
--- a/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java
+++ b/trunk/SIPRPSoft/src/siprp/higiene/relatorio/VerAreasRelatorioPanel.java
@@ -17,6 +17,7 @@ import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
+import leaf.ui.LeafTree;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsRelatorio;
import siprp.database.cayenne.objects.HsRelatorioPosto;
@@ -35,7 +36,7 @@ public class VerAreasRelatorioPanel extends JPanel
private final DefaultTreeModel model = new DefaultTreeModel( root );
- public final JTree tree = new JTree( model );
+ public final LeafTree tree = new LeafTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
diff --git a/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/MarcacoesDataProvider.java b/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/MarcacoesDataProvider.java
index a564c3ea..bda51f2f 100755
--- a/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/MarcacoesDataProvider.java
+++ b/trunk/SIPRPSoft/src/siprp/lembretes/marcacoes/MarcacoesDataProvider.java
@@ -130,17 +130,20 @@ public class MarcacoesDataProvider
//
String trabalhador = ( String ) array.get( n, 4 );
String split[] = trabalhador.split( " " );
- trabalhador = split[ 0 ] + " " + ( split.length > 2 ? split[ 1 ].charAt( 0 ) + ". " : " " ) +
- ( split.length > 1 ? split[ split.length - 1 ] : "" );
- String estabelecimento = ( String ) array.get( n, 5 );
- String empresa = ( String ) array.get( n, 6 );
- String str = "
" + trabalhador + ""
- + "
" + "Ficha de aptid" + atilde + "o caduca a " + D_F.format( c.getTime() )
- + "
" + descricao + ""
- + "
" + empresa.substring( 0, empresa.length() > 20 ? 20 : empresa.length() )
- + " / " + estabelecimento.substring( 0, estabelecimento.length() > 10 ? 10 : estabelecimento.length() )
- + "";
- lembretes[ n ] = new MappableObject( id, str );
+ if( split != null && split.length > 1 && split[0] != null && split[0].length() > 0 && split[1] != null && split[1].length() > 0 )
+ {
+ trabalhador = split[ 0 ] + " " + ( split.length > 2 ? split[ 1 ].charAt( 0 ) + ". " : " " ) +
+ ( split.length > 1 ? split[ split.length - 1 ] : "" );
+ String estabelecimento = ( String ) array.get( n, 5 );
+ String empresa = ( String ) array.get( n, 6 );
+ String str = "" + trabalhador + ""
+ + "
" + "Ficha de aptid" + atilde + "o caduca a " + D_F.format( c.getTime() )
+ + "
" + descricao + ""
+ + "
" + empresa.substring( 0, empresa.length() > 20 ? 20 : empresa.length() )
+ + " / " + estabelecimento.substring( 0, estabelecimento.length() > 10 ? 10 : estabelecimento.length() )
+ + "";
+ lembretes[ n ] = new MappableObject( id, str );
+ }
}
return lembretes;
}
diff --git a/trunk/common/lib/ashwood-1.1.jar b/trunk/common/lib/ashwood-1.1.jar
deleted file mode 100644
index 4c27b9a5..00000000
Binary files a/trunk/common/lib/ashwood-1.1.jar and /dev/null differ
diff --git a/trunk/common/lib/ashwood-2.0.jar b/trunk/common/lib/ashwood-2.0.jar
new file mode 100644
index 00000000..55fcc9b1
Binary files /dev/null and b/trunk/common/lib/ashwood-2.0.jar differ
diff --git a/trunk/common/lib/cayenne-server-3.0M2.jar b/trunk/common/lib/cayenne-server-3.0M2.jar
deleted file mode 100644
index 36e197fe..00000000
Binary files a/trunk/common/lib/cayenne-server-3.0M2.jar and /dev/null differ
diff --git a/trunk/common/lib/cayenne-server-3.0M6.jar b/trunk/common/lib/cayenne-server-3.0M6.jar
new file mode 100644
index 00000000..fdf0d056
Binary files /dev/null and b/trunk/common/lib/cayenne-server-3.0M6.jar differ
diff --git a/trunk/common/src/leaf/ui/LeafTree.java b/trunk/common/src/leaf/ui/LeafTree.java
index 63ad32db..ff53dfad 100644
--- a/trunk/common/src/leaf/ui/LeafTree.java
+++ b/trunk/common/src/leaf/ui/LeafTree.java
@@ -2,10 +2,11 @@ package leaf.ui;
import java.util.Enumeration;
import java.util.LinkedList;
+import java.util.List;
import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeModel;
-import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
public class LeafTree extends JTree
@@ -13,7 +14,7 @@ public class LeafTree extends JTree
private static final long serialVersionUID = 1L;
-
+ private final List