This commit is contained in:
RafayAhmad7548 2024-06-16 18:53:25 +05:00
parent 37776af5db
commit ab03d5f10c
4045 changed files with 286212 additions and 3 deletions

View file

@ -0,0 +1,67 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
// initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,65 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,81 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,76 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,79 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(tabs.size()-1).getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,61 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,66 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
root.getChildren().add(new BrowserTab());
noOfTabs++;
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,82 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
tabs.add(new BrowserTab());
root.getChildren().addAll(newTab.getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,72 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab1());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,81 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(tabs.size()-1).getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static int getNoOfTabs(){
return tabs.size();
}
public static ArrayList<BrowserTab> getTabs(){
return tabs;
}
}

View file

@ -0,0 +1,66 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,68 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
// initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,77 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
newTabBtn.setTranslateX(newTabBtn.getTranslateX() + 150);
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,73 @@
package com.jb;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,74 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,83 @@
package com.jb;
import javafx.animation.Transition;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
// newTabBtn.setTranslateX(newTabBtn.getTranslateX() + 155);
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,82 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
root.getChildren().add(new BrowserTab());
noOfTabs++;
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab(noOfTabs);
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
root.getChildren().add(new BrowserTab(noOfTabs));
noOfTabs++;
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,61 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 5);
root.getChildren().add(newTabBtn);
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,74 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
// initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,65 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private static StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,74 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,74 @@
package com.jb;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,65 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,72 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,66 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
// initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,61 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
root.getChildren().add(newTabBtn);
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,69 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,65 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,62 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab(noOfTabs));
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
root.getChildren().add(new BrowserTab(noOfTabs));
noOfTabs++;
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,66 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
root.getChildren().add(new BrowserTab());
noOfTabs++;
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,79 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(tabs.size()-1).getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static int getNoOfTabs(){
return tabs.size();
}
}

View file

@ -0,0 +1 @@
{"version":1,"resource":"file:///home/rafayahmad/Stuff/JBrowse/jbrowse/src/main/java/com/jb/Main.java","entries":[{"id":"ul1o.java","timestamp":1713190525180},{"id":"bP2i.java","timestamp":1713190553977},{"id":"OWty.java","timestamp":1713190582570},{"id":"u6to.java","timestamp":1713190599370},{"id":"4aVr.java","timestamp":1713190640824},{"id":"qQiQ.java","timestamp":1713190683348},{"id":"eL5Q.java","timestamp":1713190737665},{"id":"5Zk2.java","timestamp":1713190798315},{"id":"JfDU.java","timestamp":1713190838472},{"id":"Kv3j.java","timestamp":1713190866393},{"id":"dXQi.java","timestamp":1713190886613},{"id":"ii7g.java","timestamp":1713191039787},{"id":"l6EA.java","timestamp":1713191424572},{"id":"r2Cz.java","timestamp":1713191469395},{"id":"UhIk.java","timestamp":1713191520300},{"id":"cRtC.java","timestamp":1713191623958},{"id":"RDm8.java","timestamp":1713191638058},{"id":"0xUg.java","timestamp":1713191700611},{"id":"tV02.java","timestamp":1713191922431},{"id":"mMlW.java","timestamp":1713193458266},{"id":"Ekl7.java","timestamp":1713193479016},{"id":"TazI.java","timestamp":1713193497523},{"id":"fcLw.java","source":"Workspace Edit","timestamp":1713504695362},{"id":"5xYt.java","timestamp":1713504699835},{"id":"V2mn.java","timestamp":1713505356545},{"id":"pn3r.java","timestamp":1713505390997},{"id":"FhKC.java","timestamp":1713519370807},{"id":"Rr3x.java","timestamp":1713519392103},{"id":"R8Vy.java","timestamp":1713519704091},{"id":"0IAR.java","timestamp":1713520152979},{"id":"A4Y9.java","timestamp":1713520297110},{"id":"Vxwk.java","timestamp":1713521932928},{"id":"8fIp.java","timestamp":1713522781021},{"id":"r73M.java","timestamp":1713522832121},{"id":"c4lc.java","timestamp":1713522851184},{"id":"q28x.java","timestamp":1713522945991},{"id":"2A1v.java","timestamp":1713523011758},{"id":"BlIV.java","timestamp":1713523072738},{"id":"uCTL.java","timestamp":1713523091494},{"id":"GzSU.java","timestamp":1713523679617},{"id":"1Jh1.java","timestamp":1713523950211},{"id":"xVwL.java","timestamp":1713525139820},{"id":"moLN.java","timestamp":1713525160460},{"id":"IK2T.java","timestamp":1713525214071},{"id":"5boa.java","timestamp":1713525228418},{"id":"2pT4.java","timestamp":1713525258950},{"id":"eNk0.java","timestamp":1713525285322},{"id":"6i6O.java","timestamp":1713525359327},{"id":"lsQO.java","timestamp":1713783272826},{"id":"rxi3.java","timestamp":1713783299806}]}

