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
82d44913
Commit
82d44913
authored
1 year ago
by
CHEVALIER Noemy
Browse files
Options
Downloads
Patches
Plain Diff
Ajout fonctions convertions couleurs
parent
25a0b11d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shukan/ShukanView.java
+16
-5
16 additions, 5 deletions
shukan/ShukanView.java
with
16 additions
and
5 deletions
shukan/ShukanView.java
+
16
−
5
View file @
82d44913
...
...
@@ -70,13 +70,14 @@ public class ShukanView extends JPanel
/** Background color */
private
Color
BACK_COLOR
=
new
ColorUIResource
(
226
,
226
,
226
);
/** Background color */
private
Color
BACK_COLOR2
=
Color
.
LIGHT_GRAY
;
/** Grid color */
private
final
Color
GRID_COLOR
=
Color
.
BLACK
;
/** Free module weeks color */
private
final
Color
HOLLY_COLOR
=
new
Color
(
1
.
f
,
0.8f
,
0.7f
);
private
Color
HOLLY_COLOR
=
new
Color
(
1
.
f
,
0.8f
,
0.7f
);
/** Inactive parts of weeks color */
private
final
Color
INACTIVE_COLOR
=
new
Color
(
0.5f
,
0.5f
,
0.5f
);
private
Color
INACTIVE_COLOR
=
new
Color
(
0.5f
,
0.5f
,
0.5f
);
/** Frame borders color */
private
final
Color
ACTIVE_COLOR
=
new
Color
(
0.6f
,
0.6f
,
0.9f
);
/** Selected activity color */
...
...
@@ -84,7 +85,7 @@ public class ShukanView extends JPanel
/** Frame borders color */
private
final
Color
FRAME_COLOR
=
Color
.
BLACK
;
/** Text color */
private
final
Color
TEXT_COLOR
=
Color
.
BLACK
;
private
Color
TEXT_COLOR
=
Color
.
BLACK
;
/** Selected text color */
private
final
Color
SELECTED_TEXT_COLOR
=
Color
.
WHITE
;
/** Unselectable text color */
...
...
@@ -377,6 +378,7 @@ public class ShukanView extends JPanel
private
void
drawText
(
Graphics2D
g2
,
float
posx
,
float
posy
,
float
width
,
float
height
,
String
text
)
{
g2
.
setColor
(
TEXT_COLOR
);
g2
.
drawString
(
text
,
(
int
)
(
posx
+
(
width
-
fontMetrics
.
stringWidth
(
text
))
/
2
),
appliHeight
-
(
int
)
(
posy
+
(
height
-
fontHeight
)
/
2
));
...
...
@@ -446,9 +448,18 @@ public class ShukanView extends JPanel
}
}
/**
c
hange the background color */
public
void
setBackgroundColor
(
Color
c
){
/**
C
hange the background color */
public
void
setBackgroundColor
(
Color
c
,
Color
c1
){
BACK_COLOR
=
c
;
BACK_COLOR2
=
c1
;
repaint
();
}
/** Change the text and the hollydays colors*/
public
void
setForeground
(
Color
c
,
Color
c1
,
Color
c2
){
TEXT_COLOR
=
c
;
HOLLY_COLOR
=
c1
;
INACTIVE_COLOR
=
c2
;
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