예제 #1
0
 /**
  * Paints the child with the specified index into the specified allocation.
  *
  * <p>This implementation forwards to the list painter fetched from the {@link StyleSheet} and
  * then calls <code>super.paintChild(g, a, index)</code>.
  *
  * @param g the graphics context to use
  * @param a the allocation for the child
  * @param index the child index
  */
 protected void paintChild(Graphics g, Rectangle a, int index) {
   painter.paint(g, a.x, a.y, a.width, a.height, this, index);
   super.paintChild(g, a, index);
 }
예제 #2
0
 /**
  * Paints one of the children; called by paint(). By default that is all it does, but a subclass
  * can use this to paint things relative to the child.
  *
  * @param g the graphics context
  * @param alloc the allocated region to render the child into
  * @param index the index of the child
  */
 protected void paintChild(Graphics g, Rectangle alloc, int index) {
   listPainter.paint(g, alloc.x, alloc.y, alloc.width, alloc.height, this, index);
   super.paintChild(g, alloc, index);
 }