コード例 #1
0
 public void setDefaultColor(float alpha, geogebra.common.awt.GColor gc) {
   defaultColor = gc;
   if (gc != null)
     this.setIcon(
         GeoGebraIcon.createColorSwatchIcon(
             alpha, iconSize, geogebra.awt.GColorD.getAwtColor(gc), null));
   else this.setIcon(GeoGebraIcon.createNullSymbolIcon(iconSize.width, iconSize.height));
 }
コード例 #2
0
 private static ImageIcon[] getColorSwatchIcons(
     geogebra.common.awt.GColor[] colorArray, float alpha, Dimension iconSize, int colorSetType) {
   ImageIcon[] a = new ImageIcon[colorArray.length];
   for (int i = 0; i < colorArray.length; i++)
     if (colorArray[i] != null) {
       a[i] =
           GeoGebraIcon.createColorSwatchIcon(
               alpha, iconSize, geogebra.awt.GColorD.getAwtColor(colorArray[i]), null);
     } else {
       a[i] = GeoGebraIcon.createNullSymbolIcon(iconSize.width, iconSize.height);
     }
   return a;
 }