-
Notifications
You must be signed in to change notification settings - Fork 109
Add About window #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JLLeitschuh
merged 14 commits into
WPIRoboticsProjects:master
from
AustinShalit:AboutWindow
Jun 3, 2016
Merged
Add About window #588
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
93f6507
Add About window
AustinShalit bdea85f
Use Application Modal instead of always on top
AustinShalit aa2f7c1
Add links to Github and ScreenSteps to the about dialog
AustinShalit fec2655
Apply @JLLeitschuh patch
AustinShalit 6433615
New button style
AustinShalit 3add80e
Fix open twice bug
AustinShalit 662d1fb
Change Cursor to Hand while over links
AustinShalit 5ef3bd6
Use CSS formating instead of Rectangle
AustinShalit 1e25a05
Use utility style and autoclose
AustinShalit e540e5a
Fix Windows font bug
AustinShalit e393211
Fix tests so a mock network module is now injected
AustinShalit 0b4fd0b
Merge remote-tracking branch 'origin/master' into AboutWindow
AustinShalit ff56647
Updated to use Roboto fonts not loaded with CSS (#590)
AustinShalit 4547ce4
Remove unused assert
AustinShalit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
core/src/test/java/edu/wpi/grip/core/operations/network/MockGRIPNetworkModule.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package edu.wpi.grip.core.operations.network; | ||
|
|
||
| import com.google.inject.AbstractModule; | ||
| import com.google.inject.name.Names; | ||
| import edu.wpi.grip.core.operations.network.ros.MockROSManager; | ||
| import edu.wpi.grip.core.operations.network.ros.ROSNetworkPublisherFactory; | ||
|
|
||
| /** | ||
| * A mock of {@Link GRIPNetworkModule} for testing. | ||
| */ | ||
| public final class MockGRIPNetworkModule extends AbstractModule { | ||
| @Override | ||
| protected void configure() { | ||
| bind(MapNetworkPublisherFactory.class) | ||
| .annotatedWith(Names.named("ntManager")) | ||
| .to(MockMapNetworkPublisher.class); | ||
| bind(ROSNetworkPublisherFactory.class) | ||
| .annotatedWith(Names.named("rosManager")) | ||
| .to(MockROSManager.class); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
core/src/test/java/edu/wpi/grip/core/operations/network/ros/MockROSManager.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package edu.wpi.grip.core.operations.network.ros; | ||
|
|
||
| public class MockROSManager implements ROSNetworkPublisherFactory { | ||
|
|
||
| @Override | ||
| public <C extends JavaToMessageConverter> ROSMessagePublisher create(C converter) { | ||
| return null; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package edu.wpi.grip.ui; | ||
|
|
||
| import javafx.fxml.FXML; | ||
| import javafx.scene.control.Label; | ||
| import javafx.scene.input.MouseEvent; | ||
|
|
||
| import javax.inject.Inject; | ||
|
|
||
| public class AboutDialogController { | ||
|
|
||
| @Inject | ||
| private Main main; | ||
|
|
||
| @FXML | ||
| private Label versionNumberLabel; | ||
|
|
||
| @FXML | ||
| void mousePressedDocumentationButton(MouseEvent event) { | ||
| main.getHostServices().showDocument("http://wpilib.screenstepslive.com/s/4485/m/50711"); | ||
| } | ||
|
|
||
| @FXML | ||
| void mousePressedGithubButton(MouseEvent event) { | ||
| main.getHostServices().showDocument("https://github.com/WPIRoboticsProjects/GRIP"); | ||
| } | ||
|
|
||
| @FXML | ||
| void initialize() { | ||
| versionNumberLabel.setText("Version " + edu.wpi.grip.core.Main.class.getPackage().getImplementationVersion()); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
|
|
||
| <?import java.net.URL?> | ||
| <?import javafx.geometry.Insets?> | ||
| <?import javafx.scene.control.Label?> | ||
| <?import javafx.scene.image.Image?> | ||
| <?import javafx.scene.image.ImageView?> | ||
| <?import javafx.scene.layout.HBox?> | ||
| <?import javafx.scene.layout.Pane?> | ||
| <?import javafx.scene.layout.StackPane?> | ||
| <?import javafx.scene.layout.VBox?> | ||
| <?import javafx.scene.text.Font?> | ||
|
|
||
| <VBox fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="330.0" prefWidth="600.0" styleClass="about-window" stylesheets="@GRIP.css" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.wpi.grip.ui.AboutDialogController"> | ||
| <children> | ||
| <Pane VBox.vgrow="ALWAYS" /> | ||
| <HBox> | ||
| <children> | ||
| <Pane HBox.hgrow="ALWAYS" /> | ||
| <ImageView fitHeight="156.0" fitWidth="156.0" pickOnBounds="true" preserveRatio="true"> | ||
| <image> | ||
| <Image url="@icons/grip.png" /> | ||
| </image> | ||
| </ImageView> | ||
| <Pane HBox.hgrow="ALWAYS" /> | ||
| <VBox HBox.hgrow="ALWAYS"> | ||
| <children> | ||
| <Label style="-fx-font-size: 64; -fx-font-weight: BOLD;" text="GRIP" /> | ||
| <Label fx:id="versionNumberLabel" text="Version 0.0.0" /> | ||
| <Pane VBox.vgrow="ALWAYS" /> | ||
| <HBox> | ||
| <children> | ||
| <StackPane onMousePressed="#mousePressedGithubButton" styleClass="about-button"> | ||
| <children> | ||
| <Label text="➔ Github"> | ||
| <font> | ||
| <Font size="14.0" /> | ||
| </font></Label> | ||
| </children> | ||
| <opaqueInsets> | ||
| <Insets /> | ||
| </opaqueInsets> | ||
| <HBox.margin> | ||
| <Insets left="-3.0" /> | ||
| </HBox.margin> | ||
| <padding> | ||
| <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" /> | ||
| </padding> | ||
| </StackPane> | ||
| </children> | ||
| </HBox> | ||
| <Pane VBox.vgrow="ALWAYS" /> | ||
| <HBox> | ||
| <children> | ||
| <StackPane onMousePressed="#mousePressedDocumentationButton" styleClass="about-button"> | ||
| <children> | ||
| <Label text="➔ ScreenSteps Documentation" /> | ||
| </children> | ||
| <HBox.margin> | ||
| <Insets left="-3.0" /> | ||
| </HBox.margin> | ||
| <padding> | ||
| <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" /> | ||
| </padding> | ||
| </StackPane> | ||
| </children> | ||
| </HBox> | ||
| </children> | ||
| </VBox> | ||
| <Pane HBox.hgrow="ALWAYS" /> | ||
| </children> | ||
| </HBox> | ||
| <Pane VBox.vgrow="ALWAYS"> | ||
| <VBox.margin> | ||
| <Insets /> | ||
| </VBox.margin> | ||
| </Pane> | ||
| <HBox> | ||
| <children> | ||
| <Pane HBox.hgrow="ALWAYS" /> | ||
| <Label style="-fx-font-size: 12;" text="GRIP is licensed under a 3 Clause BSD License" textFill="#818181" /> | ||
| <Pane HBox.hgrow="ALWAYS" /> | ||
| </children> | ||
| <padding> | ||
| <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> | ||
| </padding> | ||
| </HBox> | ||
| </children> | ||
| <stylesheets> | ||
| <URL value="@GRIP.css" /> | ||
| </stylesheets> | ||
| </VBox> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.