Demos and Usage of java.awt.Color.getRGB()


   1:   }
   2:   public static final Color desatureCouleur(Color c) {
   3:         ...
   4:     return new Color(desatureCouleur(c.getRGB()));
   5:   }
   6:   public int filterRGB(int x, int y, int rgb) {
   7:     return desatureCouleur(rgb);

View Full Code Here
   1:   }
   2:   public final static Color attenueCouleur(Color c) {
   3:         ...
   4:     return new Color(attenueCouleur(c.getRGB()));
   5:   }
   6:   private final static BuIcon attenue0(Image _image) {
   7:     return new BuIcon(

View Full Code Here
   1: 
   2: import java.awt.Color;
   3: import java.awt.PaintContext;
   4:         ...
   5: import java.awt.RenderingHints;
   6: import java.awt.color.ColorSpace;
   7: import java.awt.geom.AffineTransform;
   8:         ...
   9: public class ColorUIResource2 extends ColorUIResource {
  10:   private Color myColor;
  11: 
  12:         ...
  13:   public int getRGB() {
  14:     return myColor.getRGB();

View Full Code Here
   1: 
   2: import java.awt.Color;
   3: import java.awt.PaintContext;
   4:         ...
   5: import java.awt.RenderingHints;
   6: import java.awt.color.ColorSpace;
   7: import java.awt.geom.AffineTransform;
   8:         ...
   9: {
  10:     private Color myColor;
  11: 
  12:         ...
  13:         super(0, 0, 0);
  14:         myColor = new Color(c.getRGB(), (a < 255));

View Full Code Here
   1:     public void paint(Graphics g) {
   2:         Color bg = getBackground();
   3:         
   4:         ...
   5:                     if (bg instanceof SystemColor)
   6:                         bg = new Color(bg.getRGB());
   7:                     g.drawImage(img, x + offset, y + offset, bg, this);
   8:                 }
   9:                 g.setColor(bg);

View Full Code Here
   1: import java.awt.Color;
   2: import java.awt.event.MouseEvent;
   3:         ...
   4:     BufferedImage sprayImage;
   5:     Color theColor;
   6: 
   7:         ...
   8:         if ((x >=0) && (x < sprayImage.getWidth()) && (y >= 0) && (y < sprayImage.getHeight())) {
   9:         sprayImage.setRGB(x,y,theColor.getRGB());
  10:         }
  11:         ...
  12:         if ((x >=0) && (x < sprayImage.getWidth()) && (y >= 0) && (y < sprayImage.getHeight())) {
  13:         sprayImage.setRGB(x,y,theColor.getRGB());

View Full Code Here
   1: package terppaint;
   2: import java.awt.Color;
   3: import java.awt.event.MouseEvent;
   4:         ...
   5:     BufferedImage sprayImage;
   6:     Color theColor;
   7: 
   8:         ...
   9:         if ((x >=0) && (x < sprayImage.getWidth()) && (y >= 0) && (y < sprayImage.getHeight())) {
  10:         sprayImage.setRGB(x,y,theColor.getRGB());
  11:         }
  12:         ...
  13:         if ((x >=0) && (x < sprayImage.getWidth()) && (y >= 0) && (y < sprayImage.getHeight())) {
  14:         sprayImage.setRGB(x,y,theColor.getRGB());

View Full Code Here
   1:         {
   2:             Color back = nsc.getBackground();
   3:         ...
   4:             setBackground(northPanel, new Color(back.getRGB()));
   5:         }
   6:         ...
   7: 
   8:     private void setBackground(Component c, Color newColor)
   9:     {

View Full Code Here
   1:         }
   2:         Color color = (Color)defaults.get("window");
   3:         ...
   4:         if ( color == null )
   5:         {
   6:         ...
   7:         }
   8:         Color newColor = new Color( color.getRGB() );
   9:         Color boxPanelBorderColor = PhexColors.getBoxPanelBorderColor();
  10:         ...
  11:         }
  12:         int rgbValue = boxPanelBackground.getRGB();

View Full Code Here
   1: 
   2: import java.awt.Color;
   3: import java.awt.Graphics2D;
   4:         ...
   5:                 final int tFrames = durationToFrames(0.7);
   6:                 Color c = new Color(prev.getRGB(0, 0));
   7:                 for (int i = 0; i < tFrames; ++i)
   8:         ...
   9:                                 alpha);
  10:                         return c.getRGB();
  11:                     }
  12:         ...
  13:                                 fade);
  14:                         return c.getRGB();

View Full Code Here
   1: 
   2:         Color color = (Color)UIManager.getDefaults().get( "window" );
   3:         ...
   4:         if ( color != null )
   5:         {
   6:         ...
   7:             Color newColor = new Color( color.getRGB() );
   8:             viewport.setBackground( newColor );

View Full Code Here
   1: import java.awt.Component;
   2: import java.awt.Color;
   3: import java.awt.GridBagLayout;
   4:         ...
   5:       }
   6:       else if (_propertyObj instanceof Color)
   7:       {
   8:         ...
   9: 
  10:         cell = colorEdit((Color) _propertyObj);
  11:       }
  12:         ...
  13:       {
  14:         offScreenImage.setRGB(i, j, curColor.getRGB());

View Full Code Here
   1: import java.awt.Stroke;
   2: import java.awt.Color;
   3: import java.awt.Font;
   4:         ...
   5:   private int            validMask_;
   6:   private Color          foregroundColor_;
   7:         ...
   8:   private Color          backgroundColor_;  
   9:   private int            lineWidth_;
  10:         ...
  11:           if (fillData_[pointNo] == 0 && backgroundColor_ != null)
  12:             fillPattern_.setRGB (i, j, backgroundColor_.getRGB());

View Full Code Here
   1:         public boolean underline;
   2:         public Color color;
   3:         public int size;
   4:         ...
   5:         {
   6:             return (bold || italic || underline || (size>0) || (color!=null));
   7:         }
   8:         ...
   9:                 pout.print("c");
  10:                 pout.print(Integer.toHexString(color.getRGB()));
  11:             }
  12:         ...
  13:             if (color!=null) {
  14:                 int rgb = color.getRGB();

View Full Code Here
   1: 
   2:   public void setBackground(Color color, int x, int y, int w, int h){
   3:         ...
   4:     super.setBackground(color);
   5: 
   6:         ...
   7:     window.gmask&=~GC.GCFunction;
   8:     graphics.setXORMode(new Color((color.getRGB() ^ graphics.getColor().getRGB())&0xffffff));
   9:       }

View Full Code Here