Examples of UomPlugin


Examples of realcix20.classes.plugins.UomPlugin

    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

Examples of realcix20.classes.plugins.UomPlugin

                    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(".");
                        }
                        for (int i = 1; i <= fraction; i++) {
                            sb.append("0");
View Full Code Here

Examples of realcix20.classes.plugins.UomPlugin

                        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++) {
                                    sb.append("0");
View Full Code Here

Examples of realcix20.classes.plugins.UomPlugin

                        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(".");
                        }
                        for (int i = 1; i <= fraction; i++) {
                            sb.append("0");
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.