|
|
|
@ -32,11 +32,13 @@ import org.apache.cayenne.map.DataMap;
|
|
|
|
import siprp.clientes.AvisosPanel;
|
|
|
|
import siprp.clientes.AvisosPanel;
|
|
|
|
import siprp.companydataloaders.SIPRPDataLoader;
|
|
|
|
import siprp.companydataloaders.SIPRPDataLoader;
|
|
|
|
import siprp.companydataloaders.SIPRPPropertiesLoader;
|
|
|
|
import siprp.companydataloaders.SIPRPPropertiesLoader;
|
|
|
|
|
|
|
|
import siprp.initializer.SIPRPUIInitializer;
|
|
|
|
import siprp.lembretes.LembretesDemon;
|
|
|
|
import siprp.lembretes.LembretesDemon;
|
|
|
|
import siprp.ui.SIPRPIcon;
|
|
|
|
import siprp.ui.SIPRPIcon;
|
|
|
|
import siprp.update.UpdateList;
|
|
|
|
import siprp.update.UpdateList;
|
|
|
|
|
|
|
|
|
|
|
|
import com.evolute.module.updater.Updater;
|
|
|
|
import com.evolute.module.updater.Updater;
|
|
|
|
|
|
|
|
import com.evolute.project.ProjectTools;
|
|
|
|
import com.evolute.utils.Singleton;
|
|
|
|
import com.evolute.utils.Singleton;
|
|
|
|
import com.evolute.utils.db.DBException;
|
|
|
|
import com.evolute.utils.db.DBException;
|
|
|
|
import com.evolute.utils.db.DBManager;
|
|
|
|
import com.evolute.utils.db.DBManager;
|
|
|
|
@ -46,14 +48,12 @@ import com.evolute.utils.error.ErrorLogger;
|
|
|
|
import com.evolute.utils.jdbc.DBStatementExecuter;
|
|
|
|
import com.evolute.utils.jdbc.DBStatementExecuter;
|
|
|
|
import com.evolute.utils.jdbc.StatementExecuterFactory;
|
|
|
|
import com.evolute.utils.jdbc.StatementExecuterFactory;
|
|
|
|
import com.evolute.utils.sql.Insert;
|
|
|
|
import com.evolute.utils.sql.Insert;
|
|
|
|
import com.evolute.utils.sql.SQLQuery;
|
|
|
|
|
|
|
|
import com.evolute.utils.strings.UnicodeChecker;
|
|
|
|
import com.evolute.utils.strings.UnicodeChecker;
|
|
|
|
import com.evolute.utils.ui.DialogException;
|
|
|
|
import com.evolute.utils.ui.DialogException;
|
|
|
|
import com.evolute.utils.ui.window.LoginWindow;
|
|
|
|
import com.evolute.utils.ui.window.LoginWindow;
|
|
|
|
|
|
|
|
|
|
|
|
public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public final static String SHST_VERSION = "11.10.0";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static String dbase;
|
|
|
|
private static String dbase;
|
|
|
|
private SIPRPTracker siprpTracker;
|
|
|
|
private SIPRPTracker siprpTracker;
|
|
|
|
@ -70,8 +70,7 @@ public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
ESTADO_PROCESSO_BY_CODE.put( PROCESSO_CANCELADO_CODE, PROCESSO_CANCELADO_DESCRIPTION );
|
|
|
|
ESTADO_PROCESSO_BY_CODE.put( PROCESSO_CANCELADO_CODE, PROCESSO_CANCELADO_DESCRIPTION );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void main( String args[] )
|
|
|
|
public static void main( String args[] ) throws Exception
|
|
|
|
throws Exception
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
UIManager.put( "TextField.inactiveForeground", ColorUIResource.BLACK );
|
|
|
|
UIManager.put( "TextField.inactiveForeground", ColorUIResource.BLACK );
|
|
|
|
UIManager.put( "TextField.foreground", ColorUIResource.RED.darker() );
|
|
|
|
UIManager.put( "TextField.foreground", ColorUIResource.RED.darker() );
|
|
|
|
@ -85,6 +84,8 @@ public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
UIManager.put( "FormattedTextField.inactiveForeground", ColorUIResource.BLACK );
|
|
|
|
UIManager.put( "FormattedTextField.inactiveForeground", ColorUIResource.BLACK );
|
|
|
|
UIManager.put( "FormattedTextField.foreground", ColorUIResource.RED.darker() );
|
|
|
|
UIManager.put( "FormattedTextField.foreground", ColorUIResource.RED.darker() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new SIPRPUIInitializer().doInit();
|
|
|
|
|
|
|
|
|
|
|
|
SIPRPPropertiesLoader.getInstance().load();
|
|
|
|
SIPRPPropertiesLoader.getInstance().load();
|
|
|
|
|
|
|
|
|
|
|
|
// Singleton.setInstance( SingletonConstants.COMPANY_NAME, "Centro Cl\u00ednico Avenida" );
|
|
|
|
// Singleton.setInstance( SingletonConstants.COMPANY_NAME, "Centro Cl\u00ednico Avenida" );
|
|
|
|
@ -111,7 +112,7 @@ public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
*/ Insert.setDefaultKeyRetriever( JDBCAutoKeyRetriever.DEFAULT );
|
|
|
|
*/ Insert.setDefaultKeyRetriever( JDBCAutoKeyRetriever.DEFAULT );
|
|
|
|
String server = System.getProperty( "server.address" );
|
|
|
|
// String server = System.getProperty( "server.address" );
|
|
|
|
// if( server == null )
|
|
|
|
// if( server == null )
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
// server = "ws_fpalma";
|
|
|
|
// server = "ws_fpalma";
|
|
|
|
@ -138,17 +139,20 @@ public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
String logoFileName = ( String ) Singleton.getInstance( SingletonConstants.COMPANY_LOGO );
|
|
|
|
String logoFileName = ( String ) Singleton.getInstance( SingletonConstants.COMPANY_LOGO );
|
|
|
|
loginWindow = new LoginWindow( new Main(), /*"logo"+File.separator +*/ logoFileName,//"logo"+File.separator + "logo_w400.jpg",
|
|
|
|
loginWindow = new LoginWindow( new Main(), /*"logo"+File.separator +*/ logoFileName,//"logo"+File.separator + "logo_w400.jpg",
|
|
|
|
new String[] { (String) Singleton.getInstance( SingletonConstants.SOFTWARE_NAME ) },
|
|
|
|
new String[] { (String) Singleton.getInstance( SingletonConstants.SOFTWARE_NAME ) },
|
|
|
|
new String[] { "Vers\u00E3o " + SHST_VERSION, "(EVOLUTE 2004-2009)" }, "",
|
|
|
|
new String[] { "Vers\u00E3o " + ProjectTools.getInstance().getVersion(), "(EVOLUTE 2004-2010)" }, "",
|
|
|
|
(String)Singleton.getInstance( SingletonConstants.LOCAL_USER ),
|
|
|
|
(String)Singleton.getInstance( SingletonConstants.LOCAL_USER ),
|
|
|
|
(String)Singleton.getInstance( SingletonConstants.LOCAL_PASSWORD ), avisos, false );
|
|
|
|
(String)Singleton.getInstance( SingletonConstants.LOCAL_PASSWORD ), avisos, false );
|
|
|
|
loginWindow.setTitle( (String) Singleton.getInstance( SingletonConstants.SOFTWARE_NAME ) );
|
|
|
|
loginWindow.setTitle( (String) Singleton.getInstance( SingletonConstants.SOFTWARE_NAME ) );
|
|
|
|
loginWindow.setIconImage( SIPRPIcon.LOGO.getImage() );
|
|
|
|
loginWindow.setIconImage( SIPRPIcon.LOGO.getImage() );
|
|
|
|
|
|
|
|
loginWindow.getButtOK().setEnabled( false );
|
|
|
|
JPanel left = loginWindow.getLeftPanel();
|
|
|
|
JPanel left = loginWindow.getLeftPanel();
|
|
|
|
left.setBackground( Color.white );
|
|
|
|
left.setBackground( Color.white );
|
|
|
|
// GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
|
|
|
// GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
|
|
|
|
|
|
|
loginWindow.setSize( 1024, 510 );
|
|
|
|
loginWindow.setExtendedState(loginWindow.getExtendedState() | LoginWindow.MAXIMIZED_BOTH);
|
|
|
|
loginWindow.setExtendedState(loginWindow.getExtendedState() | LoginWindow.MAXIMIZED_BOTH);
|
|
|
|
loginWindow.setVisible( true );
|
|
|
|
loginWindow.setVisible( true );
|
|
|
|
SwingUtilities.invokeLater( new Runnable(){
|
|
|
|
SwingUtilities.invokeLater( new Runnable()
|
|
|
|
|
|
|
|
{
|
|
|
|
public void run()
|
|
|
|
public void run()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
loginWindow.expandAll();
|
|
|
|
loginWindow.expandAll();
|
|
|
|
@ -188,7 +192,7 @@ public class Main implements com.evolute.utils.ui.window.Connector
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// run initialization SQL
|
|
|
|
// run initialization SQL
|
|
|
|
SQLQuery initQuery[] = new SQLQuery[] {};
|
|
|
|
// SQLQuery initQuery[] = new SQLQuery[] {};
|
|
|
|
// String server = System.getProperty( "server.address" );
|
|
|
|
// String server = System.getProperty( "server.address" );
|
|
|
|
String server = null;
|
|
|
|
String server = null;
|
|
|
|
if( server == null )
|
|
|
|
if( server == null )
|
|
|
|
|