Skip to content

Commit

Permalink
Very BIG Update 83 Released
Browse files Browse the repository at this point in the history
Huge changed huge .... try it!
  • Loading branch information
goxr3plus committed Sep 14, 2017
1 parent e560e99 commit 9624187
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 47 deletions.
2 changes: 1 addition & 1 deletion resources/fxml/LibraryMode.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<Cursor fx:constant="HAND" />
</cursor>
</Button>
<Button fx:id="openOrCloseLibrary" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="35.0" prefWidth="191.0" text="Open Selected Library" textAlignment="CENTER" wrapText="true">
<Button fx:id="openOrCloseLibrary" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" prefHeight="35.0" prefWidth="130.0" text="OPEN" textAlignment="CENTER" wrapText="true">
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
Expand Down
4 changes: 2 additions & 2 deletions resources/fxml/XPlayerEqualizer.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<HBox fx:id="bottomHBox" alignment="CENTER" maxHeight="-Infinity" prefHeight="30.0" spacing="10.0">
<children>
<Label fx:id="filterValueLabel" alignment="CENTER" prefHeight="21.0" prefWidth="61.0" styleClass="applicationSettingsLabel2" text="0.0" />
<MenuButton mnemonicParsing="false" style="-fx-font-size: 11;" text="More">
<MenuButton mnemonicParsing="false" style="-fx-font-size: 11;" text="Tools">
<items>
<Menu fx:id="presets" mnemonicParsing="false" text="Presets" />
<Menu fx:id="presets" mnemonicParsing="false" text="Presets" visible="false" />
<MenuItem fx:id="resetFilters" mnemonicParsing="false" text="Reset All" />
</items>
</MenuButton>
Expand Down
4 changes: 2 additions & 2 deletions resources/style/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@
}

.specialJFXTabPane .tab:selected .tab-label{
-fx-background-color:rgb(255,110,0,0.55);
-fx-background-color:rgb(255.0,110.0,0.0,0.55);
}


Expand Down Expand Up @@ -1090,7 +1090,7 @@
derive(-fx-accent, 30.0%) 99.0%
);

-fx-background-insets: 1.0 1.0 1.0 1.0;
-fx-background-insets: 3.0;
-fx-padding: 0.2em;
}

