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,45 @@
package com.jb;
import java.util.ArrayList;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,24 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes.add(stackPane);
}
}

View file

@ -0,0 +1,72 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,30 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,21 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<? extends Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
}
}

View file

@ -0,0 +1,41 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,61 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void grow(){
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,71 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
((StackPane)this.tabButton.getScene().getRoot()).getChildren().removeAll(tabButton, stackPane);
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,73 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
((StackPane)this.tabButton.getScene().getRoot()).getChildren().remove(stackPane);
tt.setByX(-75);
st.setByX(-1);
pt.play();
pt.setOnFinished(e -> {
((StackPane)this.tabButton.getScene().getRoot()).getChildren().remove(tabButton);
});
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,53 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,67 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,55 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,19 @@
package com.jb;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<? extends Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,31 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setId("tab-pane");
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,58 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-2)*155 + 5);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,31 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,66 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
StackPane(this.tabButton.getScene().getRoot())
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,32 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setId("tab-pane");
tabButton.setTranslateX(Main.getNoOfTabs()*155 + 5);
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,73 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((JBrowse.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
((StackPane)this.tabButton.getScene().getRoot()).getChildren().remove(stackPane);
tt.setByX(-75);
st.setByX(-1);
pt.play();
pt.setOnFinished(e -> {
((StackPane)this.tabButton.getScene().getRoot()).getChildren().remove(tabButton);
});
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,24 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<? extends Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes.add(stackPane);
}
}

View file

@ -0,0 +1,31 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,25 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes.add(tabButton);
nodes.add(stackPane);
}
}

View file

@ -0,0 +1,57 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 - 75);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,58 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 - 75);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,72 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
pt.setOnFinished(e -> {
((StackPane)this.tabButton.getScene().getRoot()).getChildren().removeAll(tabButton, stackPane);
});
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,57 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 );
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,36 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,74 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,58 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,64 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void grow(){
}
public void shrink(){
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,57 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 75);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,38 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,69 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,57 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1 @@
{"version":1,"resource":"file:///home/rafayahmad/Stuff/JBrowse/jbrowse/src/main/java/com/jb/BrowserTab.java","entries":[{"id":"FbvZ.java","timestamp":1713519059159},{"id":"9FDx.java","source":"Import 'ArrayList' (java.util)","timestamp":1713519067939},{"id":"RPut.java","timestamp":1713519084801},{"id":"2tWV.java","timestamp":1713519106060},{"id":"RsHU.java","timestamp":1713519127142},{"id":"n2Xe.java","timestamp":1713519177097},{"id":"7G0S.java","timestamp":1713519363443},{"id":"JCZF.java","timestamp":1713519560955},{"id":"RWHp.java","timestamp":1713520166833},{"id":"HHjr.java","timestamp":1713522347531},{"id":"NZ9l.java","timestamp":1713522395128},{"id":"uEB8.java","timestamp":1713522432745},{"id":"V2vy.java","timestamp":1713522463775},{"id":"bVec.java","timestamp":1713522475021},{"id":"mjCp.java","timestamp":1713522498471},{"id":"BMFq.java","timestamp":1713522536598},{"id":"v2JS.java","timestamp":1713522695095},{"id":"qniF.java","timestamp":1713523510803},{"id":"1T69.java","timestamp":1713523702798},{"id":"DDs4.java","timestamp":1713523779812},{"id":"tq5S.java","timestamp":1713523790072},{"id":"FGNd.java","timestamp":1713523803074},{"id":"pOex.java","timestamp":1713523828332},{"id":"HkKP.java","timestamp":1713523854684},{"id":"XvrC.java","timestamp":1713523871563},{"id":"SPcj.java","timestamp":1713523901821},{"id":"nOdn.java","timestamp":1713523931922},{"id":"RyFM.java","timestamp":1713525895800},{"id":"T1oq.java","timestamp":1713526138292},{"id":"eAW0.java","timestamp":1713526154228},{"id":"aT7s.java","timestamp":1713526166115},{"id":"v5dB.java","timestamp":1713526192767},{"id":"Bb0I.java","timestamp":1713526476912},{"id":"ZpTL.java","timestamp":1713526487035},{"id":"jvJ9.java","timestamp":1713526519020},{"id":"EkaD.java","timestamp":1713526542836},{"id":"8ehd.java","timestamp":1713526569856},{"id":"VG7U.java","timestamp":1713586033803},{"id":"4d4W.java","timestamp":1713783204189},{"id":"L8wK.java","timestamp":1713783218246},{"id":"nzFl.java","timestamp":1713783233376},{"id":"FfUc.java","timestamp":1713783652398},{"id":"cphL.java","timestamp":1713789709546},{"id":"FXcv.java","timestamp":1713789956228},{"id":"LI90.java","timestamp":1713790022013},{"id":"qzl3.java","timestamp":1713790081346},{"id":"CAPe.java","timestamp":1713790115347},{"id":"SwUs.java","timestamp":1713790135138},{"id":"CvOP.java","timestamp":1713790356754},{"id":"QYrU.java","source":"Workspace Edit","timestamp":1713790430870}]}

