Skip to content

Commit

Permalink
Jfx Browser v 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
badarshahzad committed May 8, 2017
1 parent 0364f11 commit 8926b4b
Show file tree
Hide file tree
Showing 26 changed files with 41 additions and 12 deletions.
1 change: 0 additions & 1 deletion SEGP/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="css"/>
<classpathentry kind="src" path="img"/>
<classpathentry kind="src" path="browserdb"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="lib"/>
<classpathentry kind="lib" path="lib/jfoenix.jar"/>
Expand Down
Binary file renamed SEGP/bin/History.db → SEGP/History.db
Binary file not shown.
31 changes: 31 additions & 0 deletions SEGP/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
/History.db
/UndecoratorBis.jar
/backword1.png
/bookMarks.png
/bookmark.png
/bookmarks/
/bookmarks.png
/buttonStyles.css
/controllers/
/controlsfx-8.40.11.jar
/database/
/db/
/download.png
/downloader/
/downloads.png
/folder.png
/forward1.png
/history.png
/home.png
/htmlToPdf/
/itextpdf-5.5.1-javadoc.jar
/itextpdf-5.5.1.jar
/jfoenix.jar
/main/
/newtab.png
/passwordVault/
/pdf.png
/pdfConverter.png
/pdfcrowd/
/pdfcrowd.jar
/refresh.png
/screenshots/
/search.png
/setting.png
/sqlite-jdbc-3.16.1.jar
/stylesheet.css
/testFx-3.1.2.jar
/ui/
/user.png
/userInterface/
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/controllers/TabController$3.class
Binary file not shown.
Binary file modified SEGP/bin/controllers/TabController.class
Binary file not shown.
Binary file modified SEGP/bin/database/BookMarksDataBase.class
Binary file not shown.
Binary file modified SEGP/bin/database/CRUD.class
Binary file not shown.
Binary file modified SEGP/bin/database/DownloadDatabase.class
Binary file not shown.
Binary file modified SEGP/bin/database/HistoryManagment.class
Binary file not shown.
Binary file modified SEGP/bin/database/SqliteConnection.class
Binary file not shown.
Binary file modified SEGP/bin/database/UserAccounts.class
Binary file not shown.
Binary file modified SEGP/bin/main/MainClass.class
Binary file not shown.
Binary file modified SEGP/bin/main/Renderer.class
Binary file not shown.
Binary file removed SEGP/browserdb/History.db
Binary file not shown.
7 changes: 4 additions & 3 deletions SEGP/src/controllers/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ public void changed(ObservableValue<? extends Tab> ov, Tab t, Tab newSelectedTab
}

// The current tab title is set the stage title
MainClass.getStage().setTitle(tabPane.getSelectionModel().getSelectedItem().getText());

System.out.println("Current tab title: "+tabPane.getSelectionModel().getSelectedItem().getText());
//MainClass.getStage().setTitle(tabPane.getSelectionModel().getSelectedItem().getText());

//The above line was just setting the name of window but according to the requirement we
// just set the fixed name of browser Jfx Browser

if (newSelectedTab == addNewTab) {

Expand Down
5 changes: 4 additions & 1 deletion SEGP/src/controllers/TabController.java
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,10 @@ public void changed(ObservableValue ov, State oldState, State newState) {
searchField.setText(webEngine.getLocation());

// The name of current tab set in Window
MainClass.getStage().setTitle(webEngine.getTitle());
//MainClass.getStage().setTitle(webEngine.getTitle());

//Here According to the client we are setting the name of browse window
MainClass.getStage().setTitle("Jfx Browser");


// The backword & forward tab disabled and enable when index
Expand Down
1 change: 0 additions & 1 deletion SEGP/src/database/BookMarksDataBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static void createBookMarksDataBase() {
+ "date varchar(20),"
+ " user_id integer );");
perp.executeUpdate();
System.out.println("table created");
} catch (SQLException e) {

}
Expand Down
1 change: 0 additions & 1 deletion SEGP/src/database/CRUD.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public static void createUserDataBase()
"CREATE TABLE if not exists users(name text ,email varchar(50) primary key,password varchar(30),"
+ "pin integer);");
perp.executeUpdate();
System.out.println("user table created");
perp.close();
SqliteConnection.Connector().close();
} catch (Exception e) {
Expand Down
1 change: 0 additions & 1 deletion SEGP/src/database/DownloadDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public static void createDownloadDataBase() {
perp = c.prepareStatement("CREATE TABLE if not exists download(url text ,file_name varchar(20),"
+ "status varchar (30), user_id integer );");
perp.executeUpdate();
System.out.println("table created");

} catch (SQLException e) {
}
Expand Down
1 change: 0 additions & 1 deletion SEGP/src/database/HistoryManagment.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public static void CreateDataBase() {
"CREATE TABLE if not exists history(email text primary key ,url text ,Time varchar(30),Date varchar(30),"
+ "domain varchar(40),title varchar(50), user_id integer );");
perp.executeUpdate();
System.out.println("table created");
perp.close();
SqliteConnection.Connector().close();

Expand Down
2 changes: 1 addition & 1 deletion SEGP/src/database/SqliteConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static Connection Connector() {

try {
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite:browserdb/History.db");
Connection conn = DriverManager.getConnection("jdbc:sqlite:History.db");
return conn;
} catch (ClassNotFoundException e) {
e.printStackTrace();
Expand Down
1 change: 0 additions & 1 deletion SEGP/src/database/UserAccounts.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public static void createUserAccountsDataBase(){
perp=c.prepareStatement("CREATE TABLE if not exists accounts(domain text primary key,username varchar(20),"
+ "password varchar (30), user_id integer );");
perp.executeUpdate();
System.out.println("table created");
} catch (SQLException e) {
}

Expand Down
1 change: 1 addition & 0 deletions SEGP/src/main/MainClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void start(Stage stage) throws Exception {
});

scene.getStylesheets().add(getClass().getResource("/stylesheet.css").toExternalForm());
stage.setTitle("Jfx Browser");
stage.setScene(scene);
stage.show();

Expand Down
1 change: 0 additions & 1 deletion SEGP/src/main/Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public Renderer(){

webEngine.load("http://www.google.com");

//System.out.println("Title fo page:"+webEngine.getTitle());
}

}

0 comments on commit 8926b4b

Please sign in to comment.