Package realcix20.utils

Examples of realcix20.utils.Resources


        try {

            ResultSetMetaData rsmd = rs.getMetaData();
            if (rsmd.getColumnCount() == 1) {
                while (rs.next()) {
                    Item item = new Item(rs.getObject(1), rs.getObject(1));
                    ((JComboBox)childComponent).addItem(item);
                }
            } else {
                while (rs.next()) {

                    StringBuffer sb = new StringBuffer();
                    for (int i = 2; i < rsmd.getColumnCount(); i++)
                        sb.append(rs.getObject(i) + " | ");
                    sb.append(rs.getObject(rsmd.getColumnCount()));

                    Item item = new Item(rs.getObject(1), sb.toString());
                    ((JComboBox)childComponent).addItem(item);
                }
            }
            rs.close();

        }
        catch (SQLException sqle) {

        }
       
        Iterator componentIter = components.iterator();
        while (componentIter.hasNext()) {
            JComponent component = (JComponent)componentIter.next();
            ((JComboBox)component).addActionListener(
                new ActionAdapter() {
           
                    public void actionPerformed(ActionEvent e) {
                       
                        ((JComboBox)childComponent).removeAllItems();
                       
                        DAO dao = DAO.getInstance();
                        dao.query(sql);
                        for (int i = 1; i <= components.size(); i++) {
                            JComponent tempComponent = (JComponent)components.get(i - 1);
                            dao.setObject(i, ComponentManager.getValue(tempComponent));
                        }
                        ResultSet rs = dao.executeQuery();
                        try {

                            ResultSetMetaData rsmd = rs.getMetaData();
                            if (rsmd.getColumnCount() == 1) {
                                while (rs.next()) {
                                    Item item = new Item(rs.getObject(1), rs.getObject(1));
                                    ((JComboBox)childComponent).addItem(item);
                                }
                            } else {
                                while (rs.next()) {
                                   
                                    StringBuffer sb = new StringBuffer();
                                    for (int i = 2; i < rsmd.getColumnCount(); i++)
                                        sb.append(rs.getObject(i) + " | ");
                                    sb.append(rs.getObject(rsmd.getColumnCount()));
                                   
                                    Item item = new Item(rs.getObject(1), sb.toString());
                                    ((JComboBox)childComponent).addItem(item);
                                }
                            }
                            rs.close();
View Full Code Here


                StringBuffer factValueBuffer = new StringBuffer();
                for (int i = 1; i< rsmd.getColumnCount(); i++) {
                    factValueBuffer.append(rs.getObject(i) + "-");
                }
                factValueBuffer.append(rs.getObject(rsmd.getColumnCount()));
                Item item = new Item(factValueBuffer.toString(), displayValue);
                ((JComboBox)component).addItem(item);
            }
           
            rs.close();
View Full Code Here

        else if (e.getActionCommand().equals("Change Language")) {
            setApplicationLang();
            updateLicenseTextPane();
            updateControlButtons();
        } else if (e.getActionCommand().equals("Accept")) {
            new FirstTimeView();
            container.dispose();
        }           
    }
View Full Code Here

        }
        //Users GUI Theme       
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {                       
                if (GlobalValueManager.getValue("firsttime").equals("TRUE")) {                   
                    new LicenseView();
                } else {
                    Resources.LANGUAGE = GlobalValueManager.getApplicationLang();
                    new LoginFrame();
                }
            }
View Full Code Here

            public void run() {                       
                if (GlobalValueManager.getValue("firsttime").equals("TRUE")) {                   
                    new LicenseView();
                } else {
                    Resources.LANGUAGE = GlobalValueManager.getApplicationLang();
                    new LoginFrame();
                }
            }
        });      
    }   
View Full Code Here

                                        newRow.getRowSet().getRows().add(childRow);
                                        listener.getContainer().getCurrentObject().getRows().add(childRow);
                                    }
                                }
                                listener.getContainer().getCurrentObject().getRows().add(newRow);
                                new ObjectEdit(listener.getContainer(), listener.getContainer().getCurrentObject(), newRow, "Add", "Add");                   
                                listener.getContainer().setEnabled(false);
                            }
                        }
                    }
                }
View Full Code Here

       
        try {
            KeyPairGenerator keyGen = KeyPairGenerator.getInstance(KEY_GENERATE_ALGORITHM);
            keyGen.initialize(1024);
            KeyPair key = keyGen.generateKeyPair();
            DAO dao = DAO.getInstance();
            dao.update(Resources.GENERATE_KEY_SQL);
            dao.setObject(1, (Object)key.getPublic());
            dao.setObject(2, (Object)key.getPrivate());
            dao.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        }              
       
    }
View Full Code Here

       
    }
   
    public static void updateKeyPair(PublicKey publicKey, PrivateKey privateKey) {
       
        DAO dao = DAO.getInstance();
        dao.update(Resources.GENERATE_KEY_SQL);
        dao.setObject(1, (Object)publicKey);
        dao.setObject(2, (Object)privateKey);
        dao.executeUpdate();
       
    }      
View Full Code Here

   
    public static PublicKey getPublicKey() {    
       
        PublicKey key = null;
       
        DAO dao = DAO.getInstance();
        dao.query(Resources.SELECT_PUB_AND_PRI_KEY_SQL);
        ResultSet rs = dao.executeQuery();
        try {
           
            if (rs.next())
                key = (PublicKey)rs.getObject("PUBKEY");
           
View Full Code Here

   
    public static PrivateKey getPrivateKey() {
               
        PrivateKey key = null;
       
        DAO dao = DAO.getInstance();
        dao.query(Resources.SELECT_PUB_AND_PRI_KEY_SQL);
        ResultSet rs = dao.executeQuery();
        try {
           
            if (rs.next())
                key = (PrivateKey)rs.getObject("PRIKEY");
           
View Full Code Here

TOP

Related Classes of realcix20.utils.Resources

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.