Examples of firstItem()


Examples of com.nexirius.util.StringVector.firstItem()

    public SortedVector getAll(Class cl, String propertyName, String propertyValue) {
        SortedVector ret = new DataModelVector();
        try {
            XFile dir = getDirectory(cl);
            StringVector files = dir.getFiles(false); // get the list of all the files in this directory
            for (String id = files.firstItem(); id != null; id = files.nextItem()) {
                DataModel model = (DataModel) cl.newInstance(); //create a new instance of the given type
                XFile file = new XFile(dir.getPath(), id);
                model.dropData(new String(file.getBytes()));
                model.setInstanceName(id);
                if (propertyValue == null || propertyValue.equals(model.getChildText(propertyName))) {
View Full Code Here

Examples of com.nexirius.util.StringVector.firstItem()

            appendLine(renderHTML, result, HTMLFunction.PARAMETER_ISEDITOR  + "=" + sessionVariable.isEditor());
            appendLine(renderHTML, result, HTMLFunction.PARAMETER_SELECTED  + "=" + sessionVariable.getSelectedChildren());
            appendLine(renderHTML, result, HTMLFunction.PARAMETER_STATE  + "=" + sessionVariable.getState());
            appendLine(renderHTML, result, HTMLFunction.PARAMETER_TEMPLATE  + "=" + sessionVariable.getTemplate());

            for (String s = variableNames.firstItem(); s != null; s = variableNames.nextItem()) {
                appendLine(renderHTML, result, "VARIABLE " + s + ": " + resolver.getVariableStore().getValueOf(s));
            }
            if (renderHTML) {
                result.append("</table>");
            } else {
View Full Code Here

Examples of com.nexirius.util.StringVector.firstItem()

                if (icon != null) {
                    qpanel.add(new JLabel(icon));
                }

                for (s = sv.firstItem(); s != null; s = sv.nextItem()) {
                    qpanel.add(new JLabel(s));
                }

                q = qpanel;
            } else {
View Full Code Here

Examples of com.nexirius.util.StringVector.firstItem()

    public void readEntries(String filename) throws Exception {
        XFile file = new XFile(filename);

        StringVector lines = file.getTextLines();

        for (String line = lines.firstItem(); line != null; line = lines.nextItem()) {
            EntryModel entry = new EntryModel();

            if (entry.parse(line)) {
                sortInsert(entry);
            }
View Full Code Here

Examples of com.nexirius.util.StringVector.firstItem()

        // find locale files
        XFile directory = new XFile(getDirectory(fileName));
        StringVector files = directory.getFiles(true, "*.properties");
        String baseFileName = getBaseFileName(fileName);

        for (String localeFile = files.firstItem(); localeFile != null; localeFile = files.nextItem()) {
            localeFile = getDirectory(fileName) + localeFile;
            if (XString.match(baseFileName + "_*", localeFile)) {
                String extension = getBaseFileName(localeFile).substring(baseFileName.length() + 1);
                parseLocaleFile(localeFile, extension);
            }
View Full Code Here

Examples of com.nexirius.util.StringVector.firstItem()

    private void parseLocaleFile(String localeFile, String locale) throws Exception {
        XFile file = new XFile(localeFile);
        StringVector lines = file.getTextLines();

        for (String line = lines.firstItem(); line != null; line = lines.nextItem()) {
            EntryModel newEntry = new EntryModel();

            newEntry.parse(line);

            entryArray.addLocaleEntry(locale, newEntry);
View Full Code Here

Examples of org.joshy.sketch.canvas.Selection.firstItem()

            .add(all_name));
        EventBus.getSystem().addListener(all_name, ActionEvent.Action, new Callback<Event>() {
             public void call(Event event) throws Exception {
                 Selection sel = ctx.getSelection();
                 if (sel.size() == 1) {
                     SNode n = sel.firstItem();
                     n.setId(all_name.getText());
                 }
             }
         });
View Full Code Here

Examples of org.joshy.sketch.canvas.Selection.firstItem()

        all_cache = new Checkbox("cache");
        EventBus.getSystem().addListener(all_cache, ActionEvent.Action, new Callback<Event>() {
            public void call(Event event) throws Exception {
                Selection sel = ctx.getSelection();
                if (sel.size() == 1) {
                    SNode n = sel.firstItem();
                    n.setBooleanProperty("com.joshondesign.amino.nodecache",all_cache.isSelected());
                }
            }
        });
        propsPanel.add(all_cache);
View Full Code Here

Examples of org.joshy.sketch.canvas.Selection.firstItem()

        all_cache_image = new Checkbox("cache as image");
        EventBus.getSystem().addListener(all_cache_image, ActionEvent.Action, new Callback<Event>() {
            public void call(Event event) throws Exception {
                Selection sel = ctx.getSelection();
                if (sel.size() == 1) {
                    SNode n = sel.firstItem();
                    n.setBooleanProperty("com.joshondesign.amino.nodecacheimage",all_cache_image.isSelected());
                }
            }
        });
        propsPanel.add(all_cache_image);
View Full Code Here

Examples of org.joshy.sketch.canvas.Selection.firstItem()

        bitmap_text = new Checkbox("use bitmap text");
        EventBus.getSystem().addListener(bitmap_text, ActionEvent.Action, new Callback<Event>() {
            public void call(Event event) throws Exception {
                Selection sel = ctx.getSelection();
                if (sel.size() == 1) {
                    SNode n = sel.firstItem();
                    n.setBooleanProperty("com.joshondesign.amino.bitmaptext",bitmap_text.isSelected());
                }
            }
        });
        propsPanel.add(bitmap_text);
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.