Package realcix20.classes.basic

Examples of realcix20.classes.basic.Column


       
    }
   
    protected Row findRow(String tableName, String columnName, Vector componentExts) {
       
        Row row = null;
       
        Iterator componentExtIter = componentExts.iterator();
        while (componentExtIter.hasNext()) {
            ComponentExt componentExt = (ComponentExt)componentExtIter.next();
            Column column = componentExt.getColumn();
View Full Code Here


   
    protected void contactRelationship1_11(final JComponent component, final JComponent childComponent) {               
       
        //set initial value
        if (ComponentManager.getValue(component) != null) {
            CurrencyPlugin cp = CurrencyPlugin.getInstance();
            StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
            int fraction = cp.getFraction(ComponentManager.getValue(component).toString());
            if (fraction > 0) {
                sb.append(cp.getFpoint());
            }
            for (int i = 1; i <= fraction; i++) {
                sb.append("0");
            }
            DecimalFormat df = new DecimalFormat(sb.toString());
            NumberFormatter nf = new NumberFormatter(df);
            DefaultFormatterFactory factory = new DefaultFormatterFactory(nf);
            ((JFormattedTextField)childComponent).setFormatterFactory(factory);
        }
       
        ((JComboBox)component).addActionListener(
                new ActionAdapter() {
           
                    public void actionPerformed(ActionEvent e) {
                       
                        if (ComponentManager.getValue(component) != null) {
                            CurrencyPlugin cp = CurrencyPlugin.getInstance();
                            StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                            int fraction = cp.getFraction(ComponentManager.getValue(component).toString());
                            if (fraction > 0) {
                                sb.append(cp.getFpoint());
                            }
                            for (int i = 1; i <= fraction; i++) {
                                sb.append("0");
                            }
                            DecimalFormat df = new DecimalFormat(sb.toString());
View Full Code Here

   
    protected void contactRelationship1_12(final JComponent component, final JComponent childComponent) {               
       
        //set initial value
        if (ComponentManager.getValue(component) != null) {
            CurrencyPlugin cp = CurrencyPlugin.getInstance();
            UomPlugin up = UomPlugin.getInstance();
            StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
            int fraction = up.getFraction(ComponentManager.getValue(component).toString());
            if (fraction > 0) {
                sb.append(".");
            }
            for (int i = 1; i <= fraction; i++) {
                sb.append("0");
            }
            DecimalFormat df = new DecimalFormat(sb.toString());
            NumberFormatter nf = new NumberFormatter(df);
            DefaultFormatterFactory factory = new DefaultFormatterFactory(nf);
            ((JFormattedTextField)childComponent).setFormatterFactory(factory);
        }
       
        ((JComboBox)component).addActionListener(
                new ActionAdapter() {
           
                    public void actionPerformed(ActionEvent e) {
                                               
                        if (ComponentManager.getValue(component) != null) {
                            CurrencyPlugin cp = CurrencyPlugin.getInstance();
                            UomPlugin up = UomPlugin.getInstance();
                            StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                            int fraction = up.getFraction(ComponentManager.getValue(component).toString());
                            if (fraction > 0) {
                                sb.append(".");
                            }
                            for (int i = 1; i <= fraction; i++) {
View Full Code Here

    protected void contactRelationship1_12(final JComponent component, final JComponent childComponent) {               
       
        //set initial value
        if (ComponentManager.getValue(component) != null) {
            CurrencyPlugin cp = CurrencyPlugin.getInstance();
            UomPlugin up = UomPlugin.getInstance();
            StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
            int fraction = up.getFraction(ComponentManager.getValue(component).toString());
            if (fraction > 0) {
                sb.append(".");
            }
            for (int i = 1; i <= fraction; i++) {
                sb.append("0");
            }
            DecimalFormat df = new DecimalFormat(sb.toString());
            NumberFormatter nf = new NumberFormatter(df);
            DefaultFormatterFactory factory = new DefaultFormatterFactory(nf);
            ((JFormattedTextField)childComponent).setFormatterFactory(factory);
        }
       
        ((JComboBox)component).addActionListener(
                new ActionAdapter() {
           
                    public void actionPerformed(ActionEvent e) {
                                               
                        if (ComponentManager.getValue(component) != null) {
                            CurrencyPlugin cp = CurrencyPlugin.getInstance();
                            UomPlugin up = UomPlugin.getInstance();
                            StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                            int fraction = up.getFraction(ComponentManager.getValue(component).toString());
                            if (fraction > 0) {
                                sb.append(".");
                            }
                            for (int i = 1; i <= fraction; i++) {
                                sb.append("0");
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

                        try {

                            ResultSetMetaData rsmd = rs.getMetaData();
                            if (rsmd.getColumnCount() == 1) {
                                while (rs.next()) {
                                    Item item = new Item(rs.getObject(1), rs.getObject(1));
                                    ((JComboBox)component).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)component).addItem(item);
                                }
                            }
                            rs.close();
View Full Code Here

        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

TOP

Related Classes of realcix20.classes.basic.Column

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.