Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/arranger/jarl/trait/ITrait.java


1   package com.arranger.jarl.trait;
2   
3   import com.arranger.jarl.base.IContext;
4   import com.arranger.jarl.base.IJarlObject;
5   import com.arranger.jarl.widget.IWidget;
6   
7   import java.awt.*;
8   
9   /**
10   * ITrait created on Feb 21, 2003
11   */
12  public interface ITrait extends IJarlObject {
13  
14      /**
15       * Prior to the {@link IWidget#paint} the trait can perform some work
16       * @param widget the widget that is being painted
17       * @param context the current context
18       * @param graphics2D the current graphics object
19       * @return the new graphics, or the same
20       */
21      public Graphics2D prePaint(IWidget widget, IContext context, Graphics2D graphics2D);
22  
23      /**
24       * After the call to {@link IWidget#paint} is called
25       * the trait can restore some state
26       * @param widget the widget that is being painted
27       * @param context the current context
28       * @param graphics2D the current graphics object
29       * @return the new graphics, or the same
30       */
31      public Graphics2D postPaint(IWidget widget, IContext context, Graphics2D graphics2D);
32  }