Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tp-4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pirkl-poo-2018
tp-4
Commits
86997c29
Verified
Commit
86997c29
authored
6 years ago
by
Théo Pirkl
Browse files
Options
Downloads
Patches
Plain Diff
Begins LeftJourney handling
parent
d78718cf
No related branches found
No related tags found
1 merge request
!21
*poof* final version
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/ch/hepia/config/AppConfig.java
+1
-1
1 addition, 1 deletion
src/main/java/ch/hepia/config/AppConfig.java
src/main/java/ch/hepia/ui/MainWindowController.java
+6
-2
6 additions, 2 deletions
src/main/java/ch/hepia/ui/MainWindowController.java
with
7 additions
and
3 deletions
src/main/java/ch/hepia/config/AppConfig.java
+
1
−
1
View file @
86997c29
...
...
@@ -22,7 +22,7 @@ public final class AppConfig {
public
static
final
String
ERROR_API_UNREACHABLE
=
"Impossible de contacter les services de transport Suisses."
;
public
static
final
String
DEFAULT_JOURNEY_TEXT
=
"Vous n'avez prévu aucun voyage pour le moment."
;
public
static
List
<
String
>
CHAT_COMMANDS
=
List
.
of
(
"help"
,
...
...
This diff is collapsed.
Click to expand it.
src/main/java/ch/hepia/ui/MainWindowController.java
+
6
−
2
View file @
86997c29
...
...
@@ -74,6 +74,7 @@ public class MainWindowController implements Initializable {
private
Pane
connectionContainer
;
private
List
<
Connection
>
currentConnections
;
private
Connection
currentConnection
;
/**
* Shows a sad message when the API crashes.
...
...
@@ -325,7 +326,7 @@ public class MainWindowController implements Initializable {
*/
@Override
public
void
initialize
(
URL
url
,
ResourceBundle
resourceBundle
)
{
currentJourneyLabel
.
setText
(
"Vous n'avez prévu aucun voyage pour le moment."
);
currentJourneyLabel
.
setText
(
AppConfig
.
DEFAULT_JOURNEY_TEXT
);
startStopLabel
.
setText
(
""
);
// No text should be visible when no journey has been selected.
messageTextBox
.
textProperty
().
addListener
((
ov
,
oldValue
,
newValue
)
->
{
if
(
messageTextBox
.
getText
().
length
()
>
60
)
{
...
...
@@ -358,7 +359,10 @@ public class MainWindowController implements Initializable {
pane
.
setOnMouseClicked
(
e
->
{
Pane
pnl
=
(
Pane
)
e
.
getSource
();
Integer
pos
=
Integer
.
parseInt
(
pnl
.
getId
());
app
.
getMessageManager
().
sendJoinedJourney
(
new
JoinedJourney
(
app
.
getUser
().
get
(),
currentConnections
.
get
(
pos
)));
currentConnection
=
currentConnections
.
get
(
pos
);
currentJourneyLabel
.
setText
(
""
);
app
.
getMessageManager
()
.
sendJoinedJourney
(
new
JoinedJourney
(
app
.
getUser
().
get
(),
currentConnection
));
});
});
}
...
...
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