|
|
|
@ -10,8 +10,10 @@ 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.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.*;
|
|
|
|
@ -36,8 +38,16 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
this.avisos = avisosP;
|
|
|
|
this.avisos = avisosP;
|
|
|
|
avisos.setTracker( this );
|
|
|
|
avisos.setTracker( this );
|
|
|
|
Hashtable creators = new Hashtable();
|
|
|
|
Hashtable creators = new Hashtable();
|
|
|
|
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode( "SIPRP" );
|
|
|
|
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(
|
|
|
|
|
|
|
|
Singleton.getInstance( SingletonConstants.COMPANY_ACRONYM ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean hasFicha = ( (Boolean)Singleton.getInstance( SingletonConstants.MODULE_FICHA ) ).booleanValue();
|
|
|
|
|
|
|
|
boolean hasGestao = ( (Boolean)Singleton.getInstance( SingletonConstants.MODULE_CLIENTES ) ).booleanValue();
|
|
|
|
|
|
|
|
boolean hasRelatorio = ( (Boolean)Singleton.getInstance( SingletonConstants.MODULE_RELATORIO ) ).booleanValue();
|
|
|
|
|
|
|
|
boolean hasListagens = ( (Boolean)Singleton.getInstance( SingletonConstants.MODULE_LISTAGENS ) ).booleanValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( hasGestao )
|
|
|
|
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
|
|
@ -47,7 +57,14 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
clientesWindow = null;
|
|
|
|
clientesWindow = null;
|
|
|
|
ex.printStackTrace();
|
|
|
|
ex.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
clientesWindow = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( hasFicha )
|
|
|
|
|
|
|
|
{
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( FICHA_APTIDAO ) );
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( FICHA_APTIDAO ) );
|
|
|
|
creators.put( FICHA_APTIDAO, new WindowCreator() {
|
|
|
|
creators.put( FICHA_APTIDAO, new WindowCreator() {
|
|
|
|
public TrackableWindow create()
|
|
|
|
public TrackableWindow create()
|
|
|
|
@ -56,7 +73,10 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
return new FichaWindow();
|
|
|
|
return new FichaWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( hasGestao )
|
|
|
|
|
|
|
|
{
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( GESTAO_CLIENTES ) );
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( GESTAO_CLIENTES ) );
|
|
|
|
creators.put( GESTAO_CLIENTES, new WindowCreator() {
|
|
|
|
creators.put( GESTAO_CLIENTES, new WindowCreator() {
|
|
|
|
public TrackableWindow create()
|
|
|
|
public TrackableWindow create()
|
|
|
|
@ -69,7 +89,10 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
return clientesWindow;
|
|
|
|
return clientesWindow;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( hasRelatorio )
|
|
|
|
|
|
|
|
{
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( RELATORIO_ANUAL ) );
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( RELATORIO_ANUAL ) );
|
|
|
|
creators.put( RELATORIO_ANUAL, new WindowCreator() {
|
|
|
|
creators.put( RELATORIO_ANUAL, new WindowCreator() {
|
|
|
|
public TrackableWindow create()
|
|
|
|
public TrackableWindow create()
|
|
|
|
@ -78,7 +101,10 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
return new PesquisasWindow();
|
|
|
|
return new PesquisasWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( hasListagens )
|
|
|
|
|
|
|
|
{
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( LISTAGENS ) );
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( LISTAGENS ) );
|
|
|
|
creators.put( LISTAGENS, new WindowCreator() {
|
|
|
|
creators.put( LISTAGENS, new WindowCreator() {
|
|
|
|
public TrackableWindow create()
|
|
|
|
public TrackableWindow create()
|
|
|
|
@ -87,6 +113,7 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
return new EstatisticaWindow();
|
|
|
|
return new EstatisticaWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
}
|
|
|
|
setRoot( rootNode );
|
|
|
|
setRoot( rootNode );
|
|
|
|
setCreators( creators );
|
|
|
|
setCreators( creators );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|