Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flooding-template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SAIDI Hatim
flooding-template
Commits
d324c2b1
Commit
d324c2b1
authored
2 years ago
by
SAIDI Hatim
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
45a1e5e8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/util/CyclicColorGenerator.java
+9
-2
9 additions, 2 deletions
app/src/main/java/util/CyclicColorGenerator.java
with
9 additions
and
2 deletions
app/src/main/java/util/CyclicColorGenerator.java
+
9
−
2
View file @
d324c2b1
...
@@ -10,15 +10,22 @@ import javafx.scene.paint.Color;
...
@@ -10,15 +10,22 @@ import javafx.scene.paint.Color;
public
class
CyclicColorGenerator
implements
ColorGenerator
{
public
class
CyclicColorGenerator
implements
ColorGenerator
{
private
List
<
Color
>
colors
;
private
List
<
Color
>
colors
;
private
int
appels
;
public
CyclicColorGenerator
(
List
<
Color
>
colors
){
public
CyclicColorGenerator
(
List
<
Color
>
colors
){
this
.
colors
=
colors
;
this
.
colors
=
colors
;
this
.
appels
=
appels
+
1
;
}
}
public
Color
nextColor
(
Cell
cell
){
public
Color
nextColor
(
Cell
cell
){
Color
color
=
colors
.
get
(
0
);
CyclicColorGenerator
cyclicColorGenerator
=
new
CyclicColorGenerator
(
new
ArrayList
<>());
return
color
;
while
(
cyclicColorGenerator
.
appels
<=
this
.
colors
.
size
()){
return
colors
.
get
(
cyclicColorGenerator
.
appels
-
1
);
}
cyclicColorGenerator
.
appels
=
0
;
return
colors
.
get
(
cyclicColorGenerator
.
appels
);
}
}
}
}
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