Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLTableCell.createEmptyCell() with column span? #29

Closed
fheldt opened this issue May 3, 2023 · 5 comments
Closed

PLTableCell.createEmptyCell() with column span? #29

fheldt opened this issue May 3, 2023 · 5 comments
Assignees

Comments

@fheldt
Copy link

fheldt commented May 3, 2023

PLTableCell.createEmptyCell() is quite handy but it is currently not possible to define a column span.

How about a variant like PLTableCell.createEmptyCell(int colspan)?

So instead of writing

plTable.addRow(PLTableCell.createEmptyCell(), PLTableCell.createEmptyCell(), PLTableCell.createEmptyCell(), ...)

just

plTable.addRow(PLTableCell.createEmptyCell(3), ...)

@phax phax self-assigned this May 3, 2023
@phax
Copy link
Owner

phax commented May 3, 2023

That's a quicky - sure :)

phax added a commit that referenced this issue May 3, 2023
@phax
Copy link
Owner

phax commented May 3, 2023

Part of the next 7.0.1 release

@phax phax closed this as completed May 3, 2023
@fheldt
Copy link
Author

fheldt commented May 3, 2023

Nice and thanks for that but I meant something slightly different:

with new PLTableCell(new PLText("xyz", font), 5) I can create a cell spanning over 5 columns which is eg useful to create a summary row.

PLTableCell.createEmptyCells(5) creates an array of 5 empty cells (which is of course sometimes also useful)

@fheldt
Copy link
Author

fheldt commented May 3, 2023

So why not just adding this:

@Nonnull public static PLTableCell createEmptyCell (int colspan) { return new PLTableCell (new PLSpacerX (), colspan); }

@phax phax reopened this May 3, 2023
phax added a commit that referenced this issue May 3, 2023
@phax
Copy link
Owner

phax commented May 3, 2023

@fheldt you are absolutely right - reduces the amount of objects needed :)

@phax phax closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants