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

Panel heading text missing panel-title style #3

Closed
shnplr opened this issue Mar 16, 2016 · 1 comment
Closed

Panel heading text missing panel-title style #3

shnplr opened this issue Mar 16, 2016 · 1 comment
Labels

Comments

@shnplr
Copy link

shnplr commented Mar 16, 2016

Using Panel constructor with title produces label with "panel-title" style, however calling setText() the style is not applied.
A workaround is to call setHeading() passing a Label with "panel-title" added manually so I was wondering if this was intentional?

public Panel(String title) {
    this();
    Label label = new Label(title);
    label.getStyleClass().add("panel-title");
    setHeading(label);
}
public final void setHeading(Node content) {
    this.headingProperty().set(content);
}

/* Label missing style */
public void setText(String text) {
    headingProperty().set(new Label(text));
}
@shnplr
Copy link
Author

shnplr commented Mar 16, 2016

Alternative could be to add new method setTitle(String title)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants