public void insertRows(final int rowIndex, final int count) { final int maxColumns = getMaxColumns(); final boolean handled[] = new boolean[] { false }; if (rowIndex <= header.rows.size()) { insertRows(header.rows, rowIndex, count, maxColumns); } else { insertRows(body.rows, rangeLimit(rowIndex - header.rows.size() - separator.rows.size(), 0, body.rows.size()), count, maxColumns); } }
public static java.awt.Color mixedColor(java.awt.Color originalColor, java.awt.Color overlayColor) { final float[] hsbColor = java.awt.Color.RGBtoHSB(originalColor.getRed(), originalColor.getGreen(), originalColor.getBlue(), new float[3]); final float[] hsbError = java.awt.Color.RGBtoHSB(overlayColor.getRed(), overlayColor.getGreen(), overlayColor.getBlue(), new float[3]); final float[] hsbMixed = new float[3]; // kotlin code //hsbMixed[0] = hsbError[0] //hsbMixed[1] = hsbColor[1].rangeLimit(hsbError[1].max(0.3f).min(0.5f), 1.0f) //hsbMixed[2] = hsbColor[2].rangeLimit(hsbError[2].max(0.3f).min(0.5f), 1.0f) //return Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]) // incorrect translation from kotlin //hsbMixed[0] = hsbError[0]; //hsbMixed[1] = min(max(rangeLimit(hsbColor[1], hsbError[1], 0.3f), 0.5f), 1.0f); //hsbMixed[2] = min(max(rangeLimit(hsbColor[2], hsbError[2], 0.3f), 0.5f), 1.0f); //return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); hsbMixed[0] = hsbError[0]; hsbMixed[1] = rangeLimit(hsbColor[1], min(max(hsbError[1], 0.3f), 0.5f), 1.0f); hsbMixed[2] = rangeLimit(hsbColor[2], min(max(hsbError[2], 0.3f), 0.5f), 1.0f); return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); } }
public void insertRows(final int rowIndex, final int count) { final int maxColumns = getMaxColumns(); final boolean handled[] = new boolean[] { false }; if (rowIndex <= header.rows.size()) { insertRows(header.rows, rowIndex, count, maxColumns); } else { insertRows(body.rows, rangeLimit(rowIndex - header.rows.size() - separator.rows.size(), 0, body.rows.size()), count, maxColumns); } }
public static java.awt.Color mixedColor(java.awt.Color originalColor, java.awt.Color overlayColor) { final float[] hsbColor = java.awt.Color.RGBtoHSB(originalColor.getRed(), originalColor.getGreen(), originalColor.getBlue(), new float[3]); final float[] hsbError = java.awt.Color.RGBtoHSB(overlayColor.getRed(), overlayColor.getGreen(), overlayColor.getBlue(), new float[3]); final float[] hsbMixed = new float[3]; // kotlin code //hsbMixed[0] = hsbError[0] //hsbMixed[1] = hsbColor[1].rangeLimit(hsbError[1].max(0.3f).min(0.5f), 1.0f) //hsbMixed[2] = hsbColor[2].rangeLimit(hsbError[2].max(0.3f).min(0.5f), 1.0f) //return Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]) // incorrect translation from kotlin //hsbMixed[0] = hsbError[0]; //hsbMixed[1] = min(max(rangeLimit(hsbColor[1], hsbError[1], 0.3f), 0.5f), 1.0f); //hsbMixed[2] = min(max(rangeLimit(hsbColor[2], hsbError[2], 0.3f), 0.5f), 1.0f); //return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); hsbMixed[0] = hsbError[0]; hsbMixed[1] = rangeLimit(hsbColor[1], min(max(hsbError[1], 0.3f), 0.5f), 1.0f); hsbMixed[2] = rangeLimit(hsbColor[2], min(max(hsbError[2], 0.3f), 0.5f), 1.0f); return java.awt.Color.getHSBColor(hsbMixed[0], hsbMixed[1], hsbMixed[2]); } }