in PStyledText,

                if (token.equals("\n")) {
                    if (lastNewLine) {
                        stringContents.add(new AttributedString(" "));
                        pEnds.add(new RunInfo(pos, pos + 1));

                        pos = pos + 1;

                        lastNewLine = true;
                    }
                    else {
                        pos = pos + 1;

                        lastNewLine = true;
                    }
                }

can be simplified to be:

                if (token.equals("\n")) {
                    if (lastNewLine) {
                        stringContents.add(new AttributedString(" "));
                        pEnds.add(new RunInfo(pos, pos + 1));
                    }
                    pos = pos + 1;
                    lastNewLine = true;
                }
--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to