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
a8ed85a5
Commit
a8ed85a5
authored
6 years ago
by
Salles Coralie
Browse files
Options
Downloads
Patches
Plain Diff
Add Data graph V0
parent
d1817e7d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/Vue/FXMLVue.fxml
+44
-0
44 additions, 0 deletions
app/src/Vue/FXMLVue.fxml
app/src/Vue/FXMLVueController.java
+24
-1
24 additions, 1 deletion
app/src/Vue/FXMLVueController.java
with
68 additions
and
1 deletion
app/src/Vue/FXMLVue.fxml
+
44
−
0
View file @
a8ed85a5
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.chart.CategoryAxis?>
<?import javafx.scene.chart.LineChart?>
<?import javafx.scene.chart.NumberAxis?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
...
...
@@ -184,11 +190,49 @@
<HBox
alignment=
"CENTER"
prefHeight=
"100.0"
prefWidth=
"200.0"
spacing=
"30.0"
style=
"-fx-background-color: white;"
GridPane.halignment=
"CENTER"
GridPane.rowIndex=
"2"
GridPane.valignment=
"CENTER"
>
<children>
<Button
fx:id=
"buttonAccueil"
mnemonicParsing=
"false"
onAction=
"#clickAccueil"
prefWidth=
"90.0"
text=
"Accueil"
/>
<Button
fx:id=
"buttonData"
mnemonicParsing=
"false"
onAction=
"#clickData"
prefWidth=
"90.0"
text=
"Données"
/>
<Button
fx:id=
"buttonConfig"
mnemonicParsing=
"false"
onAction=
"#clickConfig"
prefWidth=
"90.0"
text=
"Configuration"
/>
</children>
<GridPane.margin>
<Insets
bottom=
"5.0"
top=
"5.0"
/>
</GridPane.margin>
</HBox>
<GridPane
fx:id=
"data"
visible=
"false"
GridPane.rowIndex=
"1"
>
<columnConstraints>
<ColumnConstraints
hgrow=
"SOMETIMES"
minWidth=
"10.0"
prefWidth=
"100.0"
/>
</columnConstraints>
<rowConstraints>
<RowConstraints
maxHeight=
"270.3333435058594"
minHeight=
"10.0"
prefHeight=
"231.0"
vgrow=
"SOMETIMES"
/>
<RowConstraints
maxHeight=
"138.33331298828125"
minHeight=
"10.0"
prefHeight=
"55.0"
vgrow=
"SOMETIMES"
/>
<RowConstraints
maxHeight=
"138.33331298828125"
minHeight=
"10.0"
prefHeight=
"55.0"
vgrow=
"SOMETIMES"
/>
</rowConstraints>
<children>
<LineChart
fx:id=
"graph"
alternativeColumnFillVisible=
"true"
>
<xAxis>
<CategoryAxis
side=
"BOTTOM"
/>
</xAxis>
<yAxis>
<NumberAxis
side=
"LEFT"
/>
</yAxis>
</LineChart>
<HBox
alignment=
"CENTER"
prefHeight=
"100.0"
prefWidth=
"200.0"
spacing=
"20.0"
GridPane.halignment=
"CENTER"
GridPane.rowIndex=
"1"
GridPane.valignment=
"CENTER"
>
<children>
<RadioButton
mnemonicParsing=
"false"
selected=
"true"
text=
"Jour"
>
<toggleGroup>
<ToggleGroup
fx:id=
"granulation"
/>
</toggleGroup>
</RadioButton>
<RadioButton
mnemonicParsing=
"false"
text=
"Semaine"
toggleGroup=
"$granulation"
/>
<RadioButton
mnemonicParsing=
"false"
text=
"Mois"
toggleGroup=
"$granulation"
/>
</children>
</HBox>
<HBox
alignment=
"CENTER"
prefHeight=
"100.0"
prefWidth=
"200.0"
spacing=
"20.0"
GridPane.halignment=
"CENTER"
GridPane.rowIndex=
"2"
GridPane.valignment=
"CENTER"
>
<children>
<Label
text=
"Visualiser la donnée : "
/>
<ComboBox
fx:id=
"dataGraph"
prefWidth=
"150.0"
/>
</children>
</HBox>
</children>
</GridPane>
</children>
</GridPane>
This diff is collapsed.
Click to expand it.
app/src/Vue/FXMLVueController.java
+
24
−
1
View file @
a8ed85a5
...
...
@@ -18,10 +18,13 @@ import javafx.beans.value.ObservableValue;
import
javafx.event.ActionEvent
;
import
javafx.fxml.FXML
;
import
javafx.fxml.Initializable
;
import
javafx.scene.chart.LineChart
;
import
javafx.scene.control.Button
;
import
javafx.scene.control.CheckBox
;
import
javafx.scene.control.ComboBox
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.TextField
;
import
javafx.scene.control.ToggleGroup
;
import
javafx.scene.layout.GridPane
;
import
javafx.scene.layout.HBox
;
...
...
@@ -75,6 +78,16 @@ public class FXMLVueController implements Initializable, Observer {
private
HBox
urgentArrosage
;
private
boolean
alert
;
@FXML
private
LineChart
<?,
?>
graph
;
@FXML
private
ToggleGroup
granulation
;
@FXML
private
ComboBox
<?>
dataGraph
;
@FXML
private
GridPane
data
;
@FXML
private
Button
buttonData
;
/**
* Initializes the controller class.
...
...
@@ -89,7 +102,7 @@ public class FXMLVueController implements Initializable, Observer {
currentButton
=
buttonAccueil
;
currentButton
.
setStyle
(
"-fx-background-color: #7fca5eff"
);
//Only allow integers as a value for the seuil
seuil
.
textProperty
().
addListener
(
new
ChangeListener
<
String
>()
{
@Override
...
...
@@ -212,4 +225,14 @@ public class FXMLVueController implements Initializable, Observer {
this
.
planteHydrate
.
setVisible
(
true
);
}
}
@FXML
private
void
clickData
(
ActionEvent
event
)
{
currentGridPane
.
setVisible
(
false
);
data
.
setVisible
(
true
);
currentGridPane
=
data
;
currentButton
.
setStyle
(
"-fx-background-color: #d5d5d5ff"
);
currentButton
=
buttonData
;
currentButton
.
setStyle
(
"-fx-background-color: #7fca5eff"
);
}
}
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