Expand Down
14 changes: 8 additions & 6 deletions src/application/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class Main extends Application {
static {
//----------Properties-------------
internalInformation.put("Version", 84);
internalInformation.put("ReleasedDate", "?/09/2017");
internalInformation.put("ReleasedDate", "14/09/2017");

System.out.println("Outside of Application Start Method");
}
Expand Down Expand Up @@ -514,8 +514,7 @@ public static void startAppWithUser(User selectedUser) {
ex.printStackTrace();
}

//Load the DataBase - After the DBManager has been initialized of course ;)
dbManager.loadApplicationDataBase();


//--------- Create the Menu Items of available users for Settings Window
loginMode.teamViewer.getItemsObservableList().stream().filter(userr -> !userr.getUserName().equals(selectedUser.getUserName())).forEach(userr -> {
Expand Down Expand Up @@ -566,12 +565,11 @@ public static void startAppWithUser(User selectedUser) {
settingsWindow.getCopySettingsMenuButton().getItems().add(menuItem);
});

//Load the application settings
loadApplicationSettings();


//----Update the UserInformation properties file when the total libraries change
libraryMode.teamViewer.getViewer().itemsWrapperProperty().sizeProperty()
.addListener((observable , oldValue , newValue) -> selectedUser.getUserInformationDb().updateProperty("Total-Libraries", String.valueOf(newValue.intValue())));


//Filter Thread (Inspecting the Files if existing)
new MediaFilterService().start();
Expand All @@ -581,6 +579,10 @@ public static void startAppWithUser(User selectedUser) {

//This bitch doesn't work for some reason that i will find and smash his bitchy ass
topBar.getSearchField().setOnAction(a -> searchWindowSmartController.getSearchService().getSearchField().getOnAction());


//================Load the DataBase - After the DBManager has been initialized of course ;)============================
dbManager.loadApplicationDataBase();
});
pause.playFromStart();
}
Expand Down
23 changes: 15 additions & 8 deletions src/application/database/DbManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ public void loadOpenedLibraries() {
// });

//Load all the Opened Libraries
Platform.runLater(() -> Main.libraryMode.teamViewer.getViewer().getItemsObservableList().stream().filter(Library::isOpened)
.forEach(library -> library.openLibrary(true, true)));
Platform.runLater(
() -> Main.libraryMode.teamViewer.getViewer().getItemsObservableList().stream().filter(Library::isOpened).forEach(library -> library.openLibrary(true, true)));

//Add Selection Model ChangeListener
Platform.runLater(() -> {
Expand Down Expand Up @@ -526,14 +526,18 @@ protected Void call() throws Exception {
Main.emotionListsController.dislikedMediaList.uploadFromDataBase();
Main.emotionListsController.likedMediaList.uploadFromDataBase();
Main.emotionListsController.lovedMediaList.uploadFromDataBase();
Platform.runLater(() -> Main.emotionListsController.updateEmotionSmartControllers(true, true, true, true));

//Refresh all the XPlayers PlayLists
Platform.runLater(() -> Main.xPlayersList.getList().stream()
.forEach(xPlayerController -> xPlayerController.getxPlayerPlayList().getSmartController().getLoadService().startService(false, false, false)));

//------Bind Instant Search between all SmartControllers
Platform.runLater(() -> {

//Update the emotion smart controller
Main.emotionListsController.updateEmotionSmartControllers(true, true, true, true);

//Refresh all the XPlayers PlayLists
Main.xPlayersList.getList().stream()
.forEach(xPlayerController -> xPlayerController.getxPlayerPlayList().getSmartController().getLoadService().startService(false, false, false));

//------Bind Instant Search between all SmartControllers

//For Search Window
Main.searchWindowSmartController.getInstantSearch().selectedProperty()
.bindBidirectional(Main.settingsWindow.getPlayListsSettingsController().getInstantSearch().selectedProperty());
Expand All @@ -547,6 +551,9 @@ protected Void call() throws Exception {
Main.xPlayersList.getList().stream().forEach(xPlayerController -> xPlayerController.getxPlayerPlayList().getSmartController().getInstantSearch()
.selectedProperty().bindBidirectional(Main.settingsWindow.getPlayListsSettingsController().getInstantSearch().selectedProperty()));

//-----------------------Load the application settings
Main.loadApplicationSettings();

});

//--FINISH
Expand Down
14 changes: 10 additions & 4 deletions src/application/settings/PlaylistsSettingsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,23 @@ private void initialize() {
//Update the properties file
Main.dbManager.getPropertiesDb().updateProperty("PlayLists-General-TotalFilesShown", Integer.toString(JavaFXTools.getIndexOfSelectedToggle(totalFilesShownGroup)));

int maximumPerPlaylist = Integer.parseInt( ( (Labeled) totalFilesShownGroup.getSelectedToggle() ).getText());

//First Update all the Libraries
Main.libraryMode.teamViewer.getViewer().getItemsObservableList().forEach(
library -> library.getSmartController().setNewMaximumPerPage(Integer.parseInt( ( (Labeled) totalFilesShownGroup.getSelectedToggle() ).getText()), true));
Main.libraryMode.teamViewer.getViewer().getItemsObservableList().forEach(library -> library.getSmartController().setNewMaximumPerPage(maximumPerPlaylist, true));

//Secondly Update the Search Window PlayList
Main.searchWindowSmartController.setNewMaximumPerPage(Integer.parseInt( ( (Labeled) totalFilesShownGroup.getSelectedToggle() ).getText()), true);
Main.searchWindowSmartController.setNewMaximumPerPage(maximumPerPlaylist, true);

//Thirdly Update all the XPlayers SmartController
Main.xPlayersList.getList().stream().map(xPlayerController -> xPlayerController.getxPlayerPlayList().getSmartController())
.forEach(controller -> controller.setNewMaximumPerPage(Integer.parseInt( ( (Labeled) totalFilesShownGroup.getSelectedToggle() ).getText()), true));
.forEach(controller -> controller.setNewMaximumPerPage(maximumPerPlaylist, true));

//Finally all the Emotion Lists Controllers
Main.emotionListsController.hatedMediaListController.setNewMaximumPerPage(maximumPerPlaylist, true);
Main.emotionListsController.dislikedMediaListController.setNewMaximumPerPage(maximumPerPlaylist, true);
Main.emotionListsController.likedMediaListController.setNewMaximumPerPage(maximumPerPlaylist, true);
Main.emotionListsController.lovedMediaListController.setNewMaximumPerPage(maximumPerPlaylist, true);
});

//clearPlayedFilesHistory
Expand Down
12 changes: 6 additions & 6 deletions src/application/webbrowser/WebBrowserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ public WebBrowserTabController createNewTab(String... webSite) {
}

/**
* Closes the tabs to the right of the selected tab
* Closes the tabs to the right of the given Tab
*
* @param tab
*/
public void closeTabsToTheRight() {
public void closeTabsToTheRight(Tab givenTab) {
//Return if size <= 1
if (tabPane.getTabs().size() <= 1)
return;

//The start
int start = tabPane.getSelectionModel().getSelectedIndex();
int start = tabPane.getTabs().indexOf(givenTab);

//Remove the appropriate items
tabPane.getTabs().stream()
Expand All @@ -136,17 +136,17 @@ public void closeTabsToTheRight() {
}

/**
* Closes the tabs to the left of the selected tab
* Closes the tabs to the left of the given Tab
*
* @param tab
*/
public void closeTabsToTheLeft() {
public void closeTabsToTheLeft(Tab givenTab) {
//Return if size <= 1
if (tabPane.getTabs().size() <= 1)
return;

//The start
int start = tabPane.getSelectionModel().getSelectedIndex();
int start = tabPane.getTabs().indexOf(givenTab);

//Remove the appropriate items
tabPane.getTabs().stream()
Expand Down
8 changes: 4 additions & 4 deletions src/application/webbrowser/WebBrowserTabContextMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ private void initialize() {
reloadTab.setOnAction(a -> webBrowserTabController.reloadWebSite());

//closeTabsRight
closeTabsRight.setOnAction(a -> webBrowserController.closeTabsToTheRight());
closeTabsRight.setOnAction(a -> webBrowserController.closeTabsToTheRight(webBrowserTabController.getTab()));

//closeTabsLeft
closeTabsLeft.setOnAction(a -> webBrowserController.closeTabsToTheLeft());
closeTabsLeft.setOnAction(a -> webBrowserController.closeTabsToTheLeft(webBrowserTabController.getTab()));

//closeOtherTabs
closeOtherTabs.setOnAction(a -> {
webBrowserController.closeTabsToTheLeft();
webBrowserController.closeTabsToTheRight();
webBrowserController.closeTabsToTheLeft(webBrowserTabController.getTab());
webBrowserController.closeTabsToTheRight(webBrowserTabController.getTab());
});

//closeTab
Expand Down
3 changes: 1 addition & 2 deletions src/applicationmodes/librarymode/LibraryMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import application.Main;
import application.presenter.SearchBox;
import application.presenter.SearchBox.SearchBoxType;
import application.settings.ApplicationSettingsController.SettingsTab;
import application.tools.ActionTool;
import application.tools.InfoTool;
import application.tools.NotificationType;
Expand Down Expand Up @@ -351,7 +350,7 @@ public void initialize() {
teamViewer.getViewer().centerItemProperty().addListener((observable , oldValue , newValue) -> {
if (newValue != null) {
openOrCloseLibrary.textProperty()
.bind(Bindings.when(teamViewer.getViewer().centerItemProperty().get().openedProperty()).then("CLOSE Selected Library").otherwise("OPEN Selected Library"));
.bind(Bindings.when(teamViewer.getViewer().centerItemProperty().get().openedProperty()).then("CLOSE").otherwise("OPEN"));
} else {
openOrCloseLibrary.textProperty().unbind();
openOrCloseLibrary.setText("...");
Expand Down
8 changes: 4 additions & 4 deletions src/applicationmodes/librarymode/LibraryTabContextMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ private void initialize() {
.setOnAction(a -> Main.libraryMode.teamViewer.getViewer().setCenterIndex(Main.libraryMode.getLibraryWithName(tab.getTooltip().getText()).get().getPosition()));

//closeTabsRight
closeTabsRight.setOnAction(a -> Main.libraryMode.multipleLibs.closeTabsToTheRight());
closeTabsRight.setOnAction(a -> Main.libraryMode.multipleLibs.closeTabsToTheRight(tab));

//closeTabsLeft
closeTabsLeft.setOnAction(a -> Main.libraryMode.multipleLibs.closeTabsToTheLeft());
closeTabsLeft.setOnAction(a -> Main.libraryMode.multipleLibs.closeTabsToTheLeft(tab));

//closeOtherTabs
closeOtherTabs.setOnAction(a -> {
Main.libraryMode.multipleLibs.closeTabsToTheLeft();
Main.libraryMode.multipleLibs.closeTabsToTheRight();
Main.libraryMode.multipleLibs.closeTabsToTheLeft(tab);
Main.libraryMode.multipleLibs.closeTabsToTheRight(tab);
});

//closeTab
Expand Down
12 changes: 6 additions & 6 deletions src/applicationmodes/librarymode/MultipleLibraries.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,17 +324,17 @@ public void insertTab(Library library) {
}

/**
* Closes the tabs to the right of the selected tab
* Closes the tabs to the right of the given Tab
*
* @param tab
*/
public void closeTabsToTheRight() {
public void closeTabsToTheRight(Tab givenTab) {
//Return if size <= 1
if (tabPane.getTabs().size() <= 1)
return;

//The start
int start = tabPane.getSelectionModel().getSelectedIndex();
int start = tabPane.getTabs().indexOf(givenTab);

//Remove the appropriate items
tabPane.getTabs().stream()
Expand All @@ -346,17 +346,17 @@ public void closeTabsToTheRight() {
}

/**
* Closes the tabs to the left of the selected tab
* Closes the tabs to the left of the given Tab
*
* @param tab
*/
public void closeTabsToTheLeft() {
public void closeTabsToTheLeft(Tab givenTab) {
//Return if size <= 1
if (tabPane.getTabs().size() <= 1)
return;

//The start
int start = tabPane.getSelectionModel().getSelectedIndex();
int start = tabPane.getTabs().indexOf(givenTab);

//Remove the appropriate items
tabPane.getTabs().stream()
Expand Down
5 changes: 3 additions & 2 deletions src/xplayer/presenter/XPlayerEqualizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class XPlayerEqualizer extends BorderPane {

//================================================================================================

private final double[] PRESET_NORMAL = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
private final double[] PRESET_NORMAL = { 50 , 50 , 50 , 50 , 50 , 50 , 50 , 50 , 50 , 50 };
private final double[] PRESET_CLASSICAL = { 50 , 50 , 50 , 50 , 50 , 50 , 70 , 70 , 70 , 76 };
private final double[] PRESET_CLUB = { 50 , 50 , 42 , 34 , 34 , 34 , 42 , 50 , 50 , 50 };
private final double[] PRESET_DANCE = { 26 , 34 , 46 , 50 , 50 , 66 , 70 , 70 , 50 , 50 };
Expand Down Expand Up @@ -221,6 +221,7 @@ else if (getValue() > 0.5)
/**
* The Class FilterButton.
*/
@Deprecated
public class FilterButton extends MenuItem {

double[] variables;
Expand All @@ -239,7 +240,7 @@ public FilterButton(String text, double[] variables) {
//Continue
setText(text);
for (int i = 0; i < variables.length; i++)
variables[i] = variables[i] / 100.00;
variables[i] = ( 100-variables[i] )/ 100.00;

// System.out.println(variables[0])

Expand Down

0 comments on commit 9624187

Please sign in to comment.