Skip to content

Commit

Permalink
Setting a new title on a Panel obliterates the predefined CSS style c…
Browse files Browse the repository at this point in the history
…lass. Fixes #3
  • Loading branch information
aalmiray committed Mar 28, 2018
1 parent 6b6135e commit 2519489
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
11 changes: 7 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ to use the gradle wrapper if available or your global gradle command. This is an

=== Next Steps

. Make a full build issuing `gradle build`.
. Run the sampler application by invoking the following commands
. Make a full build by invoking the following command
[source]
----
$ cd subprojects/sampler
$ gradle run
$ ./gradlew build
----
. Run the sampler application by invoking the following command
[source]
----
$ ./gradlew :sampler:run
----

== Supported CSS Classes
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.2.2
version=0.2.3
group=org.kordamp.bootstrapfx
sourceCompatibility=1.8
targetCompatibility=1.8
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public Panel() {

public Panel(String title) {
this();
Label label = new Label(title);
label.getStyleClass().add("panel-title");
setHeading(label);
setText(title);
}

public final ObjectProperty<Node> headingProperty() {
Expand Down Expand Up @@ -130,7 +128,9 @@ public final Node getFooter() {
}

public void setText(String text) {
headingProperty().set(new Label(text));
Label label = new Label(text);
label.getStyleClass().add("panel-title");
headingProperty().set(label);
}

public String getText() {
Expand All @@ -140,6 +140,4 @@ public String getText() {
}
return null;
}


}

0 comments on commit 2519489

Please sign in to comment.