Skip to content

Commit

Permalink
Merge pull request #13 from Evegen55/tab_for_photos
Browse files Browse the repository at this point in the history
  • Loading branch information
Evegen55 authored Dec 4, 2017
2 parents 0d23608 + 5606579 commit c71d2be
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 27 deletions.
29 changes: 23 additions & 6 deletions src/main/java/app/CarControlBoard.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
package app;
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (C) 2017 - 2017 Evgenii Lartcev (https://github.com/Evegen55/) and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @author Evgenii Lartcev
* @created on 10/20/2017.
*
* @author (created on 10/20/2017).
* Here is the main application *
*/

package app;

import controllers.MainController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
Expand All @@ -15,10 +35,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
* Here is the main application
*/
public class CarControlBoard extends Application {
public final class CarControlBoard extends Application {

public static final ExecutorService EXECUTOR_SERVICE = Executors.newCachedThreadPool();

Expand Down
27 changes: 23 additions & 4 deletions src/main/java/controllers/GmapfxController.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
* <p>
* Copyright (C) 2017 - 2017 Evgenii Lartcev (https://github.com/Evegen55/) and contributors
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @author Evgenii Lartcev
* @created on 10/20/2017
*/

package controllers;

import com.lynden.gmapsfx.GoogleMapView;
Expand Down Expand Up @@ -28,10 +50,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author (created on 10/20/2017).
*/
public class GmapfxController implements MapComponentInitializedListener, DirectionsServiceCallback, GeocodingServiceCallback {
public final class GmapfxController implements MapComponentInitializedListener, DirectionsServiceCallback, GeocodingServiceCallback {

private final static Logger LOGGER = LoggerFactory.getLogger(GmapfxController.class);

Expand Down
28 changes: 23 additions & 5 deletions src/main/java/controllers/MainController.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
* <p>
* Copyright (C) 2017 - 2017 Evgenii Lartcev (https://github.com/Evegen55/) and contributors
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @author Evgenii Lartcev
* @created on 10/23/2017
*/

package controllers;

import controllers.settings.ApplicationSettingsController;
Expand All @@ -6,7 +28,6 @@
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Slider;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
Expand All @@ -18,10 +39,7 @@
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

/**
* @author (created on 10/23/2017).
*/
public class MainController {
public final class MainController {

private final Stage primaryStage;

Expand Down
18 changes: 6 additions & 12 deletions src/main/java/entities/AudioItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javafx.scene.control.Slider;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Circle;


Expand All @@ -16,7 +16,7 @@
*
* @author (created on 10/30/2017).
*/
public class AudioItem extends AnchorPane {
public class AudioItem extends Pane {

private final Button play = new Button();
private final Button pause = new Button();
Expand All @@ -26,22 +26,22 @@ public class AudioItem extends AnchorPane {
private final Label label_for_name = new Label();
private final Label label_for_time = new Label();

private static Image imagePlay = new Image("http://icons.iconarchive.com/icons/hopstarter/soft-scraps/48/Button-Play-icon.png");
private static Image imageStop = new Image("http://icons.iconarchive.com/icons/icons-land/play-stop-pause/48/Stop-Normal-icon.png");
private static final Image IMAGE_PLAY = new Image("http://icons.iconarchive.com/icons/hopstarter/soft-scraps/48/Button-Play-icon.png");
private static final Image IMAGE_STOP = new Image("http://icons.iconarchive.com/icons/icons-land/play-stop-pause/48/Stop-Normal-icon.png");
private static final double RADIUS_IMAGE_VIEW_BUTTON = Math.sqrt(Math.pow(50.0 / 2, 2) * 2);

public AudioItem() {
super();
super.setPrefHeight(80.0);
super.setPrefWidth(661.0);

final ImageView imageViewPlayButton = new ImageView(imagePlay);
final ImageView imageViewPlayButton = new ImageView(IMAGE_PLAY);
imageViewPlayButton.setFitHeight(50.0);
imageViewPlayButton.setFitWidth(50.0);
imageViewPlayButton.setPreserveRatio(true);
imageViewPlayButton.setPickOnBounds(true);

final ImageView imageViewStopButton = new ImageView(imageStop);
final ImageView imageViewStopButton = new ImageView(IMAGE_STOP);
imageViewStopButton.setFitHeight(50.0);
imageViewStopButton.setFitWidth(50.0);
imageViewStopButton.setPreserveRatio(true);
Expand Down Expand Up @@ -80,12 +80,6 @@ public AudioItem() {
this.getChildren().addAll(play, stop, label_for_name, label_for_time, slider);
}

public AudioItem(double layOutX, double layOutY) {
this();
super.setLayoutX(layOutX);
super.setLayoutY(layOutY);
}

public Button getPlay() {
return play;
}
Expand Down
30 changes: 30 additions & 0 deletions src/main/resources/fxml/base_form.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,36 @@
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
</content>
</Tab>
<Tab text="Photos">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children>
<FlowPane prefHeight="129.0" prefWidth="71.0" AnchorPane.rightAnchor="10.0">
<children>
<Button fx:id="btn_pick_folder_photo" mnemonicParsing="false" prefHeight="64.0" prefWidth="64.0">
<graphic>
<ImageView fitHeight="64.0" fitWidth="64.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="http://icons.iconarchive.com/icons/gakuseisean/aire/64/Pictures-icon.png" />
</image>
</ImageView>
</graphic>
</Button>
<Button fx:id="btn_choose_photo" mnemonicParsing="false" prefHeight="64.0" prefWidth="64.0">
<graphic>
<ImageView fitHeight="64.0" fitWidth="64.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="http://icons.iconarchive.com/icons/gakuseisean/aire/64/Images-icon.png" />
</image>
</ImageView>
</graphic>
</Button>
</children>
</FlowPane>
</children>
</AnchorPane>
</content>
</Tab>
<Tab text="Settings">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
Expand Down

0 comments on commit c71d2be

Please sign in to comment.