Skip to content

Commit

Permalink
Settings dialog now opens on the same window as the parent does
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny ter Haar committed Apr 30, 2018
1 parent c9ab15a commit a25d09e
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 4 deletions.
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,55 @@
/cache/
/notes/
*.config

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/dictionaries
.idea/**/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/
cmake-build-release/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests
16 changes: 16 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions javaGMR.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.9.7" level="project" />
<orderEntry type="library" name="Maven: javassist:javassist:3.12.1.GA" level="project" />
<orderEntry type="library" name="Maven: net.incongru.watchservice:barbary-watchservice:1.0" level="project" />
<orderEntry type="library" name="Maven: org.controlsfx:controlsfx:8.40.13" level="project" />
<orderEntry type="library" name="Maven: de.jensd:fontawesomefx:8.9" level="project" />
<orderEntry type="library" name="Maven: com.dorkbox:SystemTray:3.11" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: net.java.dev.jna:jna-platform:4.3.0" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.6" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.7" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.4.0" level="project" />
<orderEntry type="library" name="Maven: org.ocpsoft.prettytime:prettytime:3.2.7.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.7" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-joda:2.8.7" level="project" />
<orderEntry type="library" name="Maven: com.mashape.unirest:unirest-java:1.4.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.4" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.2" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20160212" level="project" />
<orderEntry type="library" name="Maven: com.github.plushaze.traynotification:TrayNotification:0.3" level="project" />
<orderEntry type="library" name="Maven: nl.hyranasoftware:githubUpdater:0.1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
</component>
</module>
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>nl.hyranasoftware</groupId>
<artifactId>javaGMR</artifactId>
<version>1.1.2</version>
<version>1.1.3</version>
<packaging>jar</packaging>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -19,14 +20,15 @@
</archive>
</configuration>
</plugin>
<!--
<plugin>
<groupId>sh.tak.appbundler</groupId>
<artifactId>appbundle-maven-plugin</artifactId>
<version>1.2.0</version>
<configuration>
<mainClass>nl.hyranasoftware.javagmr.gui</mainClass>
<iconFile>eicon.icns</iconFile>
<jrePath>/home/danny/Programmeren/osxjre/jre-9.0.1.jre/</jrePath>
<jrePath>C:\JRE MAC\jre-10.0.1.jre</jrePath>
<generateDiskImageFile>true</generateDiskImageFile>
</configuration>
<executions>
Expand All @@ -38,6 +40,7 @@
</execution>
</executions>
</plugin>
-->
<plugin>
<!-- NOTE: We don't need a groupId specification because the group is
org.apache.maven.plugins ...which is assumed by default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import nl.hyranasoftware.javagmr.gui;
import nl.hyranasoftware.javagmr.threads.WatchDirectory;
import nl.hyranasoftware.javagmr.util.JGMRConfig;
import nl.hyranasoftware.javagmr.util.OpenURL;
import nl.hyranasoftware.javagmr.util.SaveFile;
import org.joda.time.DateTime;

Expand Down Expand Up @@ -358,6 +359,8 @@ private void settingsButton() {
Scene scene = getScene("settingsDialog.fxml");
dialog.setTitle("Giant Multi Robot Java-Client");
dialog.initModality(Modality.APPLICATION_MODAL);
dialog.setX(btSettings.getScene().getWindow().getX());
dialog.setY(btSettings.getScene().getWindow().getY());
dialog.setScene(scene);
dialog.show();
}
Expand Down Expand Up @@ -573,4 +576,9 @@ private void refreshGameBoxTimes() {
t.start();
}

@FXML
public void joinDiscord(){
OpenURL.openUrlInBrowser("https://discord.gg/K59Wr4y");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>

<VBox fx:id="jgmrVbox" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="650.0" prefWidth="850.0" stylesheets="@bootstrap3.css" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="nl.hyranasoftware.javagmr.views.fxml.JgmrGuiController">
<VBox fx:id="jgmrVbox" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="650.0" prefWidth="850.0" stylesheets="@bootstrap3.css" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="nl.hyranasoftware.javagmr.views.fxml.JgmrGuiController">
<children>
<ToolBar minHeight="41.0" prefHeight="41.0" prefWidth="643.0">
<items>
<Button fx:id="btSettings" accessibleHelp="Settings" accessibleText="Settings" mnemonicParsing="false" onAction="#settingsButton" text="Settings" />
<Button mnemonicParsing="false" text="Join Discord" onAction="#joinDiscord" />
<Label fx:id="lbTime" text="Time until next pull from GMR:" />
</items>
</ToolBar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# To change this template file, choose Tools | Templates
# and open the template in the editor.

version=v.1.1.2
version=v.1.1.3

0 comments on commit a25d09e

Please sign in to comment.