Examples of characterStyleAt()


Examples of com.ibm.richtext.styledtext.MConstText.characterStyleAt()

            int rangeLimit = fColorer.currentLimit();
           
            AttributeMap style = fColorer.currentStyle();
           
            if (oldText.characterStyleLimit(rangeStart) < rangeLimit ||
                    oldText.characterStyleAt(rangeStart) != style) {
           
                int cstart = rangeStart-start;
                int climit = rangeLimit-start;
                if (newText == null) {
                    newText = new StyledText(oldText, start, limit);
View Full Code Here

Examples of com.ibm.richtext.styledtext.MConstText.characterStyleAt()

                    runStart = fCharacter? text.characterStyleLimit(runStart) :
                                           text.paragraphLimit(runStart)) {
           
                Object runVal;
                if (fCharacter) {
                    runVal = text.characterStyleAt(runStart).get(fKey);
                }
                else {
                    runVal = text.paragraphStyleAt(runStart).get(fKey);
                }
                if (runVal == null) {
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

                }

                if (buf.at(i) != rightChar) {
                    errln("Character is wrong.");
                }
                if (!buf.characterStyleAt(i).equals(rightStyle)) {
                    errln("Style is wrong.");
                }
            }

            int pos = 0;
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

                }
            }

            int pos = 0;

            if (!buf.characterStyleAt(pos).equals(boldStyle)) {
                errln("First style is wrong.");
            }
            if (buf.characterStyleLimit(pos) != allBold.length()) {
                errln("Run length is wrong.");
            }
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

                errln("Run length is wrong.");
            }

            pos = allBold.length();

            if (!buf.characterStyleAt(pos).equals(italicStyle)) {
                errln("Second style is wrong.");
            }
            if (buf.characterStyleLimit(pos) != buf.length()) {
                errln("Run length is wrong.");
            }
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

            pos = buf.length() / 2;
            if (buf.characterStyleStart(pos) != 0 ||
                            buf.characterStyleLimit(pos) != buf.length()) {
                errln("Run range is wrong.");
            }
            if (!buf.characterStyleAt(pos).equals(boldStyle)) {
                errln("Run style is wrong.");
            }

            ts = buf.getTimeStamp();
            CharacterIterator cIter = buf.createCharacterIterator();
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

            }

            buf.replace(plain.length(), plain.length(), allBold, 0, allBold.length());
            // ppppppbbbbbiii

            AttributeMap st = buf.characterStyleAt(1);
            if (!st.equals(AttributeMap.EMPTY_ATTRIBUTE_MAP)) {
                errln("Style is wrong.");
            }
            if (buf.characterStyleStart(1) != 0 || buf.characterStyleLimit(1) != plain.length()) {
                errln("Style start is wrong.");
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

            }
            if (buf.characterStyleStart(1) != 0 || buf.characterStyleLimit(1) != plain.length()) {
                errln("Style start is wrong.");
            }

            st = buf.characterStyleAt(buf.length() - 1);
            if (!st.equals(italicStyle)) {
                errln("Style is wrong.");
            }
            if (buf.characterStyleStart(buf.length() - 1) != plain.length()+allBold.length()) {
                errln("Style start is wrong.");
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

            // check invariants
            AttributeMap oldStyle = null;
            int textLength = text.length();
            for (int runStart = 0; runStart < textLength;) {

                AttributeMap currentStyle = text.characterStyleAt(runStart);
                int runLimit = text.characterStyleLimit(runStart);
                if (runStart >= runLimit) {
                    errln("Run length is not positive");
                }
                if (currentStyle.equals(oldStyle)) {
View Full Code Here

Examples of com.ibm.richtext.styledtext.MText.characterStyleAt()

                if (currentStyle.equals(oldStyle)) {
                    errln("Styles didn't merge");
                }

                for (int pos=runStart; pos < runLimit; pos++) {
                    AttributeMap charStyleAtPos = text.characterStyleAt(pos);
                    if (currentStyle != charStyleAtPos) {
                        errln("Iterator style is not equal to text style at " + pos + ".");
                    }
                    AttributeMap expected = styles[pos];
                    if (!currentStyle.equals(expected)) {
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.