Examples of TextBuilder


Examples of com.ctc.wstx.util.TextBuilder

                throwUnexpectedChar(c, SUFFIX_IN_ELEMENT+" Expected a quote");
            }

            // And then the actual value
            int startLen = -1;
            TextBuilder tb;

            if (prefix == sPrefixXmlns) { // non-default namespace declaration
                tb = ac.getNsBuilder(localName);
                // returns null if it's a dupe:
                if (null == tb) {
                    throwParseError("Duplicate declaration for namespace prefix '"+localName+"'.");
                }
                startLen = tb.getCharSize();
            } else if (localName == sPrefixXmlns && prefix == null) {
                tb = ac.getDefaultNsBuilder();
                // returns null if default ns was already declared
                if (null == tb) {
                    throwParseError("Duplicate default namespace declaration.");
                }
            } else {
                tb = ac.getAttrBuilder(prefix, localName);
            }
            parseAttrValue(c, tb);

            /* 19-Jul-2004, TSa: Need to check that non-default namespace
             *     URI is NOT empty, as per XML namespace specs, #2,
             *    ("...In such declarations, the namespace name may not
             *      be empty.")
             */
            /* (note: startLen is only set to first char position for
             * non-default NS declarations, see above...)
             */
            /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though,
             *   so for xml 1.1 documents we need to allow it
             */
            if (!mXml11) {
                if (startLen >= 0 && tb.getCharSize() == startLen) { // is empty!
                    throwParseError(ErrorConsts.ERR_NS_EMPTY);
                }
            }

            // and then we need to iterate some more
View Full Code Here

Examples of com.ctc.wstx.util.TextBuilder

            } else if (c == '<') {
                throwParseError("Unexpected '<' character in element (missing closing '>'?)");
            }

            String name = parseFullName(c);
            TextBuilder tb = ac.getAttrBuilder(null, name);
            c = (mInputPtr < mInputEnd) ?
                mInputBuffer[mInputPtr++] : getNextCharFromCurrent(SUFFIX_IN_ELEMENT);
            if (c <= CHAR_SPACE) {
                c = getNextInCurrAfterWS(SUFFIX_IN_ELEMENT, c);
            }
View Full Code Here

Examples of com.ctc.wstx.util.TextBuilder

     * initialized
     */
    protected final void allocBuffers()
    {
        if (mValueBuffer == null) {
            mValueBuffer = new TextBuilder(EXP_ATTR_COUNT);
        }
        if (mAttrNames == null) {
            mAttrNames = new StringVector(EXP_ATTR_COUNT);
        }
    }
View Full Code Here

Examples of com.ctc.wstx.util.TextBuilder

                throwUnexpectedChar(c, SUFFIX_IN_ELEMENT+" Expected a quote");
            }

            // And then the actual value
            int startLen = -1;
            TextBuilder tb;

            if (prefix == sPrefixXmlns) { // non-default namespace declaration
                tb = ac.getNsBuilder(localName);
                // returns null if it's a dupe:
                if (null == tb) {
                    throwParseError("Duplicate declaration for namespace prefix '"+localName+"'.");
                }
                startLen = tb.getCharSize();
            } else if (localName == sPrefixXmlns && prefix == DEFAULT_NS_PREFIX) {
                tb = ac.getDefaultNsBuilder();
                // returns null if default ns was already declared
                if (null == tb) {
                    throwParseError("Duplicate default namespace declaration.");
                }
            } else {
                tb = ac.getAttrBuilder(prefix, localName);
            }
            tb.startNewEntry();

            if (mCfgNormalizeAttrs) {
                parseNormalizedAttrValue(c, tb);
            } else {
                parseNonNormalizedAttrValue(c, tb);
            }
            /* 19-Jul-2004, TSa: Need to check that non-default namespace
             *     URI is NOT empty, as per XML namespace specs, #2,
             *    ("...In such declarations, the namespace name may not
             *      be empty.")
             */
            /* (note: startLen is only set to first char position for
             * non-default NS declarations, see above...)
             */
            /* 04-Feb-2005, TSa: Namespaces 1.1 does allow this, though,
             *   so for xml 1.1 documents we need to allow it
             */
            if (!mXml11) {
                if (startLen >= 0 && tb.getCharSize() == startLen) { // is empty!
                    throwParseError(ErrorConsts.ERR_NS_EMPTY);
                }
            }

            // and then we need to iterate some more
