Skip to content

Commit

Permalink
Maven Nature + New Features
Browse files Browse the repository at this point in the history
1)Added Maven Nature
2)Added Context Menu Feature when you right click on Tabs
3)Bug Fixes
  • Loading branch information
goxr3plus committed Oct 27, 2017
1 parent ba3fe41 commit 4e5ce20
Show file tree
Hide file tree
Showing 19 changed files with 624 additions and 133 deletions.
28 changes: 22 additions & 6 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="lib" path="libraries/commons-validator-1.6.jar"/>
<classpathentry kind="lib" path="libraries/jfoenix.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk
/target/
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>il.org.spartan.nature</nature>
Expand Down
4 changes: 4 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
encoding/resources=UTF-8
encoding/src=UTF-8
1 change: 1 addition & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
4 changes: 4 additions & 0 deletions .settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Binary file removed libraries/commons-validator-1.6.jar
Binary file not shown.
Binary file removed libraries/jfoenix.jar
Binary file not shown.
139 changes: 139 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.goxr3plus</groupId>
<artifactId>JavaFX-Web-Browser</artifactId>
<version>2.0.0</version>
<name>JavaFX-Web-Browser</name>
<description>Advanced JavaFX Web Browser</description>

<!-- Output to jar format -->
<packaging>jar</packaging>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<finalName>JavaFXWebBrowser-${project.version}</finalName>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<!-- <testSourceDirectory>testing</testSourceDirectory> -->
<plugins>
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<!-- Make this jar executable -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>main.java.com.goxr3plus.JavaFXWebBrowser.application.Main</mainClass>
<classpathPrefix>JFXWebBrowser_lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>

<!-- Copy project dependency -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- exclude junit, we need runtime dependency only -->
<excludeArtifactIds> junit </excludeArtifactIds>
<outputDirectory>${project.build.directory}/JFXWebBrowser_lib/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<!-- Dependencies -->

<dependencies>
<!-- JAVAFX GRAPHICS LIBRARIES -->
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>1.9.1</version>
</dependency>

<!-- ETC LIBRARIES -->
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6</version>
<exclusions>
<exclusion>
<groupId>*</groupId> <!-- Exclude Project-E from Project-B -->
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
6 changes: 5 additions & 1 deletion resources/fxml/WebBrowserController.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<?import com.jfoenix.controls.JFXButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
Expand All @@ -11,7 +12,7 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>

<fx:root prefHeight="400.0" prefWidth="600.0" stylesheets="@../css/application.css" type="StackPane" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
<fx:root prefHeight="400.0" prefWidth="600.0" stylesheets="@../css/application.css" type="StackPane" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1">
<children>
<BorderPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: rgb(0,0,0,0.85);">
<center>
Expand All @@ -35,6 +36,9 @@
<tooltip>
<Tooltip text="New Tab" />
</tooltip>
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
</JFXButton>
</children>
<padding>
Expand Down
19 changes: 19 additions & 0 deletions resources/fxml/WebBrowserTabContextMenu.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.control.ContextMenu?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SeparatorMenuItem?>

<fx:root type="ContextMenu" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
<items>
<MenuItem fx:id="newTab" mnemonicParsing="false" text="New Tab" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem fx:id="reloadTab" mnemonicParsing="false" text="Reload" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem fx:id="closeOtherTabs" mnemonicParsing="false" text="Close other Tabs" />
<MenuItem fx:id="closeTabsRight" mnemonicParsing="false" text="Close Tabs to the Right" />
<MenuItem fx:id="closeTabsLeft" mnemonicParsing="false" text="Close Tabs to the Left" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem fx:id="closeTab" mnemonicParsing="false" text="Close Tab" />
</items>
</fx:root>
89 changes: 0 additions & 89 deletions src/application/ApplicationMain.java

This file was deleted.

Loading

0 comments on commit 4e5ce20

Please sign in to comment.