Package realcix20.guis.relationships

Examples of realcix20.guis.relationships.RelationManager$Relation


                value = textField.getText().trim();           
        } else if (component instanceof JTextArea) {
            JTextArea textArea = (JTextArea)component;
            value = textArea.getText().trim();
        } else if (component instanceof DisplayOnlyText) {
            DisplayOnlyText displayOnlyText = (DisplayOnlyText)component;
            value = displayOnlyText.getValue();
        } else if (component instanceof JLabel) {
            JLabel label = (JLabel)component;
            value = label.getText();
        } else if (component instanceof JCheckBox) {
            JCheckBox checkBox = (JCheckBox)component;
View Full Code Here


            case 24:                          
                JLabel displayLabel = new JLabel();
                component = displayLabel;               
                break;               
            case 101:               
                DisplayOnlyText displayOnlyText = new DisplayOnlyText(column);
                component = displayOnlyText;               
                break;                           
            default:
                //δ֧�ֵĿؼ���ΪJLabel.
                JLabel label = new JLabel("Not Supported!");
View Full Code Here

            case 4:               
                PasswordEdit passwordEdit = new PasswordEdit(column);
                component = passwordEdit;               
                break;               
            case 5:               
                JDatePicker datePicker = new JDatePicker();
                component = datePicker;               
                break;               
            case 6:               
                JCheckBox checkBox = new JCheckBox();
                component = checkBox;               
View Full Code Here

            case 9:               
                JTimeStamp timeStamp = new JTimeStamp();
                component = timeStamp;               
                break;               
            case 10:               
                JMonthPicker monthPicker = new JMonthPicker();
                component = monthPicker;               
                break;               
            case 11:
            case 12:               
                CurrencyPlugin cp = CurrencyPlugin.getInstance();
View Full Code Here

            case 6:               
                JCheckBox checkBox = new JCheckBox();
                component = checkBox;               
                break;           
            case 9:               
                JTimeStamp timeStamp = new JTimeStamp();
                component = timeStamp;               
                break;               
            case 10:               
                JMonthPicker monthPicker = new JMonthPicker();
                component = monthPicker;               
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

TOP

Related Classes of realcix20.guis.relationships.RelationManager$Relation

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.