diff --git a/README.md b/README.md index a32cb50..0d21b18 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ -# SEGP-Group3 \ No newline at end of file +# SEGP-Group3 + +[Jfx Browser Gif](https://twitter.com/badarshahzad54/status/859596238202691584) + +[Jfx Browser Demo](https://youtu.be/DH_6g4OcfyE?list=PLv2dKKz-juPaCQsqET0BH4pUsJw8pbjxb) + diff --git a/README.md~ b/README.md~ new file mode 100644 index 0000000..be6438e --- /dev/null +++ b/README.md~ @@ -0,0 +1,4 @@ +# SEGP-Group3 + +[Jfx Browser Demo](https://youtu.be/DH_6g4OcfyE?list=PLv2dKKz-juPaCQsqET0BH4pUsJw8pbjxb) + diff --git a/SEGP/History.db b/SEGP/History.db index ea02551..f1236cb 100644 Binary files a/SEGP/History.db and b/SEGP/History.db differ diff --git a/SEGP/bin/.gitignore b/SEGP/bin/.gitignore index 8eac31c..d500714 100644 --- a/SEGP/bin/.gitignore +++ b/SEGP/bin/.gitignore @@ -1,10 +1,34 @@ +/UndecoratorBis.jar +/bookmark.png +/bookmarks.png +/controlsfx-8.40.11.jar +/download.png +/downloads.png +/folder.png +/forward1.png +/history.png +/home.png +/itextpdf-5.5.1-javadoc.jar +/newtab.png +/pdf.png +/pdfConverter.png +/refresh.png +/screenshots/ +/search.png +/setting.png +/user.png /bookmarks/ /controllers/ /database/ /db/ /downloader/ /htmlToPdf/ +/itextpdf-5.5.1.jar +/jfoenix.jar /main/ /passwordVault/ /pdfcrowd/ +/pdfcrowd.jar +/sqlite-jdbc-3.16.1.jar +/testFx-3.1.2.jar /userInterface/ diff --git a/SEGP/bin/controllers/MainController$1.class b/SEGP/bin/controllers/MainController$1.class index 34dad3f..574fba6 100644 Binary files a/SEGP/bin/controllers/MainController$1.class and b/SEGP/bin/controllers/MainController$1.class differ diff --git a/SEGP/bin/controllers/MainController$2.class b/SEGP/bin/controllers/MainController$2.class index 09f3bb1..feeba9c 100644 Binary files a/SEGP/bin/controllers/MainController$2.class and b/SEGP/bin/controllers/MainController$2.class differ diff --git a/SEGP/bin/controllers/MainController.class b/SEGP/bin/controllers/MainController.class index 0daeacc..f9e0572 100644 Binary files a/SEGP/bin/controllers/MainController.class and b/SEGP/bin/controllers/MainController.class differ diff --git a/SEGP/bin/userInterface/MenuView$1.class b/SEGP/bin/userInterface/MenuView$1.class index 6a4d47f..8891b3e 100644 Binary files a/SEGP/bin/userInterface/MenuView$1.class and b/SEGP/bin/userInterface/MenuView$1.class differ diff --git a/SEGP/bin/userInterface/MenuView.class b/SEGP/bin/userInterface/MenuView.class index 767cd71..4b9ec4b 100644 Binary files a/SEGP/bin/userInterface/MenuView.class and b/SEGP/bin/userInterface/MenuView.class differ diff --git a/SEGP/src/controllers/MainController.java b/SEGP/src/controllers/MainController.java index 0155da8..c617d24 100644 --- a/SEGP/src/controllers/MainController.java +++ b/SEGP/src/controllers/MainController.java @@ -50,8 +50,8 @@ public MainController() { public static TabPane tabPane = new TabPane(); private static Tab firstTab = new Tab("New Tab"); - - private static Tab addNewTab = new Tab("+"); + + private static final Tab addNewTab = new Tab("+"); public void setFirstTab(Tab firstTab) { this.firstTab = firstTab; @@ -115,10 +115,6 @@ public static Tab getAddNewTab() { return addNewTab; } - public void setAddNewTab(Tab addNewTab) { - this.addNewTab = addNewTab; - } - public void tabPaneChangeListener(TabPane tabpane) { tabpane.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() { @Override diff --git a/SEGP/src/userInterface/MenuView.java b/SEGP/src/userInterface/MenuView.java index 8ff0e2f..578446c 100644 --- a/SEGP/src/userInterface/MenuView.java +++ b/SEGP/src/userInterface/MenuView.java @@ -53,7 +53,7 @@ public class MenuView { SingleSelectionModel selectedTab ; SingleSelectionModel fxSelectedTab ; - + public void setMenuViewListener(JFXButton history, JFXButton downloads, JFXButton bookmarks, JFXButton setting, TabPane tabPane, JFXDrawersStack drawersStack, JFXDrawer rightDrawer) { @@ -106,9 +106,9 @@ public void setMenuViewListener(JFXButton history, JFXButton downloads, JFXButto onClickHideHamburger(); - addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab); + addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab, 0); - fxSelectedTab.select(0); + // fxSelectedTab.select(0); tab.setText("History"); @@ -120,12 +120,12 @@ public void setMenuViewListener(JFXButton history, JFXButton downloads, JFXButto onClickHideHamburger(); - addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab); + addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab , 1); - fxSelectedTab.select(1); + // fxSelectedTab.select(1); tab.setText("Downloads"); - + }); // -------------------------------------------------------Bookmarks @@ -137,12 +137,12 @@ public void handle(ActionEvent event) { onClickHideHamburger(); - addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab); + addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab, 2); - fxSelectedTab.select(2); + // fxSelectedTab.select(2); tab.setText("Bookmarks"); - + } }); @@ -153,12 +153,12 @@ public void handle(ActionEvent event) { onClickHideHamburger(); - addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab); + addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab, 3); - fxSelectedTab.select(3); + // fxSelectedTab.select(3); tab.setText("Setting"); - + }); //As the bookmarks is not designed in fxml so: When the bookmarks tab @@ -198,7 +198,8 @@ public void changed(ObservableValue ov, Tab t, Tab newSelectedTab } - private void addAndSelectNewTab(ObservableList tabs, Tab tab2, SingleSelectionModel selectedTab, SingleSelectionModel fxSelectedTab) { + private void addAndSelectNewTab(ObservableList tabs, Tab tab2, SingleSelectionModel selectedTab, SingleSelectionModel fxSelectedTab + ,int selectedTabIndex) { // TODO Auto-generated method stub @@ -217,12 +218,18 @@ public void run() { openTabName.equals("Downloads") || openTabName.equals("Setting")) { - //selectedTab.select(a); + + // fxSelectedTab.select(selectedTabIndex); + System.out.println("Tab index:"+ selectedTabIndex); + + selectedTab.select(a); + return; } } + fxSelectedTab.select(selectedTabIndex); tabs.add(tabs.size() - 1, tab); selectedTab.select(tab); getBookMarkView(); @@ -230,16 +237,7 @@ public void run() { } }); } - - private void historyHandleBt(ActionEvent event) { - - // When the menu click Hamburger and DrawerStack will hide - onClickHideHamburger(); - addAndSelectNewTab(tabs,tab,selectedTab,fxSelectedTab); - - tab.setText("History"); - } public void getBookMarkView(){ BookMarks ob = new BookMarks();