View file

@ -0,0 +1,68 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public void grow(){
}
public void shrink(){
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,40 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,27 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setTranslateY(70);
stackPane.setStyle("-fx-background-color: black;");
nodes.add(tabButton);
nodes.add(stackPane);
}
}

View file

@ -0,0 +1,57 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 - 75);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,72 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,58 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,45 @@
package com.jb;
import java.util.ArrayList;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,70 @@
package com.jb;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private TranslateTransition tt;
private ScaleTransition st;
private ParallelTransition pt;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
tt = new TranslateTransition(new Duration(250), tabButton);
st = new ScaleTransition(new Duration(250), tabButton);
pt = new ParallelTransition(tt, st);
grow();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
}
public void bringToFront(){
stackPane.toFront();
}
public void grow(){
tt.setByX(75);
st.setByX(1);
pt.play();
}
public void shrink(){
tt.setByX(-75);
st.setByX(-1);
pt.play();
((StackPane)this.tabButton.getScene().getRoot()).getChildren().removeAll(tabButton, stackPane);
}
public TabButton getTabButton(){
return tabButton;
}
public StackPane getStackPane(){
return stackPane;
}
}

View file

@ -0,0 +1,54 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.transform.Translate;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,32 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
nodes = new ArrayList<>();
nodes.add(stackPane);
nodes.add(tabButton);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,41 @@
package com.jb;
import java.util.ArrayList;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton();
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}

View file

@ -0,0 +1,57 @@
package com.jb;
import java.util.ArrayList;
import javafx.animation.ParallelTransition;
import javafx.animation.ScaleTransition;
import javafx.animation.TranslateTransition;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.util.Duration;
public class BrowserTab{
private TabButton tabButton;
private StackPane stackPane;
private WebView webView;
private WebEngine webEngine;
private ArrayList<Node> nodes;
public BrowserTab(){
tabButton = new TabButton(this);
stackPane = new StackPane();
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://google.com");
stackPane.getChildren().add(webView);
stackPane.setId("tab-pane");
tabButton.setTranslateX((Main.getNoOfTabs()-1)*155 + 5 + 80);
tabButton.setScaleX(0);
TranslateTransition tt = new TranslateTransition(new Duration(250), tabButton);
tt.setByX(75);
ScaleTransition st = new ScaleTransition(new Duration(250), tabButton);
st.setByX(1);
ParallelTransition pt = new ParallelTransition(tt, st);
pt.play();
StackPane.setAlignment(stackPane, Pos.TOP_LEFT);
StackPane.setAlignment(tabButton, Pos.TOP_LEFT);
nodes = new ArrayList<>();
nodes.add(tabButton);
nodes.add(stackPane);
}
public ArrayList<Node> getNodes(){
return nodes;
}
}