Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plante-qui-pleure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Puissegur Alexis
plante-qui-pleure
Commits
90b9573c
Commit
90b9573c
authored
6 years ago
by
Salles Coralie
Browse files
Options
Downloads
Patches
Plain Diff
Clean code controller
parent
a8ed85a5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/Vue/FXMLVueController.java
+28
-23
28 additions, 23 deletions
app/src/Vue/FXMLVueController.java
with
28 additions
and
23 deletions
app/src/Vue/FXMLVueController.java
+
28
−
23
View file @
90b9573c
...
...
@@ -34,7 +34,7 @@ import javafx.scene.layout.HBox;
* @author invite
*/
public
class
FXMLVueController
implements
Initializable
,
Observer
{
//Page d'accueil
@FXML
private
GridPane
accueil
;
@FXML
...
...
@@ -47,7 +47,12 @@ public class FXMLVueController implements Initializable, Observer {
private
Label
humidityPlante
;
@FXML
private
Label
humiditySeuil
;
@FXML
private
HBox
planteHydrate
;
@FXML
private
HBox
urgentArrosage
;
//Page de configuration
@FXML
private
GridPane
configuration
;
@FXML
...
...
@@ -56,39 +61,35 @@ public class FXMLVueController implements Initializable, Observer {
private
Label
seuilError
;
@FXML
private
CheckBox
arrosageAuto
;
private
GridPane
currentGridPane
;
private
Button
currentButton
;
@FXML
private
Button
buttonAccueil
;
@FXML
private
Button
buttonConfig
;
@FXML
private
Button
buttonBluetooth
;
@FXML
private
Label
activationMessage
;
private
boolean
isConnected
=
false
;
private
BluetoothManager
bluetoothManager
;
@FXML
private
HBox
planteHydrate
;
@FXML
private
HBox
urgentArrosage
;
private
boolean
alert
;
//Page de graphes
@FXML
private
LineChart
<?,
?>
graph
;
private
GridPane
data
;
@FXML
private
ToggleGroup
granulation
;
private
LineChart
<
Number
,
Number
>
graph
;
@FXML
private
ComboBox
<?>
dataGraph
;
private
ToggleGroup
granulation
;
@FXML
private
GridPane
data
;
private
ComboBox
<
String
>
dataGraph
;
//Barre de menu avec les boutons
@FXML
private
Button
buttonData
;
@FXML
private
Button
buttonAccueil
;
@FXML
private
Button
buttonConfig
;
private
GridPane
currentGridPane
;
private
Button
currentButton
;
private
boolean
alert
;
private
boolean
isConnected
=
false
;
private
BluetoothManager
bluetoothManager
;
/**
* Initializes the controller class.
*/
...
...
@@ -96,12 +97,12 @@ public class FXMLVueController implements Initializable, Observer {
public
void
initialize
(
URL
url
,
ResourceBundle
rb
)
{
bluetoothManager
=
new
BluetoothManager
(
this
);
alert
=
false
;
//Put the gridPane Accueil visible
accueil
.
setVisible
(
true
);
currentGridPane
=
accueil
;
currentButton
=
buttonAccueil
;
currentButton
.
setStyle
(
"-fx-background-color: #7fca5eff"
);
//Only allow integers as a value for the seuil
seuil
.
textProperty
().
addListener
(
new
ChangeListener
<
String
>()
{
...
...
@@ -226,6 +227,10 @@ public class FXMLVueController implements Initializable, Observer {
}
}
/**
* Change the page for the grah page when clicking on data button
* @param event
*/
@FXML
private
void
clickData
(
ActionEvent
event
)
{
currentGridPane
.
setVisible
(
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment