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
e987137f
Commit
e987137f
authored
2 years ago
by
PIQUEREZ Corentin
Browse files
Options
Downloads
Patches
Plain Diff
thème sombre début, profs dans fenetre de précision en cours
parent
e348baa1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
shukan/ShukanController.java
+1
-1
1 addition, 1 deletion
shukan/ShukanController.java
shukan/ShukanParameters.java
+9
-6
9 additions, 6 deletions
shukan/ShukanParameters.java
shukan/ShukanView.java
+16
-3
16 additions, 3 deletions
shukan/ShukanView.java
with
26 additions
and
10 deletions
shukan/ShukanController.java
+
1
−
1
View file @
e987137f
...
...
@@ -232,7 +232,7 @@ public class ShukanController
new
ShukanTex
(
data
);
else
if
(
e
.
getSource
()==
bar
.
buttons
[
7
]){
EventQueue
.
invokeLater
(()
->
{
ShukanParameters
myParameters
=
new
ShukanParameters
(
"Changer de thème"
);
ShukanParameters
myParameters
=
new
ShukanParameters
(
"Changer de thème"
,
canvas
);
myParameters
.
setSize
(
300
,
300
);
myParameters
.
setVisible
(
true
);
});
...
...
This diff is collapsed.
Click to expand it.
shukan/ShukanParameters.java
+
9
−
6
View file @
e987137f
...
...
@@ -11,10 +11,12 @@ class ShukanParameters extends JFrame {
private
JPanel
pPrincipal
,
p
,
p1
;
/** buttons of the graphic interface */
private
JButton
changerdetheme
,
theme1
,
theme2
,
theme3
,
retour
,
changertouches
,
changercouleurs
;
/** view of the app */
private
ShukanView
canvas
;
/** built a parameter window */
public
ShukanParameters
(
String
titre
)
{
public
ShukanParameters
(
String
titre
,
ShukanView
canvas
)
{
super
(
titre
);
this
.
canvas
=
canvas
;
p
=
new
JPanel
(
new
GridBagLayout
());
GridBagConstraints
gbcprinc
=
new
GridBagConstraints
();
...
...
@@ -41,11 +43,12 @@ class ShukanParameters extends JFrame {
theme1
=
new
JButton
(
"Thème sombre"
);
theme1
.
setPreferredSize
(
new
Dimension
(
150
,
25
));
/*theme1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEVent e) {
getContentPane().setBackground(Color.BLACK);
theme1
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
canvas
.
setBackgroundColor
(
Color
.
BLACK
);
}
});
*/
});
theme2
=
new
JButton
(
"Thème clair"
);
theme2
.
setPreferredSize
(
new
Dimension
(
150
,
25
));
...
...
This diff is collapsed.
Click to expand it.
shukan/ShukanView.java
+
16
−
3
View file @
e987137f
...
...
@@ -65,7 +65,7 @@ public class ShukanView extends JPanel
/** Background color */
private
final
Color
BACK_COLOR
=
Color
.
WHITE
;
private
Color
BACK_COLOR
=
Color
.
WHITE
;
/** Grid color */
private
final
Color
GRID_COLOR
=
Color
.
BLACK
;
/** Free module weeks color */
...
...
@@ -377,6 +377,7 @@ public class ShukanView extends JPanel
int
num_module
=
data
.
selectedModule
();
int
num_cursus
=
data
.
cursusNumber
();
int
num_semaine
=
data
.
selectedWeek
()+
data
.
startWeekNumber
();
// affiche la fenetre si il y a cours pendant cette periode
if
(
data
.
isActiveWeek
(
num_semaine
,
num_module
))
{
...
...
@@ -385,6 +386,7 @@ public class ShukanView extends JPanel
int
[]
week_activities
=
data
.
scheduleInWeek
(
num_module
,
data
.
selectedWeek
());
int
[]
activities
=
data
.
activities
(
num_module
);
int
nb_cours
=
week_activities
.
length
;
boolean
rajout_prof
=
false
;
JPanel
cours
=
new
JPanel
(
new
GridLayout
(
nb_cours
*
3
,
1
));
JLabel
[]
noms_cours
=
new
JLabel
[
nb_cours
];
...
...
@@ -392,10 +394,17 @@ public class ShukanView extends JPanel
JLabel
[]
profs
=
new
JLabel
[
nb_cours
];
for
(
int
i
=
0
;
i
<
nb_cours
;
i
++)
{
String
[]
teachers
=
data
.
moduleTeachers
(
num_cursus
,
num_module
,
activities
[
week_activities
[
i
]]);
String
nom_profs
=
teachers
[
0
];
for
(
int
j
=
1
;
j
<
teachers
.
length
;
j
++)
{
nom_profs
+=
" / "
+
teachers
[
j
];
}
System
.
out
.
println
();
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
));
duree
[
i
]
=
new
JLabel
(
" Durée : "
+
data
.
activityDuration
(
activities
[
week_activities
[
i
]])+
"h"
);
profs
[
i
]
=
new
JLabel
(
" Professeur : "
+
data
.
subtitle
(
num_module
)
);
profs
[
i
]
=
new
JLabel
(
" Professeur : "
+
nom_profs
);
cours
.
add
(
noms_cours
[
i
]);
cours
.
add
(
duree
[
i
]);
cours
.
add
(
profs
[
i
]);
...
...
@@ -407,5 +416,9 @@ public class ShukanView extends JPanel
}
}
/** change the background color */
public
void
setBackgroundColor
(
Color
c
){
BACK_COLOR
=
c
;
repaint
();
}
}
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