Source for gnu.gcj.xlib.XColor

   1: /* Copyright (C) 2000  Free Software Foundation
   2: 
   3:    This file is part of libgcj.
   4: 
   5: This software is copyrighted work licensed under the terms of the
   6: Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
   7: details.  */
   8: 
   9: package gnu.gcj.xlib;
  10: 
  11: import gnu.gcj.RawData;
  12: 
  13: /**
  14:  * A color or color-cell on the X server.
  15:  *
  16:  * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
  17:  */
  18: public final class XColor
  19: {
  20:   public XColor(int r, int g, int b)
  21:   {
  22:     this();
  23:     setRGB(r, g, b);
  24:   }
  25: 
  26:   public XColor()
  27:   {
  28:     init();
  29:   }
  30: 
  31:   private native void init();
  32:   protected native void finalize();
  33: 
  34:   public final native void setRGB(int r, int g, int b);
  35:   public final native int getRed();
  36:   public final native int getGreen();
  37:   public final native int getBlue();
  38:   public final native byte getFlags();
  39:   public final native long getPixelValue();
  40:   
  41:   RawData structure = null;
  42: }