Package org.apache.pivot.xml

Examples of org.apache.pivot.xml.TextNode


            String categories = "Categories:";
            List<Element> categoryElements = itemElement.getElements("category");
            for (int i = 0, n = categoryElements.getLength(); i < n; i++) {
                Element categoryElement = categoryElements.get(i);
                TextNode categoryTextNode = (TextNode)categoryElement.get(0);
                String category = categoryTextNode.getText();

                if (i > 0) {
                    categories += ", ";
                }
View Full Code Here


            String text;
            if (node instanceof Element) {
                Element element = (Element)node;
                text = "<" + element.getName() + ">";
            } else if (node instanceof TextNode) {
                TextNode textNode = (TextNode)node;
                text = textNode.getText();

                if (text.length() > MAXIMUM_TEXT_LENGTH) {
                    text = "\"" + text.substring(0, MAXIMUM_TEXT_LENGTH) + "\"...";
                } else {
                    text = "\"" + text + "\"";
View Full Code Here

        Node node = (Node)treeView.getSelectedNode();

        if (node == null) {
            // no selection, but it's ok
        } else if (node instanceof TextNode) {
            TextNode textNode = (TextNode)node;
            textArea.setText(textNode.getText());
            propertiesCardPane.setSelectedIndex(1);
        } else if (node instanceof Element) {
            Element element = (Element)node;

            // Populate the namespaces table
View Full Code Here

            String text;
            if (node instanceof Element) {
                Element element = (Element)node;
                text = "<" + element.getName() + ">";
            } else if (node instanceof TextNode) {
                TextNode textNode = (TextNode)node;
                text = textNode.getText();

                if (text.length() > MAXIMUM_TEXT_LENGTH) {
                    text = "\"" + text.substring(0, MAXIMUM_TEXT_LENGTH) + "\"...";
                } else {
                    text = "\"" + text + "\"";
View Full Code Here

        String string;
        if (node instanceof Element) {
            Element element = (Element)node;
            string = element.getName();
        } else if (node instanceof TextNode) {
            TextNode textNode = (TextNode)node;
            string = textNode.getText();
        } else {
            throw new IllegalArgumentException();
        }

        return string;
View Full Code Here

    public void updateProperties() {
        Node node = (Node)treeView.getSelectedNode();

        if (node instanceof TextNode) {
            TextNode textNode = (TextNode)node;
            textArea.setText(textNode.getText());
            propertiesCardPane.setSelectedIndex(1);
        } else if (node instanceof Element) {
            Element element = (Element)node;

            // Populate the namespaces table
View Full Code Here

            String text;
            if (node instanceof Element) {
                Element element = (Element)node;
                text = "<" + element.getName() + ">";
            } else if (node instanceof TextNode) {
                TextNode textNode = (TextNode)node;
                text = textNode.getText();

                if (text.length() > MAXIMUM_TEXT_LENGTH) {
                    text = "\"" + text.substring(0, MAXIMUM_TEXT_LENGTH) + "\"...";
                } else {
                    text = "\"" + text + "\"";
View Full Code Here

        String string;
        if (node instanceof Element) {
            Element element = (Element)node;
            string = element.getName();
        } else if (node instanceof TextNode) {
            TextNode textNode = (TextNode)node;
            string = textNode.getText();
        } else {
            throw new IllegalArgumentException();
        }

        return string;
View Full Code Here

            String categories = "Categories:";
            List<Element> categoryElements = itemElement.getElements("category");
            for (int i = 0, n = categoryElements.getLength(); i < n; i++) {
                Element categoryElement = categoryElements.get(i);
                TextNode categoryTextNode = (TextNode)categoryElement.get(0);
                String category = categoryTextNode.getText();

                if (i > 0) {
                    categories += ", ";
                }
View Full Code Here

    public void updateProperties() {
        Node node = (Node)treeView.getSelectedNode();

        if (node instanceof TextNode) {
            TextNode textNode = (TextNode)node;
            textArea.setText(textNode.getText());
            propertiesCardPane.setSelectedIndex(1);
        } else if (node instanceof Element) {
            Element element = (Element)node;

            // Populate the namespaces table
View Full Code Here

TOP

Related Classes of org.apache.pivot.xml.TextNode

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.