tag menu disabled until loaded, console uneditable, scrobble scrollpane
This commit is contained in:
parent
e3309746fd
commit
3bc0cdcc63
@ -12,6 +12,7 @@ public class TextAreaConsole implements Console{
|
||||
|
||||
private TextAreaConsole() {
|
||||
output = new TextArea();
|
||||
output.setEditable(false);
|
||||
}
|
||||
|
||||
public static TextAreaConsole getInstance(){
|
||||
|
@ -141,6 +141,7 @@ public class RootController {
|
||||
@Override
|
||||
public void run() {
|
||||
menuTag.getItems().setAll((ArrayList<MenuItem>) t.getSource().getValue());
|
||||
menuTag.setDisable(false);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -38,7 +38,7 @@ public class ScrobblesViewPaneController {
|
||||
|
||||
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.UK);
|
||||
|
||||
// gridPane.getChildren().clear();
|
||||
gridPane.getChildren().clear();
|
||||
|
||||
int counter;
|
||||
for (counter = 0; counter < scrobbles.size(); counter++) {
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
<AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sarsoo.fmframework.fx.controller.ScrobblesViewPaneController">
|
||||
<children>
|
||||
<SplitPane fx:id="splitPane" dividerPositions="0.4909819639278557" prefHeight="160.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<SplitPane fx:id="splitPane" dividerPositions="0.4909819639278557" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<items>
|
||||
<AnchorPane>
|
||||
<children>
|
||||
<GridPane fx:id="gridPane" prefHeight="798.0" prefWidth="486.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<ScrollPane fitToHeight="true" fitToWidth="true" prefViewportHeight="158.0" prefViewportWidth="93.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<content>
|
||||
<GridPane fx:id="gridPane" 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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
@ -22,8 +22,8 @@
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
</GridPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</content>
|
||||
</ScrollPane>
|
||||
<AnchorPane fx:id="areaChartAnchorPane" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
|
||||
<children>
|
||||
<AreaChart fx:id="areaChart" layoutX="-93.0" layoutY="69.0" prefHeight="798.0" prefWidth="504.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
|
@ -30,7 +30,7 @@
|
||||
<MenuItem fx:id="menuItemGenrePieChartTab" mnemonicParsing="false" onAction="#handleGenrePieTab" text="genre pie chart" />
|
||||
</items>
|
||||
</Menu>
|
||||
<Menu fx:id="menuTag" mnemonicParsing="false" text="tags" />
|
||||
<Menu fx:id="menuTag" disable="true" mnemonicParsing="false" text="tags" />
|
||||
<Menu fx:id="menuUtil" mnemonicParsing="false" text="util">
|
||||
<items>
|
||||
<MenuItem fx:id="menuItemScrobble" mnemonicParsing="false" onAction="#handleScrobble" text="scrobble" />
|
||||
|
@ -28,34 +28,46 @@ public class FmUserNetworkTest {
|
||||
@Test
|
||||
public void testGetRecentTracks() {
|
||||
FmUserNetwork net = new FmUserNetwork(Key.getKey(), "sarsoo");
|
||||
ArrayList<Scrobble> scrobbles = net.getRecentScrobbles(50);
|
||||
|
||||
int limit = 50;
|
||||
|
||||
ArrayList<Scrobble> scrobbles = net.getRecentScrobbles(limit);
|
||||
// scrobbles.stream().forEach(System.out::println);
|
||||
System.out.println(scrobbles.size());
|
||||
assertNotNull(1);
|
||||
assertEquals(limit, scrobbles.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTopAlbums() {
|
||||
FmUserNetwork net = new FmUserNetwork(Key.getKey(), "sarsoo");
|
||||
FMObjList list = net.getTopAlbums("7day", 15);
|
||||
|
||||
int limit = 50;
|
||||
|
||||
FMObjList list = net.getTopAlbums("7day", limit);
|
||||
// list.stream().forEach(System.out::println);
|
||||
assertEquals(15, list.size());
|
||||
assertEquals(limit, list.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTopArtists() {
|
||||
FmUserNetwork net = new FmUserNetwork(Key.getKey(), "sarsoo");
|
||||
FMObjList list = net.getTopArtists("7day", 15);
|
||||
|
||||
int limit = 50;
|
||||
|
||||
FMObjList list = net.getTopArtists("7day", limit);
|
||||
// list.stream().forEach(System.out::println);
|
||||
assertEquals(15, list.size());
|
||||
assertEquals(limit, list.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetTopTracks() {
|
||||
FmUserNetwork net = new FmUserNetwork(Key.getKey(), "sarsoo");
|
||||
FMObjList list = net.getTopTracks("7day", 15);
|
||||
|
||||
int limit = 50;
|
||||
|
||||
FMObjList list = net.getTopTracks("7day", limit);
|
||||
// list.stream().forEach(System.out::println);
|
||||
assertEquals(15, list.size());
|
||||
assertEquals(limit, list.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user