forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.6 KiB
78 lines
1.6 KiB
/*
|
|
* SIPRPTracker.java
|
|
*
|
|
* Created on 18 de Maio de 2004, 19:46
|
|
*/
|
|
|
|
package siprp;
|
|
|
|
import javax.swing.*;
|
|
import javax.swing.tree.*;
|
|
import java.util.*;
|
|
|
|
import com.evolute.utils.tracker.*;
|
|
|
|
import siprp.ficha.*;
|
|
import siprp.clientes.*;
|
|
/**
|
|
*
|
|
* @author fpalma
|
|
*/
|
|
public class SIPRPTracker extends WindowTracker
|
|
{
|
|
public static final String FICHA_APTIDAO = "Ficha de Aptid\u00e3o";
|
|
public static final String GESTAO_CLIENTES = "Gest\u00e3o de Clientes";
|
|
|
|
private final AvisosPanel avisos;
|
|
private ClientesWindow clientesWindow;
|
|
|
|
/** Creates a new instance of SIPRPTracker */
|
|
public SIPRPTracker( AvisosPanel avisosP )
|
|
{
|
|
this.avisos = avisosP;
|
|
avisos.setTracker( this );
|
|
Hashtable creators = new Hashtable();
|
|
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode( "SIPRP" );
|
|
|
|
try
|
|
{
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
}
|
|
catch( Exception ex )
|
|
{
|
|
clientesWindow = null;
|
|
ex.printStackTrace();
|
|
}
|
|
|
|
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 )
|
|
{
|
|
clientesWindow = new ClientesWindow( avisos );
|
|
}
|
|
return clientesWindow;
|
|
}
|
|
} );
|
|
|
|
setRoot( rootNode );
|
|
setCreators( creators );
|
|
}
|
|
|
|
public ClientesWindow getClientesWindow()
|
|
{
|
|
return clientesWindow;
|
|
}
|
|
}
|