Examples of CurrencyPlugin


Examples of realcix20.classes.plugins.CurrencyPlugin

   
    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

Examples of realcix20.classes.plugins.CurrencyPlugin

   
    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

Examples of realcix20.classes.plugins.CurrencyPlugin

                JMonthPicker monthPicker = new JMonthPicker();
                component = monthPicker;               
                break;               
            case 11:
            case 12:               
                CurrencyPlugin cp = CurrencyPlugin.getInstance();
                //set default format,Ĭ�ϵ����ָ�ʽ������               
                StringBuffer sb = new StringBuffer("###");                    
                sb.append(cp.getSepor() + "###");
                DecimalFormat  df = new DecimalFormat(sb.toString());
                JFormattedTextField formattedTextField = new JFormattedTextField(df);
                component = formattedTextField;               
                break;               
            case 16:               
                cp = CurrencyPlugin.getInstance();               
                //set format
                sb = new StringBuffer("###");
                sb.append(cp.getSepor() + "###");
                int fraction = Integer.parseInt(GlobalValueManager.getValue("APPLIATION.DEFFRACTION"));
                if (fraction > 0) {
                    sb.append(cp.getFpoint());
                }
                for (int i = 1; i <= fraction; i++) {
                    sb.append("0");
                }
                df = new DecimalFormat(sb.toString());               
View Full Code Here

Examples of realcix20.classes.plugins.CurrencyPlugin

                    String tableName = (String)st.nextElement();
                    String columnName = (String) st.nextElement();
                    ComponentExt pComponentExt = relationManager.findComponentExt(tableName, columnName);
                    Object pValue = ComponentManager.getValue(pComponentExt.getComponent());
                    JComponent component = childComponentExt.getComponent();
                    CurrencyPlugin cp = CurrencyPlugin.getInstance();
                    StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                    int fraction = Integer.parseInt(GlobalValueManager.getValue("APPLIATION.DEFFRACTION"));
                    if (pValue != null)
                        fraction = cp.getFraction(pValue.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)component).setFormatterFactory(factory);
                } else if (childColumn.getInputType() == 12) {
                    JComponent component = childComponentExt.getComponent();
                    CurrencyPlugin cp = CurrencyPlugin.getInstance();
                    UomPlugin up = UomPlugin.getInstance();
                    if (column.getPControls() != null) {
                        StringTokenizer st = new StringTokenizer(column.getPControls(), ".");
                        String tableName = (String)st.nextElement();
                        String columnName = (String)st.nextElement();
                        ComponentExt pComponentExt = relationManager.findComponentExt(tableName, columnName);
                        Object pValue = ComponentManager.getValue(pComponentExt.getComponent());
                        StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                        int fraction = Integer.parseInt(GlobalValueManager.getValue("APPLIATION.DEFFRACTION"));
                        if (pValue != null)
                            fraction = up.getFraction(pValue.toString());
                        if (fraction > 0) {
                            sb.append(".");
View Full Code Here

Examples of realcix20.classes.plugins.CurrencyPlugin

                    new ActionAdapter() {

                        public void actionPerformed(ActionEvent e) {

                            if ( (ComponentManager.getValue(pComponent) != null) && (pComponent.isFocusOwner()) ) {
                                CurrencyPlugin cp = CurrencyPlugin.getInstance();
                                StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                                int fraction = cp.getFraction(ComponentManager.getValue(pComponent).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

Examples of realcix20.classes.plugins.CurrencyPlugin

                    new ActionAdapter() {

                        public void actionPerformed(ActionEvent e) {

                            if ( (ComponentManager.getValue(pComponent) != null) && (pComponent.isFocusOwner()) ) {
                                CurrencyPlugin cp = CurrencyPlugin.getInstance();
                                UomPlugin up = UomPlugin.getInstance();
                                StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                                int fraction = up.getFraction(ComponentManager.getValue(pComponent).toString());
                                if (fraction > 0) {
                                    sb.append(".");
                                }
                                for (int i = 1; i <= fraction; i++) {
View Full Code Here

Examples of realcix20.classes.plugins.CurrencyPlugin

           
                super();
                this.column = column;
                setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
                displayText = new JFormattedTextField();
                CurrencyPlugin cp = CurrencyPlugin.getInstance();                               
                StringBuffer sb = new StringBuffer("###");
                sb.append(cp.getSepor() + "###");
                int fraction = Integer.parseInt(GlobalValueManager.getValue("APPLIATION.DEFFRACTION"));
                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

Examples of realcix20.classes.plugins.CurrencyPlugin

                        String tableName = (String)st.nextElement();
                        String columnName = (String) st.nextElement();
                        ComponentExt pComponentExt = relationManager.findComponentExt(tableName, columnName);
                        Object pValue = ComponentManager.getValue(pComponentExt.getComponent());
                        JComponent component = childComponentExt.getComponent();
                        CurrencyPlugin cp = CurrencyPlugin.getInstance();
                        StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                        int fraction = Integer.parseInt(GlobalValueManager.getValue("APPLIATION.DEFFRACTION"));
                        if (pValue != null)
                            fraction = cp.getFraction(pValue.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)component).setFormatterFactory(factory);
                    } else if (childColumn.getInputType() == 12) {
                        JComponent component = childComponentExt.getComponent();
                        CurrencyPlugin cp = CurrencyPlugin.getInstance();
                        UomPlugin up = UomPlugin.getInstance();
                        StringTokenizer st = new StringTokenizer(column.getPControls(), ".");
                        String tableName = (String)st.nextElement();
                        String columnName = (String)st.nextElement();
                        ComponentExt pComponentExt = relationManager.findComponentExt(tableName, columnName);
                        Object pValue = ComponentManager.getValue(pComponentExt.getComponent());
                        StringBuffer sb = new StringBuffer("###" + cp.getSepor() + "###");
                        int fraction = Integer.parseInt(GlobalValueManager.getValue("APPLIATION.DEFFRACTION"));
                        if (pValue != null)
                            fraction = up.getFraction(pValue.toString());
                        if (fraction > 0) {
                            sb.append(".");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.