X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FtextEditorComponent%2FTextLine.java;h=835b3e5c4c5506192c8d49dbaa3a1c417ce9e7aa;hb=197ac1b87328bb5b06ba52d3768af04b2007b087;hp=a8a3de6217a45ce20a18bb93cc7e45fbd2354e76;hpb=dcdff57f0bab42387b2e4e215778d9e8efc60221;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java b/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java index a8a3de6..835b3e5 100755 --- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java @@ -1,10 +1,8 @@ /* - * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 3 of the GNU Lesser General Public License - * or later as published by the Free Software Foundation. + * Sixth 3D engine. Author: Svjatoslav Agejenko. + * This project is released under Creative Commons Zero (CC0) license. * +* */ package eu.svjatoslav.sixth.e3d.gui.textEditorComponent; @@ -107,7 +105,7 @@ public class TextLine { return 0; for (int i = 0; i < chars.size(); i++) - if (!chars.get(i).isEmpty()) + if (chars.get(i).hasValue()) return i; throw new RuntimeException("This code shall never execute"); @@ -172,7 +170,7 @@ public class TextLine { int newLength = 0; for (int i = chars.size() - 1; i >= 0; i--) - if (!chars.get(i).isEmpty()) { + if (chars.get(i).hasValue()) { newLength = i + 1; break; }