Interface PaintCallback


public interface PaintCallback

This interface represents a function prototype for custom component paint events.

If the callback function is set for example for Canvas.Canvas(Style, PaintCallback), it will be called when the Canvas is painted.

If the paint callback is not specified the default Script.paint(Component, Graphics, Style, int, int) is called.

See Also:
Canvas.Canvas(Style, PaintCallback), Callbacks

Method Summary
 void paint(Component c, Graphics g, Style style, int width, int height)
          Called when custom component should be painted.
 

Method Detail

paint

void paint(Component c,
           Graphics g,
           Style style,
           int width,
           int height)
Called when custom component should be painted. Coordinate (0,0) points to top left corner of component's rectangle. Clipping is in effect so that drawing actions are contained into area reserved for this component.

Parameters:
c - Instance of custom component
g - Graphics context
style - Style to use
width - Width of the available area
height - Height of the available area