Package realcix20.classes.basic

Examples of realcix20.classes.basic.Cell


            ItemTableModel model = (ItemTableModel)container.getTable().getModel();
            Vector dataVector = model.getDataVector();
            for (int i = 0; i < model.getRowCount(); i++) {
                Vector rowDatas = (Vector)dataVector.get(i);
                Row row = (Row)rowDatas.get(rowDatas.size() - 1);
                Cell cell = ObjectUtil.findNewCell(row, "TAXI", "TAMT");
                if (cell.getColumnValue() == null)
                    ((TaxClass)container.getObject()).calculatorTax(row);
                row.setModify(true);
            }
       
    }   
View Full Code Here


                ItemTableModel model = (ItemTableModel)container.getTable().getModel();
                selectedRowNumber = container.getTable().convertRowIndexToModel(selectedRowNumber);
                Vector dataVector = model.getDataVector();
                Vector rowDatas = (Vector)dataVector.get(selectedRowNumber);
                Row selectedRow = (Row)rowDatas.get(rowDatas.size() - 1);
                Cell newTAmtCell = ObjectUtil.findNewCell(selectedRow, "RI", "TAMT");
                Cell newLAmtCell = ObjectUtil.findNewCell(selectedRow, "RI", "LAMT");
                Cell newXrCell = ObjectUtil.findNewCell(selectedRow, "RI", "XR");
                double tAmt = 0.0;
                double lAmt = 0.0;
                double xr = 1.0;
                if (newTAmtCell.getColumnValue() != null)
                    tAmt = ((Number)newTAmtCell.getColumnValue()).doubleValue();
                if (newLAmtCell.getColumnValue() != null)
                    lAmt = ((Number)newLAmtCell.getColumnValue()).doubleValue();
                if (newXrCell.getColumnValue() != null)
                    xr = ((Number)newXrCell.getColumnValue()).doubleValue();
                double sum = container.setCurrentLAMTTotal();               
                lAmt = lAmt - container.setCurrentLAMTTotal();
                tAmt = lAmt / xr;
                newTAmtCell.setColumnValue(tAmt);
                newLAmtCell.setColumnValue(lAmt);
View Full Code Here

                for (int i = 0; i < rows.length; i++) {                   
                    int selectedRowNumber = container.getTable().convertRowIndexToModel(rows[i]);
                    Vector dataVector = model.getDataVector();
                    Vector rowDatas = (Vector)dataVector.get(selectedRowNumber);
                    Row selectedRow = (Row)rowDatas.get(rowDatas.size() - 1);
                    Cell newTAmtCell = ObjectUtil.findNewCell(selectedRow, "RI", "TAMT");
                    Cell newLAmtCell = ObjectUtil.findNewCell(selectedRow, "RI", "LAMT");
                    if (newTAmtCell.getColumnValue() != null) {
                        Number tAmt = (Number)newTAmtCell.getColumnValue();
                        tAmt = 0 - tAmt.doubleValue();
                        newTAmtCell.setColumnValue(tAmt);
                    }
                    if (newLAmtCell.getColumnValue() != null) {
                        Number lAmt = (Number)newLAmtCell.getColumnValue();
                        lAmt = 0 - lAmt.doubleValue();
                        newLAmtCell.setColumnValue(lAmt);
                    }
                    selectedRow.setModify(true);
                }
                container.updateTable();
            }
