Beispiel #1
0
 public void run(String arg) {
   ImagePlus imp = WindowManager.getImage(id);
   if (imp != null && imp.getWindow() != null) {
     imp.getWindow().toFront();
     return;
   }
   int colorWidth = 22;
   int colorHeight = 16;
   int columns = 5;
   int rows = 20;
   int width = columns * colorWidth;
   int height = rows * colorHeight;
   ColorGenerator cg = new ColorGenerator(width, height, new int[width * height], this);
   cg.drawColors(colorWidth, colorHeight, columns, rows);
   setProcessor("CP", cg);
   id = getID();
   show();
   IJ.register(ColorPicker.class);
 }