|
|
|
|
@ -10,8 +10,10 @@ 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.*;
|
|
|
|
|
@ -36,40 +38,61 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
|
this.avisos = avisosP;
|
|
|
|
|
avisos.setTracker( this );
|
|
|
|
|
Hashtable creators = new Hashtable();
|
|
|
|
|
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode( "SIPRP" );
|
|
|
|
|
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(
|
|
|
|
|
Singleton.getInstance( SingletonConstants.COMPANY_ACRONYM ) );
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
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 )
|
|
|
|
|
{
|
|
|
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
|
|
|
}
|
|
|
|
|
catch( Exception ex )
|
|
|
|
|
{
|
|
|
|
|
clientesWindow = null;
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch( Exception ex )
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
clientesWindow = null;
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( FICHA_APTIDAO ) );
|
|
|
|
|
creators.put( FICHA_APTIDAO, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
return new FichaWindow();
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
if( hasFicha )
|
|
|
|
|
{
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( FICHA_APTIDAO ) );
|
|
|
|
|
creators.put( FICHA_APTIDAO, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
return new FichaWindow();
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( GESTAO_CLIENTES ) );
|
|
|
|
|
creators.put( GESTAO_CLIENTES, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
if( clientesWindow == null )
|
|
|
|
|
if( hasGestao )
|
|
|
|
|
{
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( GESTAO_CLIENTES ) );
|
|
|
|
|
creators.put( GESTAO_CLIENTES, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
|
|
|
if( clientesWindow == null )
|
|
|
|
|
{
|
|
|
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
|
|
|
}
|
|
|
|
|
return clientesWindow;
|
|
|
|
|
}
|
|
|
|
|
return clientesWindow;
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( hasRelatorio )
|
|
|
|
|
{
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( RELATORIO_ANUAL ) );
|
|
|
|
|
creators.put( RELATORIO_ANUAL, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
@ -78,15 +101,19 @@ public class SIPRPTracker extends WindowTracker
|
|
|
|
|
return new PesquisasWindow();
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( LISTAGENS ) );
|
|
|
|
|
creators.put( LISTAGENS, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
return new EstatisticaWindow();
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
if( hasListagens )
|
|
|
|
|
{
|
|
|
|
|
rootNode.add( new DefaultMutableTreeNode( LISTAGENS ) );
|
|
|
|
|
creators.put( LISTAGENS, new WindowCreator() {
|
|
|
|
|
public TrackableWindow create()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
return new EstatisticaWindow();
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
setRoot( rootNode );
|
|
|
|
|
setCreators( creators );
|
|
|
|
|
}
|
|
|
|
|
|