1
0
Fork 0

Kinda working LibraryManager but requires initialized graphics

master
Ambrose Chua 2015-10-14 16:47:50 +08:00
parent 241b361c9a
commit 5234de8abf
8 changed files with 136 additions and 98 deletions

View File

@ -6,18 +6,14 @@
</artifacts-to-build>
</component>
<component name="ChangeListManager">
<list default="true" id="cdb932d9-7e58-4d94-93a9-e7b232ef17da" name="Default" comment="#how2[[[null (null, null), null (null, null), null (null, null), null (null, null)], [null (null, null), null (null, null), null (null, null), null (null, null)]], [[], []]]&#10;">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/util/LibraryManager.java" />
<change type="MOVED" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Util.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/util/Util.java" />
<list default="true" id="cdb932d9-7e58-4d94-93a9-e7b232ef17da" name="Default" comment="JSON parsing now implemented. Let's try!">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Album.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Album.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Artist.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Artist.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/view/CoverListController.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/view/CoverListController.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/view/InterfaceController.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/view/InterfaceController.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/ItemList.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/model/ItemList.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Library.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Library.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/util/LibraryManager.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/util/LibraryManager.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/util/TestClasses.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/util/TestClasses.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Track.java" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/model/Track.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/io/makerforce/undefined/view/coverlist.fxml" afterPath="$PROJECT_DIR$/src/io/makerforce/undefined/view/coverlist.fxml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="JavaFxApplication.iws" />
@ -78,7 +74,35 @@
<favorites_list name="JavaFxApplication" />
</component>
<component name="FileEditorManager">
<leaf />
<leaf>
<file leaf-file-name="JSONLibrary.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="9" column="48" selection-start-line="9" selection-start-column="48" selection-end-line="9" selection-end-column="48" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#198#199#0" expanded="true" />
<element signature="e#232#233#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CoverItemController.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/view/CoverItemController.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.8666667">
<caret line="42" column="19" selection-start-line="42" selection-start-column="19" selection-end-line="42" selection-end-column="19" />
<folding>
<element signature="e#1279#1280#0" expanded="true" />
<element signature="e#1329#1330#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
@ -146,12 +170,12 @@
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/util/JSONLibrary.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/ItemList.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/util/TestClasses.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/util/LibraryManager.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/Library.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/Track.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/Artist.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/Album.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/Artist.java" />
<option value="$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java" />
</list>
</option>
</component>
@ -356,7 +380,7 @@
<property name="FullScreen" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
<property name="restartRequiresConfirmation" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
<property name="settings.editor.selected.configurable" value="configurable.group.language" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="project.structure.last.edited" value="Artifacts" />
<property name="project.structure.proportion" value="0.15" />
@ -708,7 +732,7 @@
<workItem from="1444622643506" duration="749000" />
<workItem from="1444628999813" duration="21183000" />
<workItem from="1444700132845" duration="8032000" />
<workItem from="1444804563726" duration="6109000" />
<workItem from="1444804563726" duration="7675000" />
</task>
<task id="LOCAL-00001" summary="Initial Commit">
<created>1444218455154</created>
@ -788,11 +812,17 @@
<option name="project" value="LOCAL" />
<updated>1444807971062</updated>
</task>
<option name="localTasksCounter" value="14" />
<task id="LOCAL-00014" summary="JSON parsing now implemented. Let's try!">
<created>1444810812117</created>
<option name="number" value="00014" />
<option name="project" value="LOCAL" />
<updated>1444810812117</updated>
</task>
<option name="localTasksCounter" value="15" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="66709000" />
<option name="totallyTimeSpent" value="68275000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -809,16 +839,16 @@
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32872504" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23142858" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23142858" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32931423" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.26714286" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25285715" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25285715" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20996979" sideWeight="0.6703755" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20996979" sideWeight="0.6703755" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24982457" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -860,7 +890,8 @@
<MESSAGE value="TrackList" />
<MESSAGE value="Random commit&#10;" />
<MESSAGE value="#HowToDeprecateYourClassesYouWrote1SecondAgo" />
<option name="LAST_COMMIT_MESSAGE" value="#HowToDeprecateYourClassesYouWrote1SecondAgo" />
<MESSAGE value="JSON parsing now implemented. Let's try!" />
<option name="LAST_COMMIT_MESSAGE" value="JSON parsing now implemented. Let's try!" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
@ -1193,17 +1224,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/view/CoverItemController.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.74545455">
<caret line="42" column="19" selection-start-line="42" selection-start-column="19" selection-end-line="42" selection-end-column="19" />
<folding>
<element signature="e#1279#1280#0" expanded="true" />
<element signature="e#1329#1330#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/view/coveritem.fxml">
<provider editor-type-id="JavaFX-Scene-Builder">
<state />
@ -1238,17 +1258,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.31015038">
<caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding>
<element signature="e#162#163#0" expanded="true" />
<element signature="e#186#187#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider editor-type-id="MultiMarkdownFxHtmlEditor">
<state />
@ -1263,89 +1272,102 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/util/TestClasses.java">
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/view/InterfaceController.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.43333334">
<caret line="22" column="29" selection-start-line="22" selection-start-column="29" selection-end-line="22" selection-end-column="29" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/Track.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.29411766">
<caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
<state vertical-scroll-proportion="0.33529413">
<caret line="85" column="76" selection-start-line="85" selection-start-column="76" selection-end-line="85" selection-end-column="76" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/Album.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.38235295">
<caret line="13" column="12" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="12" />
<state vertical-scroll-proportion="0.4848485">
<caret line="20" column="8" selection-start-line="20" selection-start-column="8" selection-end-line="20" selection-end-column="8" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#209#210#0" expanded="true" />
<element signature="e#232#233#0" expanded="true" />
<element signature="e#296#297#0" expanded="true" />
<element signature="e#341#342#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/Artist.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.4117647">
<caret line="14" column="4" selection-start-line="14" selection-start-column="4" selection-end-line="14" selection-end-column="4" />
<state vertical-scroll-proportion="0.45454547">
<caret line="20" column="44" selection-start-line="20" selection-start-column="44" selection-end-line="20" selection-end-column="44" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#211#212#0" expanded="true" />
<element signature="e#234#235#0" expanded="true" />
<element signature="e#284#285#0" expanded="true" />
<element signature="e#272#273#0" expanded="true" />
<element signature="e#295#296#0" expanded="true" />
<element signature="e#345#346#0" expanded="true" />
<element signature="e#382#383#0" expanded="true" />
<element signature="e#804#805#0" expanded="true" />
<element signature="e#842#843#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/Library.java">
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/util/TestClasses.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.2647059">
<caret line="9" column="15" selection-start-line="9" selection-start-column="15" selection-end-line="9" selection-end-column="15" />
<state vertical-scroll-proportion="0.5151515">
<caret line="19" column="25" selection-start-line="19" selection-start-column="25" selection-end-line="19" selection-end-column="25" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#214#215#0" expanded="true" />
<element signature="e#237#238#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/util/LibraryManager.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.5882353">
<caret line="28" column="63" selection-start-line="28" selection-start-column="63" selection-end-line="28" selection-end-column="63" />
<state vertical-scroll-proportion="1.4767677">
<caret line="83" column="44" selection-start-line="83" selection-start-column="44" selection-end-line="83" selection-end-column="44" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1820#1821#0" expanded="true" />
<element signature="e#1851#1852#0" expanded="true" />
<element signature="e#3710#3711#0" expanded="true" />
<element signature="e#3750#3751#0" expanded="true" />
<element signature="e#3786#3787#0" expanded="true" />
<element signature="e#3821#3822#0" expanded="true" />
<element signature="e#1788#1789#0" expanded="true" />
<element signature="e#1812#1813#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/view/InterfaceController.java">
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/Track.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.33529413">
<caret line="85" column="76" selection-start-line="85" selection-start-column="76" selection-end-line="85" selection-end-column="76" />
<state vertical-scroll-proportion="0.65858585">
<caret line="36" column="38" selection-start-line="36" selection-start-column="38" selection-end-line="36" selection-end-column="38" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/Library.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.33333334">
<caret line="16" column="93" selection-start-line="16" selection-start-column="93" selection-end-line="16" selection-end-column="93" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/model/JSONLibrary.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="9" column="48" selection-start-line="9" selection-start-column="48" selection-end-line="9" selection-end-column="48" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#198#199#0" expanded="true" />
<element signature="e#232#233#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/io/makerforce/undefined/view/CoverItemController.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.8666667">
<caret line="42" column="19" selection-start-line="42" selection-start-column="19" selection-end-line="42" selection-end-column="19" />
<folding>
<element signature="e#1279#1280#0" expanded="true" />
<element signature="e#1329#1330#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>

