Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SAE2.01 - Developpement application
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PIQUEREZ Corentin
SAE2.01 - Developpement application
Commits
c0f1e326
Commit
c0f1e326
authored
1 year ago
by
PIQUEREZ Corentin
Browse files
Options
Downloads
Patches
Plain Diff
cases de précisions améliorées
parent
7816add3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
shukan/ShukanData.java
+0
-21
0 additions, 21 deletions
shukan/ShukanData.java
shukan/ShukanView.java
+14
-11
14 additions, 11 deletions
shukan/ShukanView.java
with
14 additions
and
32 deletions
shukan/ShukanData.java
+
0
−
21
View file @
c0f1e326
...
@@ -681,27 +681,6 @@ public class ShukanData
...
@@ -681,27 +681,6 @@ public class ShukanData
this
.
mod
[
selCur
][
selMod
].
exchange
(
selAct
,
selAct
+
selLength
-
1
);
this
.
mod
[
selCur
][
selMod
].
exchange
(
selAct
,
selAct
+
selLength
-
1
);
}
}
/** test if a week is active for a module */
public
boolean
isActiveWeek
(
int
week
,
int
mod
){
int
debut
=
moduleStart
(
cursusNumber
(),
mod
);
if
(
week
>=
debut
&&
(
week
<=
moduleEnd
(
cursusNumber
(),
mod
)
||
moduleEnd
(
cursusNumber
(),
mod
)==
0
))
{
int
[]
holly_weeks
=
moduleHollyWeeks
(
cursusNumber
(),
mod
);
int
[]
week_durations
=
weekDurations
();
// periode d'indisponibilité
for
(
int
i
=
0
;
i
<
holly_weeks
.
length
;
i
++)
{
if
(
week
==
holly_weeks
[
i
])
return
false
;
}
// hollydays
if
(
debut
==
0
)
{
if
(
week_durations
[
week
-
debut
-
4
]==
0
)
return
false
;
}
else
{
if
(
week_durations
[
week
-
debut
]==
0
)
return
false
;
}
return
true
;
}
// avant début de module ou après fin de module
return
false
;
}
/** convert a number of activity into a String */
/** convert a number of activity into a String */
public
String
activityName
(
int
number
){
public
String
activityName
(
int
number
){
return
mod
[
selCur
][
selectedModule
()].
activityName
(
number
);
return
mod
[
selCur
][
selectedModule
()].
activityName
(
number
);
...
...
This diff is collapsed.
Click to expand it.
shukan/ShukanView.java
+
14
−
11
View file @
c0f1e326
...
@@ -377,13 +377,13 @@ public class ShukanView extends JPanel
...
@@ -377,13 +377,13 @@ public class ShukanView extends JPanel
int
num_module
=
data
.
selectedModule
();
int
num_module
=
data
.
selectedModule
();
int
num_cursus
=
data
.
cursusNumber
();
int
num_cursus
=
data
.
cursusNumber
();
int
num_semaine
=
data
.
selectedWeek
()+
data
.
startWeekNumber
();
int
num_semaine
=
data
.
selectedWeek
()+
data
.
startWeekNumber
();
int
[]
week_activities
=
data
.
scheduleInWeek
(
num_module
,
data
.
selectedWeek
());
// affiche la fenetre si il y a cours pendant cette periode
// affiche la fenetre si il y a cours pendant cette periode
if
(
data
.
isActiveWeek
(
num_semaine
,
num_module
)
)
if
(
week_activities
.
length
>
0
)
{
{
JFrame
spec
=
new
JFrame
(
data
.
cursusName
(
num_cursus
)
+
" - Semaine"
+
(
num_semaine
)
+
" - "
+
data
.
moduleNames
(
num_cursus
)[
num_module
]);
JFrame
spec
=
new
JFrame
(
data
.
cursusName
(
num_cursus
)
+
" - Semaine"
+
(
num_semaine
)
+
" - "
+
data
.
moduleNames
(
num_cursus
)[
num_module
]);
int
[]
week_activities
=
data
.
scheduleInWeek
(
num_module
,
data
.
selectedWeek
());
int
[]
activities
=
data
.
activities
(
num_module
);
int
[]
activities
=
data
.
activities
(
num_module
);
int
nb_cours
=
week_activities
.
length
;
int
nb_cours
=
week_activities
.
length
;
boolean
rajout_prof
=
false
;
boolean
rajout_prof
=
false
;
...
@@ -392,19 +392,22 @@ public class ShukanView extends JPanel
...
@@ -392,19 +392,22 @@ public class ShukanView extends JPanel
JLabel
[]
noms_cours
=
new
JLabel
[
nb_cours
];
JLabel
[]
noms_cours
=
new
JLabel
[
nb_cours
];
JLabel
[]
duree
=
new
JLabel
[
nb_cours
];
JLabel
[]
duree
=
new
JLabel
[
nb_cours
];
JLabel
[]
profs
=
new
JLabel
[
nb_cours
];
JLabel
[]
profs
=
new
JLabel
[
nb_cours
];
String
nom_profs
;
for
(
int
i
=
0
;
i
<
nb_cours
;
i
++)
for
(
int
i
=
0
;
i
<
nb_cours
;
i
++)
{
{
String
[]
teachers
=
data
.
moduleTeachers
(
num_cursus
,
num_module
,
activities
[
week_activities
[
i
]]);
String
[]
teachers
=
data
.
moduleTeachers
(
num_cursus
,
num_module
,
activities
[
week_activities
[
i
]]);
String
nom_profs
=
teachers
[
0
];
if
(
teachers
.
length
>
0
){
for
(
int
j
=
1
;
j
<
teachers
.
length
;
j
++)
nom_profs
=
teachers
[
0
];
{
for
(
int
j
=
1
;
j
<
teachers
.
length
;
j
++)
{
rajout_prof
=
true
;
rajout_prof
=
true
;
for
(
int
k
=
0
;
k
<
j
;
k
++){
for
(
int
k
=
0
;
k
<
j
;
k
++)
{
if
(
teachers
[
j
]==
teachers
[
k
])
rajout_prof
=
false
;
if
(
teachers
[
j
]
==
teachers
[
k
])
rajout_prof
=
false
;
}
if
(
rajout_prof
)
nom_profs
+=
" / "
+
teachers
[
j
];
}
}
if
(
rajout_prof
)
nom_profs
+=
" / "
+
teachers
[
j
];
}
}
System
.
out
.
println
();
else
nom_profs
=
data
.
subtitle
(
num_module
);
noms_cours
[
i
]
=
new
JLabel
(
"Cours : "
+
data
.
activityName
(
activities
[
week_activities
[
i
]]));
noms_cours
[
i
]
=
new
JLabel
(
"Cours : "
+
data
.
activityName
(
activities
[
week_activities
[
i
]]));
noms_cours
[
i
].
setFont
(
new
Font
(
noms_cours
[
i
].
getFont
().
getFamily
(),
noms_cours
[
i
].
getFont
().
getStyle
()+
Font
.
BOLD
,
noms_cours
[
i
].
getFont
().
getSize
()+
10
));
noms_cours
[
i
].
setFont
(
new
Font
(
noms_cours
[
i
].
getFont
().
getFamily
(),
noms_cours
[
i
].
getFont
().
getStyle
()+
Font
.
BOLD
,
noms_cours
[
i
].
getFont
().
getSize
()+
10
));
duree
[
i
]
=
new
JLabel
(
" Durée : "
+
data
.
activityDuration
(
activities
[
week_activities
[
i
]])+
"h"
);
duree
[
i
]
=
new
JLabel
(
" Durée : "
+
data
.
activityDuration
(
activities
[
week_activities
[
i
]])+
"h"
);
...
...
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