Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
naeemkhan12 committed Jun 19, 2017
2 parents 5f8f08f + 383c201 commit e6da339
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 30 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ A web browser written in java and love with javaFX front-end.The borwser is base

[Jfx Browser Demo](https://youtu.be/DH_6g4OcfyE?list=PLv2dKKz-juPaCQsqET0BH4pUsJw8pbjxb)


### Features

+ Browse the Web.
Expand Down
4 changes: 4 additions & 0 deletions README.md~
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SEGP-Group3

[Jfx Browser Demo](https://youtu.be/DH_6g4OcfyE?list=PLv2dKKz-juPaCQsqET0BH4pUsJw8pbjxb)

Binary file modified SEGP/History.db
Binary file not shown.
34 changes: 34 additions & 0 deletions SEGP/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +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/
Binary file modified SEGP/bin/controllers/MainController$1.class
Binary file not shown.
Binary file modified SEGP/bin/controllers/MainController$2.class
Binary file not shown.
Binary file modified SEGP/bin/controllers/MainController.class
Binary file not shown.
Binary file modified SEGP/bin/userInterface/MenuView$1.class
Binary file not shown.
Binary file modified SEGP/bin/userInterface/MenuView.class
Binary file not shown.
8 changes: 2 additions & 6 deletions SEGP/src/controllers/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Tab>() {
@Override
Expand Down
44 changes: 21 additions & 23 deletions SEGP/src/userInterface/MenuView.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class MenuView {

SingleSelectionModel<Tab> selectedTab ;
SingleSelectionModel<Tab> fxSelectedTab ;

public void setMenuViewListener(JFXButton history, JFXButton downloads, JFXButton bookmarks, JFXButton setting,
TabPane tabPane, JFXDrawersStack drawersStack, JFXDrawer rightDrawer) {

Expand Down Expand Up @@ -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");

Expand All @@ -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
Expand All @@ -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");

}

});
Expand All @@ -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
Expand Down Expand Up @@ -198,7 +198,8 @@ public void changed(ObservableValue<? extends Tab> ov, Tab t, Tab newSelectedTab
}


private void addAndSelectNewTab(ObservableList<Tab> tabs, Tab tab2, SingleSelectionModel<Tab> selectedTab, SingleSelectionModel<Tab> fxSelectedTab) {
private void addAndSelectNewTab(ObservableList<Tab> tabs, Tab tab2, SingleSelectionModel<Tab> selectedTab, SingleSelectionModel<Tab> fxSelectedTab
,int selectedTabIndex) {
// TODO Auto-generated method stub


Expand All @@ -217,29 +218,26 @@ 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();

}
});
}

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();
Expand Down

0 comments on commit e6da339

Please sign in to comment.