Examples of StringVector


Examples of com.nexirius.util.StringVector

     *
     * @param childName
     */
    public void addSelectedChild(String childName) {
        if (selectedChildren == null) {
            selectedChildren = new StringVector();
        }
        FWLog.debug("add " + childName);
        selectedChildren.append(childName);
    }
View Full Code Here

Examples of com.nexirius.util.StringVector

        public void dataModelEdit(DataModelEvent ev) {
        }
    }

    public void updateHighlight() {
        StringVector fieldNames = new StringVector();
        StringVector fieldValues = new StringVector();

        DataModelEnumeration e = model.getEnumeration();

        while (e.hasMore()) {
            DataModel child = e.next();
            String fieldName = child.getFieldName();
            String fieldValue = model.getChildText(fieldName);

            if (fieldValue != null && fieldValue.length() > 0) {
                fieldNames.append(fieldName);
                fieldValues.append(fieldValue);
            }
        }

        boolean found = false;
        int i = 0;

        if (fieldNames.size() > 0) {
            e = selectionArray.getEnumeration();

            while (e.hasMore()) {
                DataModel item = e.next();
                String fieldValue = fieldValues.firstItem();
                boolean hit = true;

                for (String fieldName = fieldNames.firstItem(); fieldName != null; fieldName = fieldNames.nextItem()) {

                    if (!item.getChildText(fieldName).startsWith(fieldValue)) {
                        hit = false;
                        break;
                    }

                    fieldValue = fieldValues.nextItem();
                }

                if (hit) {
                    found = true;
                    break;
View Full Code Here

Examples of com.nexirius.util.StringVector

            if (codes == null) {
                throw new RuntimeException(CURRENCY_CODES + " must be defined in the resources (comma separated list)");
            }

            StringVector codesVector = new StringVector(codes, ", \t");

            currencyCodes = new SimpleArrayModel(codesVector.getArray(), CURRENCY_CODES);
        }

        return currencyCodes;
    }
View Full Code Here

Examples of com.nexirius.util.StringVector

        return ret;
    }

    public StringVector getVariableNames() {
        StringVector ret = new StringVector();
        Enumeration enumeration = variableTable.keys();

        while (enumeration.hasMoreElements()) {
            String s = (String) enumeration.nextElement();
            ret.sortInsert(s);
        }

        return ret;
    }
View Full Code Here

Examples of com.nexirius.util.StringVector

                } catch (InterruptedException ex) {
                    return;
                }

                TextSelector textSelector = getTextSelector();
                StringVector tipText = new StringVector();

                boolean hasMore = textSelector.getCompletionListFor(text, tipText);

                if (isInterrupted() || this != thread) {
                    return;
                }

                if (tipText.size() == 1 && text.equals(tipText.firstItem())) {
                    removeTip();
                } else {
                    setTip(tipText, hasMore);
                }
            }
View Full Code Here

Examples of com.nexirius.util.StringVector

     */
    public void create() {

        if (getModel() instanceof LimitIntModel) {
            if (!((LimitIntModel) getModel()).getObjectList().hasList()) {
                setVector(new StringVector("...", ""));
            }

            ObjectList list = ((LimitIntModel) getModel()).getObjectList();

            JPanel box = new JPanel(new ArrayLayout(horizontal, ArrayLayout.FULL_SIZE));
View Full Code Here

Examples of com.nexirius.util.StringVector

*/
public abstract class SingleFieldTranslator implements DatabaseFieldTranslator {
    StringVector fieldNames;

    public SingleFieldTranslator(String fieldName) {
        fieldNames = new StringVector(new String[]{fieldName});
    }
View Full Code Here

Examples of com.nexirius.util.StringVector

                int replacements = 0;

                //System.out.println("JAVA FILE: " + fname);
                ++fcount;
                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

Examples of com.nexirius.util.StringVector

        m_win.enableExitButton(false);
        findAllUnitTests(args);
    }

    public void findAllUnitTests(String[] args) {
        StringVector allFiles = new StringVector();

        // Find all classes specified on the command line
        for (int i = 0; i < args.length; i++) {
            XFile files = new XFile(args[i]);
            if (files.isDirectory()) {
                if (!args[i].endsWith(java.io.File.separator))
                    files = new XFile(args[i] + java.io.File.separator);

                StringVector mostFiles = files.getAllFiles(true);

                String s = mostFiles.firstItem();

                while (s != null) {
                    m_win.tickle();
                    if (s.endsWith(".class")) {
                        s = files.getParent() + java.io.File.separator + s.substring(0, s.indexOf(".class"));
                        s = s.replace(java.io.File.separatorChar, '.');
                        allFiles.append(s);
                    }
                    s = mostFiles.nextItem();
                }
            } else {
                if (args[i].endsWith(".class")) {
                    String s1 = files.getName();
                    String s2 = files.getParent() + java.io.File.separator + s1.substring(0, s1.indexOf(".class"));
View Full Code Here

Examples of com.nexirius.util.StringVector

                System.out.println("JAVA FILE: " + dirname + java.io.File.separator + fname);
                ++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);
                boolean needVersion = false;
                boolean needVersionNow = false;
                boolean versionInserted = false;

                for (String s = sv.firstItem(); s != null; s = sv.nextItem()) {
                    if (removing) {
                        if (s.startsWith(END_HEADER)) {
                            removing = false;
                        }
                    } else {
                        if (s.startsWith(BEGIN_HEADER)) {
                            ++replacements;
                            removing = true;
                        } else {
                            if (needVersionNow) {
                                String vstring = "";
                                if (s.indexOf(VERSION_MEMBER) >= 0) {
                                    s = vstring;
                                } else {
                                    svout.append(vstring);
                                }

                                needVersion = false;
                                needVersionNow = false;
                                versionInserted = true;
                            }

                            if (!versionInserted && s.indexOf("public class ") >= 0) {
                                needVersion = true;
                            }

                            if (needVersion) {
                                if (s.indexOf("{") >= 0) {
                                    needVersionNow = true;
                                }
                            }

                            svout.append(s);
                        }
                    }
                }

                if (replacements > 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.