View File

@ -4,6 +4,8 @@ import javafx.collections.ObservableList;
import javafx.scene.image.Image;
import org.json.JSONObject;
import java.net.URL;
public class Album extends ItemList<Track> {
public Album() {
@ -14,10 +16,10 @@ public class Album extends ItemList<Track> {
super(picture, title, artist);
}
public Album(JSONObject o, String albumName, String artistName) {
this(new Image(o.getString("picture")), albumName, artistName);
public Album(JSONObject o, String albumName, String artistName, URL endPoint) {
this(new Image(endPoint.toString() + o.getString("picture")), albumName, artistName);
o.getJSONObject("tracks").keySet().forEach((key) -> {
Track a = new Track(o.getJSONObject("tracks").getJSONObject(key)); //, key, albumName, artistName);
Track a = new Track(o.getJSONObject("tracks").getJSONObject(key), endPoint); //, key, albumName, artistName);
super.getItems().add(a);
});
}

View File

@ -4,6 +4,8 @@ import javafx.collections.ObservableList;
import javafx.scene.image.Image;
import org.json.JSONObject;
import java.net.URL;
public class Artist extends ItemList<Album> {
public Artist() {
@ -14,10 +16,10 @@ public class Artist extends ItemList<Album> {
super(picture, title);
}
public Artist(JSONObject o, String artistName) {
this(new Image(o.getString("picture")), artistName);
public Artist(JSONObject o, String artistName, URL endPoint) {
this(new Image(endPoint.toString() + o.getString("picture")), artistName);
o.getJSONObject("albums").keySet().forEach((key) -> {
Album a = new Album(o.getJSONObject("albums").getJSONObject(key), key, artistName);
Album a = new Album(o.getJSONObject("albums").getJSONObject(key), key, artistName, endPoint);
super.getItems().add(a);
});
}

View File

@ -2,11 +2,13 @@ package io.makerforce.undefined.model;
import org.json.JSONObject;
import java.net.URL;
@Deprecated
public class JSONLibrary extends Library {
public JSONLibrary(JSONObject o) {
super(o);
public JSONLibrary(JSONObject o, URL endPoint) {
super(o, endPoint);
}
}

View File

@ -3,16 +3,18 @@ package io.makerforce.undefined.model;
import javafx.collections.ObservableList;
import org.json.JSONObject;
import java.net.URL;
public class Library extends ItemList<Artist> {
public Library() {
super();
}
public Library(JSONObject o) {
public Library(JSONObject o, URL endPoint) {
this();
o.getJSONObject("artists").keySet().forEach((key) -> {
Artist a = new Artist(o.getJSONObject("artists").getJSONObject(key), key);
Artist a = new Artist(o.getJSONObject("artists").getJSONObject(key), key, endPoint);
super.getItems().add(a);
});
}

View File

@ -25,16 +25,16 @@ public class Track implements Item {
}
public Track(JSONObject track) {
public Track(JSONObject track, URL endPoint) {
this();
title = track.getString("title");
try {
file = new URL(track.getString("file"));
file = new URL(endPoint.toString() + track.getString("file"));
} catch (MalformedURLException e) {
e.printStackTrace();
file = null;
}
picture = new Image(track.getString("picture"));
picture = new Image(endPoint + track.getString("picture"));
artist = track.getString("artist");
album = track.getString("album");
year = track.getString("year");

View File

@ -49,6 +49,10 @@ public class LibraryManager extends SimpleObjectProperty<LibraryManager.LibraryM
}
}
public Library getLibrary() {
return l;
}
public URL getEndPoint() {
return endPoint;
}
@ -77,7 +81,7 @@ public class LibraryManager extends SimpleObjectProperty<LibraryManager.LibraryM
in.close();
JSONObject obj = new JSONObject(response.toString());
l = new Library(obj);
l = new Library(obj, endPoint);
this.set(READY);
} catch (IOException e) {

View File

@ -31,6 +31,10 @@ public class TestClasses {
System.out.println(l.toString()); // Should print [[[null (null, null), null (null, null), null (null, null), null (null, null)], [null (null, null), null (null, null), null (null, null), null (null, null)]], [[], []]]
LibraryManager a = new LibraryManager();
a.update();
System.out.println(a.getLibrary());
}
}