View Full Code Here

Examples of com.ctc.wstx.util.TextBuilder

            } else if (c == '<') {
                throwParseError("Unexpected '<' character in element (missing closing '>'?)");
            }

            String name = parseFullName(c);
            TextBuilder tb = ac.getAttrBuilder(null, name);
            c = (mInputPtr < mInputLen) ?
                mInputBuffer[mInputPtr++] : getNextCharFromCurrent(SUFFIX_IN_ELEMENT);
            if (c <= CHAR_SPACE) {
                c = getNextInCurrAfterWS(SUFFIX_IN_ELEMENT, c);
            }
            if (c != '=') {
                throwUnexpectedChar(c, " expected '='");
            }
            c = (mInputPtr < mInputLen) ?
                mInputBuffer[mInputPtr++] : getNextCharFromCurrent(SUFFIX_IN_ELEMENT);
            if (c <= CHAR_SPACE) {
                c = getNextInCurrAfterWS(SUFFIX_IN_ELEMENT, c);
            }

            // And then a quote:
            if (c != '"' && c != '\'') {
                throwUnexpectedChar(c, SUFFIX_IN_ELEMENT+" Expected a quote");
            }

            // And then the actual value
            tb.startNewEntry();

            if (mCfgNormalizeAttrs) {
                parseNormalizedAttrValue(c, tb);
            } else {
                parseNonNormalizedAttrValue(c, tb);
View Full Code Here

Examples of com.ctc.wstx.util.TextBuilder

        // Then attributes, if any:
        int attrLen = ac.getCount();
        if (attrLen > 0) {
            StringVector attrNames = ac.getNameList();
            String[] nameData = attrNames.getInternalArray();
            TextBuilder attrBuilder = ac.getAttrBuilder();
            char[] attrCB = attrBuilder.getCharBuffer();
            for (int i = 0; i < attrLen; ++i) {
                String normValue = mValidator.validateAttribute
                    (nameData[i], null, null, attrCB,
                     attrBuilder.getOffset(i),
                     attrBuilder.getOffset(i+1));
                if (normValue != null) {
                    ac.setNormalizedValue(i, normValue);
                }
            }
        }
View Full Code Here

Examples of de.lessvoid.nifty.builder.TextBuilder

          }});
        }});
        panel(new PanelBuilder() {{
          width("100%");
          childLayoutVertical();
          text(new TextBuilder() {{
            style("base-font-link");
            text("\"Danc's Miraculously Flexible Game Prototyping Tiles\"");
            set("action", "openLink(http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html)");
            textHAlignRight();
            alignRight();
          }});
        }});
        panel(new PanelBuilder() {{
          width("100%");
          childLayoutVertical();
          text(new TextBuilder() {{
            style("base-font");
            text("art by Daniel Cook (Lostgarden.com)");
            textHAlignRight();
            alignRight();
          }});
View Full Code Here

Examples of de.lessvoid.nifty.builder.TextBuilder

          width("856px");
          panel(new PanelBuilder() {{
            width("300px");
            height("256px");
            childLayoutCenter();
            text(new TextBuilder() {{
              text("Nifty 1.3 Core");
              style("base-font");
              alignCenter();
              valignCenter();
              onStartScreenEffect(new EffectBuilder("fade") {{
                length(1000);
                effectValue("time", "1700", "value", "0.0");
                effectValue("time", "2000", "value", "1.0");
                effectValue("time", "2600", "value", "1.0");
                effectValue("time", "3200", "value", "0.0");
                post(false);
                neverStopRendering(true);
              }});
            }});
          }});
          panel(new PanelBuilder() {{
            alignCenter();
            valignCenter();
            childLayoutOverlay();
            width("256px");
            height("256px");
            onStartScreenEffect(new EffectBuilder("shake") {{
              length(250);
              startDelay(1300);
              inherit();
              effectParameter("global", "false");
              effectParameter("distance", "10.");
            }});
            onStartScreenEffect(new EffectBuilder("imageSize") {{
              length(600);
              startDelay(3000);
              effectParameter("startSize", "1.0");
              effectParameter("endSize", "2.0");
              inherit();
              neverStopRendering(true);
            }});
            onStartScreenEffect(new EffectBuilder("fade") {{
              length(600);
              startDelay(3000);
              effectParameter("start", "#f");
              effectParameter("end", "#0");
              inherit();
              neverStopRendering(true);
            }});
            image(new ImageBuilder() {{
              filename("yin.png");
              onStartScreenEffect(new EffectBuilder("move") {{
                length(1000);
                startDelay(300);
                timeType("exp");
                effectParameter("factor", "6.f");
                effectParameter("mode", "in");
                effectParameter("direction", "left");
              }});
            }});
            image(new ImageBuilder() {{
              filename("yang.png");
              onStartScreenEffect(new EffectBuilder("move") {{
                length(1000);
                startDelay(300);
                timeType("exp");
                effectParameter("factor", "6.f");
                effectParameter("mode", "in");
                effectParameter("direction", "right");
              }});
            }});
          }});
          panel(new PanelBuilder() {{
            width("300px");
            height("256px");
            childLayoutCenter();
            text(new TextBuilder() {{
              text("Nifty 1.3 Standard Controls");
              style("base-font");
              alignCenter();
              valignCenter();
              onStartScreenEffect(new EffectBuilder("fade") {{
View Full Code Here

Examples of de.lessvoid.nifty.builder.TextBuilder

              effectParameter("start", "0");
              effectParameter("end", "-3200");
              inherit(true);
            }});
            panel(common.vspacer("800px"));
            text(new TextBuilder() {{
              text("Nifty 1.3");
              style("creditsCaption");
            }});
            text(new TextBuilder() {{
              text("Standard Controls Demonstration using JavaBuilder pattern");
              style("creditsCenter");
            }});
            panel(common.vspacer("30px"));
            text(new TextBuilder() {{
              text("\"Look ma, No XML!\" :)");
              style("creditsCenter");
            }});
            panel(common.vspacer("70px"));
            panel(new PanelBuilder() {{
              width("100%");
              height("256px");
              childLayoutCenter();
              panel(new PanelBuilder() {{
                alignCenter();
                valignCenter();
                childLayoutHorizontal();
                width("656px");
                panel(new PanelBuilder() {{
                  width("200px");
                  height("256px");
                  childLayoutCenter();
                  text(new TextBuilder() {{
                    text("Nifty 1.3 Core");
                    style("base-font");
                    alignCenter();
                    valignCenter();
                  }});
                }});
                panel(new PanelBuilder() {{
                  width("256px");
                  height("256px");
                  alignCenter();
                  valignCenter();
                  childLayoutOverlay();
                  image(new ImageBuilder() {{
                    filename("yin.png");
                  }});
                  image(new ImageBuilder() {{
                    filename("yang.png");
                  }});
                }});
                panel(new PanelBuilder() {{
                  width("200px");
                  height("256px");
                  childLayoutCenter();
                  text(new TextBuilder() {{
                    text("Nifty 1.3 Standard Controls");
                    style("base-font");
                    alignCenter();
                    valignCenter();
                  }});
                }});
              }});
            }});
            panel(common.vspacer("70px"));
            text(new TextBuilder() {{
              text("written and performed\nby void");
              style("creditsCenter");
            }});
            panel(common.vspacer("100px"));
            text(new TextBuilder() {{
              text("Sound Credits");
              style("creditsCaption");
            }});
            text(new TextBuilder() {{
              text("This demonstration uses creative commons licenced sound samples\nand music from the following sources");
              style("creditsCenter");
            }});
            panel(common.vspacer("30px"));
            image(new ImageBuilder() {{
              style("creditsImage");
              filename("freesound.png");
            }});
            panel(common.vspacer("25px"));
            text(new TextBuilder() {{
              text("19546__tobi123__Gong_mf2.wav");
              style("creditsCenter");
            }});
            panel(common.vspacer("50px"));
            image(new ImageBuilder() {{
              style("creditsImage");
              filename("cc-mixter-logo.png");
              set("action", "openLink(http://ccmixter.org/)");
            }});
            panel(common.vspacer("25px"));
            text(new TextBuilder() {{
              text("\"Almost Given Up\" by Loveshadow");
              style("creditsCenter");
            }});
            panel(common.vspacer("100px"));
            text(new TextBuilder() {{
              text("Additional Credits");
              style("creditsCaption");
            }});
            text(new TextBuilder() {{
              text("ueber awesome Yin/Yang graphic by Dori\n(http://www.nadori.de)\n\nThanks! :)");
              style("creditsCenter");
            }});
            panel(common.vspacer("100px"));
            text(new TextBuilder() {{
              text("Special thanks go to");
              style("creditsCaption");
            }});
            text(new TextBuilder() {{
              text(
                  "The following people helped creating Nifty with valuable feedback,\nfixing bugs or sending patches.\n(in no particular order)\n\n" +
                  "chaz0x0\n" +
                  "Tumaini\n" +
                  "arielsan\n" +
                  "gaba1978\n" +
                  "ractoc\n" +
                  "bonechilla\n" +
                  "mdeletrain\n" +
                  "mulov\n" +
                  "gouessej\n");
              style("creditsCenter");
            }});
            panel(common.vspacer("75px"));
            text(new TextBuilder() {{
              text("Greetings and kudos go out to");
              style("creditsCaption");
            }});
            text(new TextBuilder() {{
              text(
                  "Ariel Coppes and Ruben Garat of Gemserk\n(http://blog.gemserk.com/)\n\n\n" +
                  "Erlend, Kirill, Normen, Skye and Ruth of jMonkeyEngine\n(http://www.jmonkeyengine.com/home/)\n\n\n" +
                  "Brian Matzon, Elias Naur, Caspian Rychlik-Prince for lwjgl\n(http://www.lwjgl.org/\n\n\n" +
                  "KappaOne, MatthiasM, aho, Dragonene, darkprophet, appel, woogley, Riven, NoobFukaire\nfor valuable input and discussions at #lwjgl IRC on the freenode network\n\n\n" +
View Full Code Here

Examples of javolution.text.TextBuilder

                        showChatWindow(player, 3, "c", false);
                    else
                        showChatWindow(player, 3, "d", false);
                    break;
                case 4: // Current High Scores
                    TextBuilder strBuffer = new TextBuilder("<html><body>Festival Guide:<br>These are the top scores of the week, for the ");

                    final StatsSet dawnData = SevenSignsFestival.getInstance().getHighestScoreData(SevenSigns.CABAL_DAWN, _festivalType);
                    final StatsSet duskData = SevenSignsFestival.getInstance().getHighestScoreData(SevenSigns.CABAL_DUSK, _festivalType);
                    final StatsSet overallData = SevenSignsFestival.getInstance().getOverallHighestScoreData(_festivalType);

                    final int dawnScore = dawnData.getInteger("score");
                    final int duskScore = duskData.getInteger("score");
                    int overallScore = 0;

                    // If no data is returned, assume there is no record, or all scores are 0.
                    if (overallData != null)
                        overallScore = overallData.getInteger("score");

                    strBuffer.append(SevenSignsFestival.getFestivalName(_festivalType) + " festival.<br>");

                    if (dawnScore > 0)
                        strBuffer.append("Dawn: " + calculateDate(dawnData.getString("date")) + ". Score " + dawnScore + "<br>" + dawnData.getString("members") + "<br>");
                    else
                        strBuffer.append("Dawn: No record exists. Score 0<br>");

                    if (duskScore > 0)
                        strBuffer.append("Dusk: " + calculateDate(duskData.getString("date")) + ". Score " + duskScore + "<br>" + duskData.getString("members") + "<br>");
                    else
                        strBuffer.append("Dusk: No record exists. Score 0<br>");

                    if (overallScore > 0) {
                        String cabalStr = "Children of Dusk";

                        if (overallData.getString("cabal").equals("dawn"))
                            cabalStr = "Children of Dawn";

                        strBuffer.append("Consecutive top scores: " + calculateDate(overallData.getString("date")) + ". Score " + overallScore + "<br>Affilated side: " + cabalStr + "<br>" + overallData.getString("members") + "<br>");
                    }
                    else
                        strBuffer.append("Consecutive top scores: No record exists. Score 0<br>");

                    strBuffer.append("<a action=\"bypass -h npc_" + getObjectId() + "_Chat 0\">Go back.</a></body></html>");

                    NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
                    html.setHtml(strBuffer.toString());
                    player.sendPacket(html);
                    break;
                case 8: // Increase the Festival Challenge
                    if (playerParty == null)
                        return;
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.