Package realcix20.cixfiles

Examples of realcix20.cixfiles.ExampleFileFilter


       
            boolean selected = false;
       
            fileChooser = new JFileChooser();
            fileChooser.setMultiSelectionEnabled(false);
            ExampleFileFilter filter = new ExampleFileFilter();
            if (action.equals("IMPORT"))
                fileChooser.setCurrentDirectory(new File("./cix/receive/"));
            else if (action.equals("EXPORT"))
                fileChooser.setCurrentDirectory(new File("./cix/send/"));
            filter.addExtension("cix");
            filter.setDescription("CIX Files");
            fileChooser.setFileFilter(filter);
            String str = action + "." + "CIXFILE";         
            int option = fileChooser.showDialog(getContainer(), TxtManager.getTxt(str));
            if (option == JFileChooser.APPROVE_OPTION) {
                selected = true;
View Full Code Here


       
            boolean selected = false;
       
            fileChooser = new JFileChooser();
            fileChooser.setMultiSelectionEnabled(false);
            ExampleFileFilter filter = new ExampleFileFilter();           
            filter.addExtension("cix");
            filter.setDescription("CIX Files");
            fileChooser.setFileFilter(filter);     
            int option = fileChooser.showDialog(getContainer(), TxtManager.getTxt("VIEW.CIXFILE.IMPORT"));
            if (option == JFileChooser.APPROVE_OPTION) {
                selected = true;
            }
View Full Code Here

       
            boolean selected = false;
           
            fileChooser = new JFileChooser();
            fileChooser.setMultiSelectionEnabled(false);
            ExampleFileFilter filter = new ExampleFileFilter();
            if (action.equals("IMPORT"))
                fileChooser.setCurrentDirectory(new File("./cix/receive/"));
            else if (action.equals("EXPORT"))
                fileChooser.setCurrentDirectory(new File("./cix/send/"));
            filter.addExtension("cix");
            filter.setDescription("CIX Files");
            fileChooser.setFileFilter(filter);           
            String str = action + "." + "CIXFILE";         
            int option = fileChooser.showDialog(getContainer(), TxtManager.getTxt(str));
            if (option == JFileChooser.APPROVE_OPTION) {
                selected = true;
View Full Code Here

    public boolean initFileChooser(String action, String fileName) {
       
            boolean selected = false;           
            fileChooser = new JFileChooser();
            fileChooser.setMultiSelectionEnabled(false);
            ExampleFileFilter filter = new ExampleFileFilter();           
            filter.addExtension("cix");
            filter.setDescription("CIX Files");
            fileChooser.setFileFilter(filter);
            fileChooser.setSelectedFile(new File(fileName));
            String str = action + "." + "CIXFILE";
            int option = -10;
            if (action.equals("Import")) {
View Full Code Here

            }
           
        }
        sb.replace(sb.length() - 1, sb.length(), " ");
       
        BaseClass object = container.getObject();
        String basicSQL = object.getBasicSQL();       
        if (basicSQL.indexOf("WHERE") == -1)
            basicSQL = basicSQL.substring(basicSQL.indexOf("FROM"));
        else {
            basicSQL = basicSQL.substring(basicSQL.indexOf("FROM"), basicSQL.indexOf("WHERE"));
        }
        sb.append(basicSQL + " ");
       
        boolean hasWhere = false;
        basicSQL = object.getBasicSQL();
        if (basicSQL.indexOf("WHERE") == -1)
            sb.append("WHERE ");
        else {
            hasWhere = true;
            basicSQL = basicSQL.substring(basicSQL.indexOf("WHERE"));
View Full Code Here

        public void setCurrentUser(Row currentUser) {
           
                //will be modified
                DAO dao = DAO.getInstance();
                dao.update(Resources.UPDATE_GLOBALVAR_TABLE_SQL);
                Cell userCell = ObjectUtil.findNewCell(currentUser, "LOGINENTRY", "RUSER");               
                dao.setObject(1, userCell.getColumnValue());
                dao.setObject(2, "loginuser");
                dao.executeUpdate();

                this.currentUser = currentUser;
        }
View Full Code Here

        String mainTableName = object.getMainTableName();
        String childTableName = object.getChildTableName();
        Iterator newCellIter = newRow.getNewCells().iterator();
        Iterator oldCellIter = newRow.getOldCells().iterator();
        try {
            Cell newCell = (Cell)newCellIter.next();
            Cell oldCell = (Cell)oldCellIter.next();
            if (newCell.getTableName().equals(childTableName)) {
                newCell.setColumnValue(null);
                oldCell.setColumnValue(null);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        Iterator pkColumnIter = object.getPkColumns().iterator();
        while (pkColumnIter.hasNext()) {
            Column pkColumn = (Column)pkColumnIter.next();
            if (pkColumn.getTableName().equals(mainTableName)) {
                Cell childPkOldCell = ObjectUtil.findOldCell(newRow, childTableName, pkColumn.getColumnName());

                //found
                if (childPkOldCell != null) {
                    Cell childPkNewCell = ObjectUtil.findNewCell(newRow, childTableName, pkColumn.getColumnName());
                    Cell mainPkNewCell = ObjectUtil.findNewCell(newRow, mainTableName, pkColumn.getColumnName());
                    childPkOldCell.setColumnValue(mainPkNewCell.getColumnValue());
                    childPkNewCell.setColumnValue(mainPkNewCell.getColumnValue());
                }
            }
        }
        return newRow;
    }
View Full Code Here

        return txt;
    }
   
    //���ָ��tableName,columnName��ָ��row�в���newCell��
    public static Cell findNewCell(Row row, String tableName, String columnName) {
        Cell newCell = null;               
        Iterator cellIter = row.getNewCells().iterator();
        while (cellIter.hasNext()) {
            Cell cell = (Cell)cellIter.next();
            if ( (cell.getColumnName().equals(columnName)) && (cell.getTableName().equals(tableName)) ) {
                newCell = cell;
                break;
            }
        }
        return newCell;
View Full Code Here

        return newCell;
    }
   
    //���ָ��tableName,columnName��ָ��row�в���oldCell��
    public static Cell findOldCell(Row row, String tableName, String columnName) {
        Cell oldCell = null;
        Iterator cellIter = row.getOldCells().iterator();
        while (cellIter.hasNext()) {
            Cell cell = (Cell)cellIter.next();
            if ( (cell.getColumnName().equals(columnName)) && (cell.getTableName().equals(tableName)) ) {
                oldCell = cell;
                break;
            }
        }
        return oldCell;
View Full Code Here

                    Vector rowDatas = new Vector();
                    columnIter = object.getColumns().iterator();
                    while (columnIter.hasNext()) {
                        Column column = (Column)columnIter.next();
                        if (column.isItemField()) {
                            Cell newCell = ObjectUtil.findNewCell(row, column.getTableName(), column.getColumnName());
                            if (column.isI18N()) {
                                String i18nString = null;
                                if (newCell.getColumnValue() != null)
                                    i18nString = I18NManager.getI18NString(column.getI18nPrefix(), newCell.getColumnValue());
                                if (i18nString != null) {
                                    if (GlobalValueManager.getValue("APPLICATION.ZIC").equals("1")) {
                                        rowDatas.add(i18nString);
                                    } else if (GlobalValueManager.getValue("APPLICATION.ZIC").equals("2")) {
                                        rowDatas.add(newCell.getColumnValue());
                                    } else if (GlobalValueManager.getValue("APPLICATION.ZIC").equals("3")) {
                                       rowDatas.add(newCell.getColumnValue() + " - " + i18nString);
                                    }
                                }                                   
                                else {
                                    if (newCell.getColumnValue() instanceof Double) {
                                        rowDatas.add(CurrencyPlugin.getFormatedDouble((Double)newCell.getColumnValue()));
                                    } else
                                    rowDatas.add(newCell.getColumnValue());
                                }
                            } else {
                                if (newCell.getColumnValue() instanceof Double) {
                                    rowDatas.add(CurrencyPlugin.getFormatedDouble((Double)newCell.getColumnValue()));
                                } else
                                    rowDatas.add(newCell.getColumnValue());
                            }                       
                        }
                    }                                   
                    rowDatas.add(row);                   
                    dataValues.add(rowDatas);     
View Full Code Here

TOP

Related Classes of realcix20.cixfiles.ExampleFileFilter

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.