Package com.nexirius.util

Examples of com.nexirius.util.XString


        if (s == null) {

            return "";
        }

        XString xs = new XString(s);

        xs.replace(File.separator, "/");

        String path = xs.toString();

        if (!path.startsWith("/")) {
            path = "/" + path;
        }
View Full Code Here


        if (name == null) {
            return null;
        }

        if (name.equals(FULLNAME)) {
            XString htmlValue = new XString(value);

            htmlValue.replace(" ", "+");
            htmlValue.replace(";", "%3B");

            setVariable(HTML_FULLNAME, htmlValue.toString());
        }

        String ret = getValueOf(name);

        if (value == null) {
View Full Code Here

            String resourceKey = getModelFieldName();
            ClientResource cr = parent_viewer.getFactory().getClientResource();

            String textString = cr.getLabel(resourceKey);

            XString text = new XString("<html>" + textString);

            text.replace("\\n", "<p>");

            // create the associated textField
            JLabel comp = new MyJTextField(text.toString());
            //JTextArea comp = new JTextArea(text.toString());

            //comp.setMargin(defaultInsets);

//      comp.setEditable(false);
View Full Code Here

        }

        String tip = clientResource.getToolTipText(resourceKey);

        if (tip != null) {
            XString xs = new XString(tip);

            xs.replace("\\n", "\n");

            setToolTipText(xs.toString());
        }
    }
View Full Code Here

    }

    public void set(String value)
            throws Exception {
        if (value.indexOf(',') >= 0) {
            XString xv = new XString(value);

            xv.replace(",", ".");
            value = xv.toString();
        }

        m_value = Double.valueOf(value).doubleValue();
    }
View Full Code Here

            if (model.getFlag(ModelFlag.TRANSLATE_VALUE)) {
                value = translator.translate(value);
            }

            if (value.indexOf("'") > 0) {
                XString xstr = new XString(value);

                xstr.replace("'", "&#39;");
                value = xstr.toString();
            }

//            try {
//                value = URLEncoder.encode(value, "UTF-8");
//            }
View Full Code Here

                if (subchild instanceof StructModel) {
                    registerChildModelAttributes(attributeName.toString(), subchild);
                } else if (subchild instanceof ArrayModel) {
                    // ignore arrays
                } else {
                    XString fieldName = new XString(attributeName.toString() + '_');

                    fieldName.replace(";", "_");

                    registerFieldName(attributeName.toString(), fieldName.toString());

                    System.out.println(attributeName.toString() + " --- " + fieldName.toString());
                }
            }
        }
    }
View Full Code Here

                XFile file = new XFile(dirname, fname);
                StringVector sv = file.getTextLines();
                StringVector svout = new StringVector();

                for (String s = sv.firstItem(); s != null; s = sv.nextItem()) {
                    XString xs = new XString(s);
                    int reps = 0;

                    for (int i = 0; i < m_pattern.length; ++i) {
                        reps += xs.replace(m_pattern[i], m_replace[i]);
                    }

                    if (reps > 0) {
                        replacements += reps;
                        //System.out.println("BEFORE:" + s);
                        //System.out.println("AFTER :" + xs.toString());
                    }

                    svout.append(xs.toString());
                }

                if (replacements > 0) {
                    ++ret;
                    System.out.println("WRITING (" + replacements + ") : " + fname);
View Full Code Here

                ++fcount;
                XFile file = new XFile(dirname, fname);
                long mod = file.lastModified() + 1000L;
                StringVector sv = file.getTextLines();
                StringVector svout = new StringVector();
                XString xheader = new XString(header);
                XString className = new XString(prepend + fname.substring(0, fname.length() - 5));

                className.replace(File.separator, ".");

                String modificationDateString = new Date(mod).toString();
                xheader.replace(DATE, modificationDateString);
                xheader.replace(NOW, now);
                xheader.replace(VERSION, version);
                xheader.replace(CLASSNAME, className.toString());
                boolean removing = false;

                svout.append(BEGIN_HEADER);
                svout.append(xheader.toString());
                svout.append(END_HEADER);
View Full Code Here

            e.printStackTrace()//TODO
        } catch (ClassNotFoundException e) {
            e.printStackTrace()//TODO
        }

        XString filename = new XString(dbPathName);

        filename.replace("\\", "/");

        String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" + filename + ";DriverID=22;READONLY=true}";

        JdbcConnectionHandler.init(new JdbcConnectionHandler(database, null, null));

View Full Code Here

TOP

Related Classes of com.nexirius.util.XString

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.