View file

@ -0,0 +1,74 @@
package com.jb;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab1());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,62 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab(noOfTabs));
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab(noOfTabs));
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,62 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,81 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getTabButton(), tabs.get(0).getStackPane());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(tabs.size()-1).getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static int getNoOfTabs(){
return tabs.size();
}
public static ArrayList<BrowserTab> getTabs(){
return tabs;
}
}

View file

@ -0,0 +1,73 @@
package com.jb;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(150);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,85 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,72 @@
package com.jb;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab1());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab1());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
newTabBtn.toFront();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,73 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,65 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,65 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,68 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,81 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
tabs = new ArrayList<>();
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(0).getTabButton(), tabs.get(0).getStackPane());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(tabs.size()*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
tabs.add(new BrowserTab());
root.getChildren().addAll(tabs.get(tabs.size()-1).getTabButton(), tabs.get(tabs.size()-1).getStackPane());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static int getNoOfTabs(){
return tabs.size();
}
public static ArrayList<BrowserTab> getTabs(){
return tabs;
}
}

View file

@ -0,0 +1,66 @@
package com.jb;
import javafx.animation.ScaleTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
root.getChildren().add(new BrowserTab());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
root.getChildren().add(new BrowserTab());
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,61 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 10);
root.getChildren().add(newTabBtn);
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,77 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
newTabBtn.setTranslateX(newTabBtn.getTranslateX() + 155);
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}

View file

@ -0,0 +1,58 @@
package com.jb;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class Main extends Application{
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().add(tab);
// tabPane = new TabPane();
// root.getChildren().add(tabPane);
// BrowserTab1 tab = new BrowserTab1();
// tab.getWebEngine().load("https://www.google.com");
// tabPane.getTabs().add(tab);
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
root.getChildren().add(newTabBtn);
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
}

View file

@ -0,0 +1,85 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.util.Duration;
public class Main extends Application{
private static ToggleGroup toggleGroup;
private static int noOfTabs;
private ArrayList<BrowserTab> tabs;
private StackPane root;
private Scene scene;
private static Button newTabBtn;
@Override
public void start(Stage stage){
toggleGroup = new ToggleGroup();
noOfTabs = 1;
root = new StackPane();
scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
BrowserTab tab = new BrowserTab();
root.getChildren().addAll(tab.getNodes());
initializeButton();
stage.setScene(scene);
stage.show();
}
private void initializeButton(){
newTabBtn = new Button("");
StackPane.setAlignment(newTabBtn, Pos.TOP_LEFT);
newTabBtn.setId("new-tab-button");
newTabBtn.setTranslateX(noOfTabs*150 + 7.5);
root.getChildren().add(newTabBtn);
newTabBtn.setOnAction(e -> {
noOfTabs++;
BrowserTab newTab = new BrowserTab();
root.getChildren().addAll(newTab.getNodes());
TranslateTransition tt = new TranslateTransition(new Duration(250), newTabBtn);
tt.setByX(155);
tt.play();
});
}
public static void main(String[] args){
launch(args);
}
public static Button getNewTabBtn(){
return newTabBtn;
}
public static ToggleGroup getToggleGroup(){
return toggleGroup;
}
public static void setNoOfTabs(int tabs){
noOfTabs = tabs;
}
public static int getNoOfTabs(){
return noOfTabs;
}
}