Package realcix20.guis.relationships

Examples of realcix20.guis.relationships.RelationManager


        }
    }
   
    //����ϵͳ����
    private void setApplicationLang() {
        LanguageChooser languageChooser = container.getLanguageChooser();
        String selectedLang = ((Item)languageChooser.getSelectedItem()).getFactValue().toString();
        GlobalValueManager.setApplicationLang(selectedLang);
    }
View Full Code Here


            value = detailList.getValue();
        } else if (component instanceof XrCalculator) {
            XrCalculator xrCalculator = (XrCalculator)component;
            value = xrCalculator.getValue();
        } else if (component instanceof PasswordEdit) {
            PasswordEdit passwordEdit = (PasswordEdit)component;
            value = passwordEdit.getValue();
        }       
        return value;       
    }
View Full Code Here

                detailList = new DetailList(column);
                detailList.setEditabled(true);
                component = detailList;               
                break;                                                  
            case 4:               
                PasswordEdit passwordEdit = new PasswordEdit(column);
                component = passwordEdit;               
                break;               
            case 5:               
                JDatePicker datePicker = new JDatePicker();
                component = datePicker;               
View Full Code Here

            value = detailText.getValue();
        } else if (component instanceof DetailList) {//81
            DetailList detailList = (DetailList)component;
            value = detailList.getValue();
        } else if (component instanceof XrCalculator) {
            XrCalculator xrCalculator = (XrCalculator)component;
            value = xrCalculator.getValue();
        } else if (component instanceof PasswordEdit) {
            PasswordEdit passwordEdit = (PasswordEdit)component;
            value = passwordEdit.getValue();
        }       
        return value;       
View Full Code Here

                DetailList detailList = new DetailList(column);
                detailList.setEditabled(false);
                component = detailList;               
                break;               
            case 83:               
                XrCalculator xrCalculator = new XrCalculator(column);
                component = xrCalculator;               
                break;               
            case 82:               
                detailList = new DetailList(column);
                detailList.setEditabled(true);
View Full Code Here

                    Column column = componentExt.getColumn();
                    container.getRelationManager().init81Or82Or83ComponentAction(componentExt);
                    if (action.equals("Edit")) {
                      //if correspendence, init the default value
if(object.getClsId()==520){
    RelationManager relationManager = container.getRelationManager();
    Vector parameters = relationManager.getParameters_Defvalue(componentExt);
    if (parameters != null) {
        String sql = relationManager.getSQL_Defvalue(componentExt, parameters);
        DAO dao = DAO.getInstance();
        dao.query(sql);
        for (int i = 0; i < parameters.size(); i++) {
            String parameter = (String)parameters.get(i);
            StringTokenizer st = new StringTokenizer(parameter, ".");
            String tableName = (String)st.nextElement();
            String columnName = (String)st.nextElement();
            ComponentExt tempComponentExt = relationManager.findComponentExt(tableName, columnName);
            JComponent tempComponent = tempComponentExt.getComponent();                                   
            dao.setObject(i+1, ComponentManager.getValue(tempComponent));
        }
        ResultSet rs = dao.executeQuery();
        try {
            if (rs.next()) {
                ResultSetMetaData rsmd = rs.getMetaData();
                for (int i = 1; i <= rsmd.getColumnCount(); i++) {
                    ComponentExt tempComponentExt = relationManager.findComponentExt(column.getTableName(), rsmd.getColumnName(i));
                    boolean isThisObjectColumn = (tempComponentExt != null);
                    if (isThisObjectColumn) {
                        if (rs.getObject(i) != null) {
                            ComponentManager.setValue(rs.getObject(i), tempComponentExt.getComponent());
                        }
                    }
                }
            }
            rs.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    } 
}
                        ComponentManager.setValue(getValue(componentExt.getColumn(), selectedRow), componentExt.getComponent());                       
                    } else if (action.equals("Add")) {                       
                        RelationManager relationManager = container.getRelationManager();
                        Vector parameters = relationManager.getParameters_Defvalue(componentExt);
                        if (parameters != null) {
                            String sql = relationManager.getSQL_Defvalue(componentExt, parameters);
                            DAO dao = DAO.getInstance();
                            dao.query(sql);
                            for (int i = 0; i < parameters.size(); i++) {
                                String parameter = (String)parameters.get(i);
                                StringTokenizer st = new StringTokenizer(parameter, ".");
                                String tableName = (String)st.nextElement();
                                String columnName = (String)st.nextElement();
                                ComponentExt tempComponentExt = relationManager.findComponentExt(tableName, columnName);
                                JComponent tempComponent = tempComponentExt.getComponent();                                   
                                dao.setObject(i+1, ComponentManager.getValue(tempComponent));
                            }
                            ResultSet rs = dao.executeQuery();
                            try {
                                if (rs.next()) {
                                    ResultSetMetaData rsmd = rs.getMetaData();
                                    for (int i = 1; i <= rsmd.getColumnCount(); i++) {
                                        ComponentExt tempComponentExt = relationManager.findComponentExt(column.getTableName(), rsmd.getColumnName(i));
                                        boolean isThisObjectColumn = (tempComponentExt != null);
                                        if (isThisObjectColumn) {
                                            if (rs.getObject(i) != null) {
                                                ComponentManager.setValue(rs.getObject(i), tempComponentExt.getComponent());
                                            }
View Full Code Here

    private void initialNoBeControledComponents(Vector componentExts) {
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
           
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
            JComponent component = componentExt.getComponent();
           
            switch (column.getInputType()) {
               
                case 1:
                case 2:
View Full Code Here

       
        Column column = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column tempColumn = componentExt.getColumn();
            if ( (tempColumn.getTableName().equals(tableName)) && (tempColumn.getColumnName().equals(columnName)) ) {
                column = tempColumn;
                break;
            }
        }
View Full Code Here

       
        Row row = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
            if ( (column.getTableName().equals(tableName)) && (column.getColumnName().equals(columnName)) ) {
                row = componentExt.getRow();
                break;
            }
        }
       
        return row;
View Full Code Here

       
        JComponent component = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
            if ( (column.getTableName().equals(tableName)) && (column.getColumnName().equals(columnName)) ) {
                component = componentExt.getComponent();
                break;
            }
        }
       
        return component;
View Full Code Here

TOP

Related Classes of realcix20.guis.relationships.RelationManager

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.