View Full Code Here

            while (childRowIter.hasNext()) {
                Row childRow = (Row)childRowIter.next();
                if (childRow != mainRow) {
                    Iterator childRowCellIter = childRow.getNewCells().iterator();                   
                    while (childRowCellIter.hasNext()) {
                        Cell childRowCell = (Cell)childRowCellIter.next();                     
                        Column tColumn = ObjectUtil.findColumn(container.getObject(), childRowCell.getTableName(), childRowCell.getColumnName());
                        if ( (tColumn.isPrimaryKey()) && (tColumn.getTableName().equals(container.getObject().getChildTableName())) ) {
                            Cell mainRowCell = ObjectUtil.findNewCell(mainRow, container.getObject().getMainTableName(), childRowCell.getColumnName());
                            if (mainRowCell != null)
                                childRowCell.setColumnValue(mainRowCell.getColumnValue());
                        }
                        /*if ( (tColumn.getTableName().equals("PA")) && (tColumn.getColumnName().equals("PUBKEY")) )
                            childRowCell.setColumnValue(null);
                        if ( (tColumn.getTableName().equals("PA")) && (tColumn.getColumnName().equals("PRIKEY")) )
                            childRowCell.setColumnValue(null);*/
 
View Full Code Here

            String mainTableName = container.getObject().getMainTableName();
            String childTableName = container.getObject().getChildTableName();
            while (pkColumnIter.hasNext()) {
                Column pkColumn = (Column)pkColumnIter.next();
                if (pkColumn.getTableName().equals(mainTableName)) {
                    Cell childPkOldCell = ObjectUtil.findOldCell(childRow, childTableName, pkColumn.getColumnName());
                    //found
                    if (childPkOldCell != null) {
                        Cell childPkNewCell = ObjectUtil.findNewCell(childRow, childTableName, pkColumn.getColumnName());
                        Cell mainPkNewCell = ObjectUtil.findNewCell(container.getCurrentRow(), mainTableName, pkColumn.getColumnName());
                        childPkOldCell.setColumnValue(mainPkNewCell.getColumnValue());
                        childPkNewCell.setColumnValue(mainPkNewCell.getColumnValue());
                    }
                }
            }
            childRow.setModify(true);
            childRow.print();
View Full Code Here

                ComponentExt componentExt = (ComponentExt)componentExtIter.next();
                Column column = componentExt.getColumn();
                JComponent component = componentExt.getComponent();
                Iterator cellIter = row.getNewCells().iterator();
                while (cellIter.hasNext()) {
                    Cell cell = (Cell)cellIter.next();
                    if ( (cell.getColumnName().equals(column.getColumnName())) && (cell.getTableName().equals(column.getTableName())) ) {
                       
                        if (column.getInputType() == 24) {//lastchanged by
                            Row currentRow = Session.getInstance().getCurrentUser();
                            Iterator tempCellIter = currentRow.getOldCells().iterator();
                            while (tempCellIter.hasNext()) {
                                Cell tempCell = (Cell)tempCellIter.next();
                                if (tempCell.getColumnName().equals("RUSER"))
                                    cell.setColumnValue(tempCell.getColumnValue());
                            }
                        } else if (column.getInputType() == 23) {//lastchanged
                            java.util.Date date = new java.util.Date();
                            Calendar cal = Calendar.getInstance();
                            cal.setTime(date);
View Full Code Here

    private Object getValue(Column column, Row row) {
           
        Object value = null;
        Iterator cellIter = row.getNewCells().iterator();
        while (cellIter.hasNext()) {
            Cell cell = (Cell)cellIter.next();
            if ( (cell.getColumnName().equals(column.getColumnName())) && (cell.getTableName().equals(column.getTableName())) ) {
                value = cell.getColumnValue();
            }
        }

        return value;
View Full Code Here

            while (componentExtIter.hasNext()) {
               
                ComponentExt componentExt = (ComponentExt)componentExtIter.next();
                Column column = componentExt.getColumn();
                JComponent component = componentExt.getComponent();
                Cell cell = ObjectUtil.findNewCell(row, column.getTableName(), column.getColumnName());
               
                if (container.getAction().equals("Add")) {
                    if ( (column.getInputType() == 22) || (column.getInputType() == 24) ) {//created by
                        cell.setColumnValue(GlobalValueManager.getValue("SESSION.LOGINUSER"));
                    } else if ( (column.getInputType() == 21) || (column.getInputType() == 23) ) {//created
                        java.util.Date date = new java.util.Date();
                        String now = TimeManager.getTime(date.getTime());
                        cell.setColumnValue(now);
                    } else {
                        cell.setColumnValue(ComponentManager.getValue(component));
                    }
                } else if (container.getAction().equals("Edit")) {
                    if (column.getInputType() == 24) {//lastchanged by
                        cell.setColumnValue(GlobalValueManager.getValue("SESSION.LOGINUSER"));
                    } else if (column.getInputType() == 23) {// lastchanged
                        java.util.Date date = new java.util.Date();
                        String now = TimeManager.getTime(date.getTime());
                        cell.setColumnValue(now);
                    } else {
                        cell.setColumnValue(ComponentManager.getValue(component));
                    }
                }
               
            }
                  
View Full Code Here

    }

    //add me account,generate public/private keys, used by PartnerClass
    public static void createMePartner(Row userRow) {
        String ns = "ME";               
        Cell ruserCell = ObjectUtil.findNewCell(userRow, "RUSER", "RUSER");
        String p = (String)ruserCell.getColumnValue();               
        String defpa = "1";
        String defaddr = null;               
        Cell fnameCell = ObjectUtil.findNewCell(userRow, "RUSER", "FNAME");
        String fname = (String)fnameCell.getColumnValue();               
        Cell lnameCell = ObjectUtil.findNewCell(userRow, "RUSER", "LNAME");
        String lname = (String)lnameCell.getColumnValue();               
        Cell websiteCell = ObjectUtil.findNewCell(userRow, "RUSER", "WEBSITE");
        String domain = (String)websiteCell.getColumnValue();              
        Cell emailCell = ObjectUtil.findNewCell(userRow, "RUSER", "EMAIL");
        String email = (String)emailCell.getColumnValue();               
        Cell coCell = ObjectUtil.findNewCell(userRow, "RUSER", "CO");
        String co = (String)coCell.getColumnValue();           
        DAO dao = DAO.getInstance();
        dao.update(Resources.INSERT_P_SQL);
        dao.setObject(1, ns);               
        dao.setObject(2, p);
        dao.setObject(3, fname);
View Full Code Here

       
        boolean flag = false;
        dao.query(VALIDATE_LOGIN_ENTRY_SQL);
        Iterator cellIter = selectedRow.getNewCells().iterator();
        while (cellIter.hasNext()) {
            Cell cell = (Cell)cellIter.next();
            if (cell.getColumnName().equals("RUSER")) {
                dao.setObject(1, cell.getColumnValue());
            } else if (cell.getColumnName().equals("PASSWORD")) {
                dao.setObject(2, cell.getColumnValue());
                break;
            }
        }
        ResultSet rs = dao.executeQuery();
        try {
View Full Code Here

TOP

Related Classes of realcix20.classes.basic.Cell

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.