Skip to content
Snippets Groups Projects
Commit d61e776b authored by vitawrap's avatar vitawrap
Browse files

Java: Couleurs de tâches

parent ab43abd0
Branches
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ public class ProjetController { ...@@ -52,7 +52,7 @@ public class ProjetController {
g.setStroke(Color.DARKGRAY); g.setStroke(Color.DARKGRAY);
g.strokeRect(0, 0, xmargin, h); g.strokeRect(0, 0, xmargin, h);
// Remplissage alterné des machines. (avec données de test) // Remplissage alterné des machines.
int mach = 0; int mach = 0;
for (int y = 0; y < _canvas.getHeight(); y += hentry) for (int y = 0; y < _canvas.getHeight(); y += hentry)
{ {
...@@ -68,10 +68,12 @@ public class ProjetController { ...@@ -68,10 +68,12 @@ public class ProjetController {
} }
} }
// Affichage des tâches par machine (Avec données de test) // Affichage des tâches par machine
int c = 3;
g.setFill(Color.DODGERBLUE); g.setFill(Color.DODGERBLUE);
for (DisplayedTask task : tasklist) for (DisplayedTask task : tasklist)
{ {
g.setFill(Color.rgb((++c * 23) & 255, (++c * 11) & 255, (++c * 67) & 255));
g.fillRect(xmargin + (task.getStart() * dtunit), g.fillRect(xmargin + (task.getStart() * dtunit),
task.getMachine() * hentry, task.getMachine() * hentry,
task.getLength() * dtunit, task.getLength() * dtunit,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment