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
93c45de6
Commit
93c45de6
authored
6 years ago
by
Salles Coralie
Browse files
Options
Downloads
Patches
Plain Diff
button interface bluetooth
parent
373ecec5
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
+3
-3
3 additions, 3 deletions
app/src/Vue/FXMLVue.fxml
app/src/Vue/FXMLVueController.java
+18
-11
18 additions, 11 deletions
app/src/Vue/FXMLVueController.java
with
21 additions
and
14 deletions
app/src/Vue/FXMLVue.fxml
+
3
−
3
View file @
93c45de6
...
...
@@ -30,7 +30,7 @@
<Font
name=
"Trebuchet MS Bold"
size=
"28.0"
/>
</font>
</Label>
<GridPane
fx:id=
"accueil"
style=
"-fx-background-color: white;"
visible=
"false"
GridPane.rowIndex=
"1"
>
<GridPane
fx:id=
"accueil"
style=
"-fx-background-color: white;"
GridPane.rowIndex=
"1"
>
<columnConstraints>
<ColumnConstraints
hgrow=
"SOMETIMES"
minWidth=
"10.0"
prefWidth=
"100.0"
/>
<ColumnConstraints
hgrow=
"SOMETIMES"
maxWidth=
"-Infinity"
minWidth=
"10.0"
prefWidth=
"20.0"
/>
...
...
@@ -119,7 +119,7 @@
<Insets
bottom=
"10.0"
left=
"10.0"
right=
"10.0"
/>
</GridPane.margin>
</GridPane>
<GridPane
fx:id=
"configuration"
style=
"-fx-background-color: white;"
GridPane.rowIndex=
"1"
>
<GridPane
fx:id=
"configuration"
style=
"-fx-background-color: white;"
visible=
"false"
GridPane.rowIndex=
"1"
>
<columnConstraints>
<ColumnConstraints
hgrow=
"SOMETIMES"
minWidth=
"10.0"
prefWidth=
"100.0"
/>
</columnConstraints>
...
...
@@ -161,7 +161,7 @@
<VBox
alignment=
"CENTER"
prefHeight=
"200.0"
prefWidth=
"100.0"
spacing=
"10.0"
GridPane.halignment=
"CENTER"
GridPane.rowIndex=
"3"
GridPane.valignment=
"CENTER"
>
<children>
<Button
fx:id=
"buttonBluetooth"
mnemonicParsing=
"false"
onAction=
"#clickActivationBluetooth"
text=
"Activation bluetooth"
/>
<Label
fx:id=
"activationMessage"
/>
<Label
fx:id=
"activationMessage"
text=
"Connection bluetooth désactivée"
/>
</children>
<GridPane.margin>
<Insets
bottom=
"10.0"
top=
"10.0"
/>
...
...
This diff is collapsed.
Click to expand it.
app/src/Vue/FXMLVueController.java
+
18
−
11
View file @
93c45de6
...
...
@@ -68,22 +68,14 @@ public class FXMLVueController implements Initializable {
private
Label
activationMessage
;
private
boolean
isConnected
=
false
;
private
BluetoothManager
bluetoothManager
;
/**
* Initializes the controller class.
*/
@Override
public
void
initialize
(
URL
url
,
ResourceBundle
rb
)
{
/**
BluetoothManager bluetoothManager = new BluetoothManager(this);
bluetoothManager.launch();
try {
bluetoothManager.startThread();
} catch (Exception ex) {
Logger.getLogger(FXMLVueController.class.getName()).log(Level.SEVERE, null, ex);
}
**/
bluetoothManager
=
new
BluetoothManager
(
this
);
//Put the gridPane Accueil visible
accueil
.
setVisible
(
true
);
...
...
@@ -151,6 +143,21 @@ public class FXMLVueController implements Initializable {
@FXML
private
void
clickActivationBluetooth
(
ActionEvent
event
)
{
if
(!
this
.
isConnected
){
isConnected
=
bluetoothManager
.
launch
();
}
if
(
isConnected
){
try
{
bluetoothManager
.
startThread
();
this
.
activationMessage
.
setText
(
"Connection bluetooth activée"
);
this
.
buttonBluetooth
.
setDisable
(
true
);
}
catch
(
Exception
ex
)
{
Logger
.
getLogger
(
FXMLVueController
.
class
.
getName
()).
log
(
Level
.
SEVERE
,
null
,
ex
);
}
}
}
public
void
update
(
BluetoothThread
t
){
...
...
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