Skip to content

Commit

Permalink
Merge pull request #34 from Evegen55/phone_panel
Browse files Browse the repository at this point in the history
Phone panel draft
  • Loading branch information
Evegen55 committed Feb 14, 2018
2 parents 54737d1 + 34dc80c commit fc9bee3
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/app/CarControlBoard.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void start(Stage primaryStage) throws IOException {
mainController.initWebcams();
mainController.initApplicationSettings();
mainController.initPhotoTab();
mainController.initPhoneTab();

//conflict with mainController.initWebcams() just because it uses it own version of an opencv lib?
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/controllers/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import controllers.openvc.MagicTabController;
import controllers.openvc.RecognizingTypeOfClassifier;
import controllers.openvc.RecognizingTypeOfDetection;
import controllers.phone.PhoneTabController;
import controllers.settings.ApplicationSettingsController;
import controllers.settings.LanguageList;
import controllers.settings.StyleList;
Expand Down Expand Up @@ -247,4 +248,9 @@ public void initOpenCVTab() {
magicTabController.init()
.showSimpleCameraInto(imageViewForOpenCV);
}

public void initPhoneTab() {
final PhoneTabController phoneTabController = new PhoneTabController();
phoneTabController.initPhone();
}
}
12 changes: 12 additions & 0 deletions src/main/java/controllers/phone/PhoneTabController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package controllers.phone;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PhoneTabController {
private final static Logger LOGGER = LoggerFactory.getLogger(PhoneTabController.class);

public void initPhone() {
LOGGER.info("Nothing to do. TODO");
}
}
7 changes: 7 additions & 0 deletions src/main/resources/css/anchorpane_phone.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#dark-blue {
-fx-background-color:
#090a0c,
linear-gradient(#38424b 0%, #1f2429 20%, #191d22 100%),
linear-gradient(#20262b, #191d22),
radial-gradient(center 50% 0%, radius 100%, rgba(114,131,148,0.9), rgba(255,255,255,0));
}
14 changes: 14 additions & 0 deletions src/main/resources/css/phone_pad.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.button {
-fx-alignment: center;
-fx-background-color:
#99ccff,
linear-gradient(#38424b 0%, #1f2429 20%, #99ccff 100%),
linear-gradient(#99ccff, #191d22),
radial-gradient(center 50% 0%, radius 100%, rgba(114,131,148,0.9), rgba(255,255,255,0));
-fx-border-color: black;
-fx-font-size: 30;
-fx-text-fill: white;
-fx-text-alignment: center;
-fx-border-radius: 10 10 10 10;
-fx-background-radius: 10 10 10 10;
}
44 changes: 44 additions & 0 deletions src/main/resources/css/phone_pad_1.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#green_button {
-fx-alignment: center;
-fx-background-color:
#99ccff,
linear-gradient(#99ff99 0%, #e6ffe6 20%, #00b300 100%),
linear-gradient(#99ff99, #00b300),
radial-gradient(center 50% 0%, radius 100%, rgba(114,131,148,0.9), rgba(255,255,255,0));
-fx-border-color: black;
-fx-font-size: 30;
-fx-text-fill: white;
-fx-text-alignment: center;
-fx-border-radius: 10 10 10 10;
-fx-background-radius: 10 10 10 10;
}

#red_button {
-fx-alignment: center;
-fx-background-color:
#99ccff,
linear-gradient(#ffc2b3 0%, #ffd6cc 20%, #cc2900 100%),
linear-gradient(#ffc2b3, #cc2900),
radial-gradient(center 50% 0%, radius 100%, rgba(114,131,148,0.9), rgba(255,255,255,0));
-fx-border-color: black;
-fx-font-size: 30;
-fx-text-fill: white;
-fx-text-alignment: center;
-fx-border-radius: 10 10 10 10;
-fx-background-radius: 10 10 10 10;
}

#yellow_button {
-fx-alignment: center;
-fx-background-color:
#fff0b3,
linear-gradient(#ffc2b3 0%, #ffd6cc 20%, #cc2900 100%),
linear-gradient(#fff0b3, #cc2900),
radial-gradient(center 50% 0%, radius 100%, rgba(255, 153, 102,0.9), rgba(255,255,255,0));
-fx-border-color: black;
-fx-font-size: 30;
-fx-text-fill: white;
-fx-text-alignment: center;
-fx-border-radius: 10 10 10 10;
-fx-background-radius: 10 10 10 10;
}
130 changes: 129 additions & 1 deletion src/main/resources/fxml/base_form.fxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.paint.*?>
<?import javafx.scene.effect.*?>
<?import javafx.geometry.*?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
Expand Down Expand Up @@ -31,7 +33,7 @@
<children>
<TabPane fx:id="tabPaneWithMap" prefHeight="1020.0" prefWidth="766.0" styleClass="tab" stylesheets="@../css/tab.css" tabClosingPolicy="UNAVAILABLE">
<tabs>
<Tab fx:id="tab_with_map" text="Maps and Routes">
<Tab fx:id="tab_with_map" text="Navigation">
<content>
<Pane fx:id="paneWithMap" prefHeight="50.0" prefWidth="50.0">
<children>
Expand Down Expand Up @@ -94,6 +96,132 @@
</Pane>
</content>
</Tab>
<Tab text="Phohe">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children>
<HBox layoutX="13.0" layoutY="10.0">
<children>
<TextField prefHeight="40.0" prefWidth="369.0" AnchorPane.leftAnchor="13.0" AnchorPane.topAnchor="10.0" />
<TextField layoutX="10.0" layoutY="10.0" prefHeight="40.0" prefWidth="369.0" AnchorPane.rightAnchor="13.0" />
</children>
</HBox>
<HBox layoutX="13.0" layoutY="60.0">
<children>
<VBox prefHeight="640.0" prefWidth="260.0" AnchorPane.leftAnchor="13.0" AnchorPane.topAnchor="60.0">
<children>
<GridPane prefHeight="560.0" prefWidth="260.0" AnchorPane.leftAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Button alignment="CENTER" graphicTextGap="0.0" maxHeight="80.0" minHeight="80.0" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="1" textAlignment="CENTER">
<font>
<Font name="System Bold" size="24.0" />
</font>
<effect>
<Reflection />
</effect>
</Button>
<Button minHeight="80.0" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="2" textAlignment="CENTER" GridPane.columnIndex="1">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button graphicTextGap="0.0" maxHeight="80.0" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="3" textAlignment="CENTER" GridPane.rowIndex="1">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button maxHeight="80.0" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="4" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="1">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="5" textAlignment="CENTER" GridPane.rowIndex="2">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button maxHeight="80.0" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="6" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="2">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button maxHeight="80.0" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="7" textAlignment="CENTER" GridPane.rowIndex="3">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="8" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="3">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="9" textAlignment="CENTER" GridPane.rowIndex="4">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="0" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="4">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="*" textAlignment="CENTER" GridPane.rowIndex="5">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad.css" text="#" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="5">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button id="green_button" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad_1.css" text="CALL" textAlignment="CENTER" GridPane.rowIndex="6">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
<Button id="red_button" mnemonicParsing="false" opacity="0.79" prefHeight="80.0" prefWidth="130.0" stylesheets="@../css/phone_pad_1.css" text="BREAK" textAlignment="CENTER" GridPane.columnIndex="1" GridPane.rowIndex="6">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
</children>
</GridPane>
<Button mnemonicParsing="false" prefHeight="80.0" prefWidth="260.0" stylesheets="@../css/phone_pad.css" text="911">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Button>
</children>
</VBox>
<Pane prefHeight="640.0" prefWidth="480.0" style="-fx-border-color: black;" AnchorPane.rightAnchor="13.0" AnchorPane.topAnchor="60.0">
<children>
<ImageView fitHeight="640.0" fitWidth="480.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../pic/starman.jpg" />
</image>
</ImageView>
</children>
</Pane>
</children>
</HBox>
</children>
</AnchorPane>
</content>
</Tab>
<Tab fx:id="tab_with_music" text="Music">
<content>
<AnchorPane>
Expand Down
Binary file added src/main/resources/pic/bush_doing_it_wrong.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/pic/starman.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fc9bee3

Please sign in to comment.