(Properties props, String fileName, String prefix, String logName)
| 1530 | } |
| 1531 | |
| 1532 | private static int[] readTextColors(Properties props, String fileName, String prefix, String logName) |
| 1533 | { |
| 1534 | int[] aint = new int[32]; |
| 1535 | Arrays.fill((int[])aint, (int) - 1); |
| 1536 | int i = 0; |
| 1537 | |
| 1538 | for (Object e: props.keySet()) |
| 1539 | { |
| 1540 | String s = (String) e; |
| 1541 | String s1 = props.getProperty(s); |
| 1542 | |
| 1543 | if (s.startsWith(prefix)) |
| 1544 | { |
| 1545 | String s2 = StrUtils.removePrefix(s, prefix); |
| 1546 | int j = Config.parseInt(s2, -1); |
| 1547 | int k = parseColor(s1); |
| 1548 | |
| 1549 | if (j >= 0 && j < aint.length && k >= 0) |
| 1550 | { |
| 1551 | aint[j] = k; |
| 1552 | ++i; |
| 1553 | } |
| 1554 | else |
| 1555 | { |
| 1556 | warn("Invalid color: " + s + " = " + s1); |
| 1557 | } |
| 1558 | } |
| 1559 | } |
| 1560 | |
| 1561 | if (i <= 0) |
| 1562 | { |
| 1563 | return null; |
| 1564 | } |
| 1565 | else |
| 1566 | { |
| 1567 | dbg(logName + " colors: " + i); |
| 1568 | return aint; |
| 1569 | } |
| 1570 | } |
| 1571 | |
| 1572 | public static int getTextColor(int index, int color) |
| 1573 | { |
no test coverage detected