예제 #1
0
 public PanelColor(int id, Fenetre f, DisplayColor dc, Button backButton, int w, int h) {
   this.estConstructeurBis = true;
   this.bgColor = dc.getBackground();
   this.dc = dc;
   this.setBounds(0, 0, w, h);
   this.lastButton = backButton;
   this.setBackground(this.bgColor);
   this.add(colorB);
   this.add(colorG);
   this.add(colorR);
   System.out.println(this.lastButton);
   this.colorB.setColor("" + this.lastButton.getColor().getBlue());
   this.colorR.setColor("" + this.lastButton.getColor().getRed());
   this.colorG.setColor("" + this.lastButton.getColor().getGreen());
   this.colorChoice.setBackground(lastButton.getColor());
   this.next.setId(lastButton.getId());
   choseColor.addMouseListener(this);
   this.add(choseColor);
   // this.add(this.numColor);
   this.frame = f;
   this.setSize(new Dimension(w, h));
   this.setLayout(null);
   this.addMouseListener(this);
   // carreColor.setMaximumSize(new Dimension(200, 200));
   this.add(carreColor);
   validColor(colorR.getColor(), colorG.getColor(), colorB.getColor());
   this.add(colorChoice);
   this.next.addMouseListener(this);
   this.add(next);
   neededGrey = maxGrey / (frame.getNmbColor());
   frame.setNeededGrey(neededGrey);
 }