fixed hiding wiki if null

This commit is contained in:
aj 2019-05-17 16:01:40 +01:00
parent 6328348b22
commit 8180f9c1da
6 changed files with 30 additions and 9 deletions

View File

@ -10,6 +10,7 @@ import sarsoo.fmframework.music.Wiki;
import sarsoo.fmframework.util.Maths;
import javafx.scene.control.*;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
public class AlbumPaneController {
@ -37,6 +38,12 @@ public class AlbumPaneController {
@FXML
private AnchorPane infoAnchorPane;
@FXML
private AnchorPane anchorPane;
@FXML
private GridPane gridPane;
@FXML
public void initialize() {
@ -72,7 +79,7 @@ public class AlbumPaneController {
textAreaWiki.setText(wiki.getContent() + "\n\n" + wiki.getDate());
} else {
// albumBorderPane.setCenter(infoAnchorPane);
anchorPane.getChildren().set(0, gridPane);
}
}

View File

@ -10,6 +10,7 @@ import sarsoo.fmframework.music.Wiki;
import sarsoo.fmframework.util.Maths;
import javafx.scene.control.*;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
public class ArtistPaneController {
@ -34,6 +35,12 @@ public class ArtistPaneController {
@FXML
private AnchorPane infoAnchorPane;
@FXML
private AnchorPane anchorPane;
@FXML
private GridPane gridPane;
@FXML
public void initialize() {
@ -66,7 +73,7 @@ public class ArtistPaneController {
textAreaWiki.setText(wiki.getContent() + "\n\n" + wiki.getDate());
} else {
// artistBorderPane.setCenter(infoAnchorPane);
anchorPane.getChildren().set(0, gridPane);
}
}

View File

@ -10,6 +10,7 @@ import sarsoo.fmframework.music.Wiki;
import sarsoo.fmframework.util.Maths;
import javafx.scene.control.*;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
public class TrackPaneController {
@ -43,6 +44,12 @@ public class TrackPaneController {
@FXML
private AnchorPane infoAnchorPane;
@FXML
private AnchorPane anchorPane;
@FXML
private GridPane gridPane;
@FXML
public void initialize() {
@ -84,7 +91,7 @@ public class TrackPaneController {
textAreaWiki.setText(wiki.getContent() + "\n\n" + wiki.getDate());
} else {
// trackBorderPane.setCenter(infoAnchorPane);
anchorPane.getChildren().set(0, gridPane);
}
if (track.getAlbum() == null) {

View File

@ -7,13 +7,13 @@
<?import javafx.scene.paint.*?>
<?import javafx.scene.text.*?>
<AnchorPane stylesheets="@../styles/mainPane.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.info.AlbumPaneController">
<AnchorPane fx:id="anchorPane" stylesheets="@../styles/mainPane.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.info.AlbumPaneController">
<children>
<SplitPane fx:id="splitPane" dividerPositions="0.5" prefHeight="327.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane fx:id="infoAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<GridPane prefHeight="325.0" prefWidth="296.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<GridPane fx:id="gridPane" prefHeight="325.0" prefWidth="296.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>

View File

@ -7,13 +7,13 @@
<?import javafx.scene.paint.*?>
<?import javafx.scene.text.*?>
<AnchorPane stylesheets="@../styles/mainPane.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.info.ArtistPaneController">
<AnchorPane fx:id="anchorPane" stylesheets="@../styles/mainPane.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.info.ArtistPaneController">
<children>
<SplitPane dividerPositions="0.6983967935871743" prefHeight="327.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane fx:id="infoAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<GridPane prefHeight="325.0" prefWidth="296.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<GridPane fx:id="gridPane" prefHeight="325.0" prefWidth="296.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>

View File

@ -7,13 +7,13 @@
<?import javafx.scene.paint.*?>
<?import javafx.scene.text.*?>
<AnchorPane stylesheets="@../styles/mainPane.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.info.TrackPaneController">
<AnchorPane fx:id="anchorPane" stylesheets="@../styles/mainPane.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.info.TrackPaneController">
<children>
<SplitPane dividerPositions="0.5" prefHeight="327.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane fx:id="infoAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<GridPane prefHeight="325.0" prefWidth="296.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<GridPane fx:id="gridPane" prefHeight="325.0" prefWidth="296.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>