From: <kon...@us...> - 2010-10-29 02:47:40
|
Revision: 1148 http://cishell.svn.sourceforge.net/cishell/?rev=1148&view=rev Author: kongchinhua Date: 2010-10-29 02:47:34 +0000 (Fri, 29 Oct 2010) Log Message: ----------- - Reuse color if all color been used Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/color/ColorRegistry.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/color/ColorRegistry.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/color/ColorRegistry.java 2010-10-29 02:38:19 UTC (rev 1147) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/color/ColorRegistry.java 2010-10-29 02:47:34 UTC (rev 1148) @@ -70,13 +70,15 @@ } /* - * Return next color index + * Return next color index. This will reuse the color if it out of color */ private int getNextIndex() { int index = currentIndex; - if (currentIndex < colorSchema.size()) { + if (currentIndex < colorSchema.size() - 1) { currentIndex++; + } else { + currentIndex = 0; } return index; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |