CellDef.trackWidth(..) 추가

master
mjkhan21 4 months ago
parent 674cb492eb
commit 2077a666ab

@ -22,8 +22,15 @@ public class CellDef {
/** 빈 셀 정보 */ /** 빈 셀 정보 */
public static CellDef EMPTY = new CellDef().setLabel("").setField(""); public static CellDef EMPTY = new CellDef().setLabel("").setField("");
public static int[] intArray(int endExclusive) { /** ( < 1) .
return IntStream.range(0, endExclusive).toArray(); * @param defs CellDef
* @return
*/
public static int[] trackWidth(List<CellDef> defs) {
return IntStream
.range(0, defs.size())
.filter(pos -> defs.get(pos).width < 1)
.toArray();
} }
/**CellDef . /**CellDef .

@ -60,7 +60,8 @@ public class Style {
* @return Style * @return Style
*/ */
public Style width(int chars) { public Style width(int chars) {
this.width = chars; if (chars > 0)
this.width = chars;
return this; return this;
} }

Loading…
Cancel
Save