deprecated fmnetwork constructor with username, removed unused imports

This commit is contained in:
aj 2019-02-06 21:05:29 +00:00
parent 6ecf2ad982
commit 6d9212cf7c
13 changed files with 11 additions and 46 deletions

View File

@ -1,7 +1,5 @@
package sarsoo.fmframework.fx;
import java.io.IOException;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
@ -19,7 +17,7 @@ public class FmFramework extends Application {
@Override
public void start(Stage stage) throws Exception {
this.stage = stage;
FmFramework.stage = stage;
Reference.setUserName("sarsoo");
FXMLLoader loader = new FXMLLoader(getClass().getResource("ui/main.fxml"));

View File

@ -4,11 +4,7 @@ import java.io.IOException;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import sarsoo.fmframework.fx.controller.AlbumPaneController;
import sarsoo.fmframework.fx.controller.ScrobbleChartPaneController;
import sarsoo.fmframework.music.Album;
import javafx.fxml.FXMLLoader;
public class ScrobbleChartTab extends Tab {

View File

@ -6,7 +6,7 @@ import java.util.Locale;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import sarsoo.fmframework.fm.FmNetwork;
import sarsoo.fmframework.fm.FmUserNetwork;
import sarsoo.fmframework.fx.ArtistTab;
import sarsoo.fmframework.fx.FmFramework;
import sarsoo.fmframework.music.Album;
@ -103,7 +103,7 @@ public class AlbumPaneController {
}
public void refresh() {
album = new FmNetwork(Key.getKey(), Reference.getUserName()).refresh(album);
album = new FmUserNetwork(Key.getKey(), Reference.getUserName()).refresh(album);
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);

View File

@ -6,7 +6,7 @@ import java.util.Locale;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import sarsoo.fmframework.fm.FmNetwork;
import sarsoo.fmframework.fm.FmUserNetwork;
import sarsoo.fmframework.fx.FMObjListTab;
import sarsoo.fmframework.fx.FmFramework;
import sarsoo.fmframework.music.Artist;
@ -106,7 +106,7 @@ public class ArtistPaneController {
}
public void refresh() {
artist = new FmNetwork(Key.getKey(), Reference.getUserName()).refresh(artist);
artist = new FmUserNetwork(Key.getKey(), Reference.getUserName()).refresh(artist);
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);

View File

@ -141,7 +141,7 @@ public class FMObjListPaneEditController {
public void updateList() {
FmNetwork net = new FmNetwork(Key.getKey(), Reference.getUserName());
FmNetwork net = new FmUserNetwork(Key.getKey(), Reference.getUserName());
FMObjList newList = new FMObjList();
int counter;
@ -249,7 +249,7 @@ public class FMObjListPaneEditController {
@FXML
protected void handleAddTrack(ActionEvent event) {
FmNetwork net = new FmNetwork(Key.getKey(), Reference.getUserName());
FmNetwork net = new FmUserNetwork(Key.getKey(), Reference.getUserName());
String name = textTrack.getText();
String album = textAlbum.getText();
@ -276,7 +276,7 @@ public class FMObjListPaneEditController {
@FXML
protected void handleAddAlbum(ActionEvent event) {
FmNetwork net = new FmNetwork(Key.getKey(), Reference.getUserName());
FmNetwork net = new FmUserNetwork(Key.getKey(), Reference.getUserName());
String album = textAlbum.getText();
String artist = textArtist.getText();
@ -295,7 +295,7 @@ public class FMObjListPaneEditController {
@FXML
protected void handleAddArtist(ActionEvent event) {
FmNetwork net = new FmNetwork(Key.getKey(), Reference.getUserName());
FmNetwork net = new FmUserNetwork(Key.getKey(), Reference.getUserName());
String artist = textArtist.getText();

View File

@ -1,30 +1,16 @@
package sarsoo.fmframework.fx.controller;
import java.io.IOException;
import java.text.NumberFormat;
import java.time.LocalDate;
import java.util.Locale;
import java.util.concurrent.CountDownLatch;
import javax.swing.JOptionPane;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import sarsoo.fmframework.fm.FmNetwork;
import sarsoo.fmframework.fm.FmUserNetwork;
import sarsoo.fmframework.fx.ArtistTab;
import sarsoo.fmframework.fx.FmFramework;
import sarsoo.fmframework.fx.TrackTab;
import sarsoo.fmframework.music.Album;
import sarsoo.fmframework.music.Wiki;
import sarsoo.fmframework.net.Key;
import sarsoo.fmframework.net.Network;
import sarsoo.fmframework.util.Maths;
import sarsoo.fmframework.util.Reference;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.XYChart;
import javafx.scene.control.*;

View File

@ -6,7 +6,7 @@ import java.util.Locale;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import sarsoo.fmframework.fm.FmNetwork;
import sarsoo.fmframework.fm.FmUserNetwork;
import sarsoo.fmframework.fx.AlbumTab;
import sarsoo.fmframework.fx.ArtistTab;
import sarsoo.fmframework.fx.FmFramework;
@ -117,7 +117,7 @@ public class TrackPaneController {
}
public void refresh() {
track = new FmNetwork(Key.getKey(), Reference.getUserName()).refresh(track);
track = new FmUserNetwork(Key.getKey(), Reference.getUserName()).refresh(track);
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);

View File

@ -5,7 +5,6 @@ import java.util.ArrayList;
import org.w3c.dom.Document;
import sarsoo.fmframework.music.Album.AlbumBuilder;
import sarsoo.fmframework.net.Network;
import sarsoo.fmframework.net.URLBuilder;
//import sarsoo.fmframework.net.TestCall;

View File

@ -6,7 +6,6 @@ import java.util.ArrayList;
import org.w3c.dom.Document;
import sarsoo.fmframework.jframe.TrackView;
import sarsoo.fmframework.music.Artist.ArtistBuilder;
import sarsoo.fmframework.net.Network;
import sarsoo.fmframework.net.URLBuilder;
//import sarsoo.fmframework.net.TestCall;

View File

@ -3,7 +3,6 @@ package sarsoo.fmframework.util.tagpool;
import java.util.ArrayList;
import sarsoo.fmframework.fm.FmUserNetwork;
import sarsoo.fmframework.music.Tag;
import sarsoo.fmframework.net.Key;
import sarsoo.fmframework.util.FMObjList;
import sarsoo.fmframework.util.Reference;

View File

@ -1,11 +1,7 @@
package sarsoo.fmframework.fm;
import static org.junit.Assert.*;
import org.junit.Test;
import sarsoo.fmframework.music.Album;
import sarsoo.fmframework.music.Artist;
import sarsoo.fmframework.music.Track;
public class FmNetworkTest {

View File

@ -1,13 +1,7 @@
package sarsoo.fmframework.fm;
import static org.junit.Assert.*;
import org.junit.Test;
import sarsoo.fmframework.music.Artist;
import sarsoo.fmframework.music.FMObj;
import sarsoo.fmframework.util.FMObjList;
public class FmUserNetworkTest {
@Test

View File

@ -1,7 +1,5 @@
package sarsoo.fmframework.util;
import static org.junit.Assert.*;
import org.junit.Test;
public class FMObjListTest {