Beispiel #1
0
 public void paint(
     Component c,
     Graphics2D g,
     java.util.List gradient,
     int x,
     int y,
     int w,
     int h,
     boolean isVertical) {
   int imageWidth;
   int imageHeight;
   if (isVertical) {
     imageWidth = IMAGE_SIZE;
     imageHeight = h;
   } else {
     imageWidth = w;
     imageHeight = IMAGE_SIZE;
   }
   synchronized (c.getTreeLock()) {
     this.w = w;
     this.h = h;
     paint(c, g, x, y, imageWidth, imageHeight, gradient, isVertical);
   }
 }
Beispiel #2
0
 /*
  * Convenience function for determining ComponentOrientation.  Helps us
  * avoid having Munge directives throughout the code.
  */
 static boolean isLeftToRight(Component c) {
   return c.getComponentOrientation().isLeftToRight();
 }