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

Quick Search    Search Deep

Source code: com/arranger/jarl/widget/container/HoldFrameCollection.java


1   package com.arranger.jarl.widget.container;
2   
3   import com.arranger.jarl.base.IContext;
4   import com.arranger.jarl.base.Time;
5   import com.arranger.jarl.base.IJarlObjectInfo;
6   import com.arranger.jarl.util.ObjectUtil;
7   import com.arranger.jarl.util.JarlInfoUtil;
8   
9   import java.awt.*;
10  
11  /**
12   * HoldFrameCollection holds all of the widgets at a certain frame
13   *
14   * @widgetAttribute time ## xs:string ## the time to hold this collection
15   */
16  public class HoldFrameCollection extends SimpleCollection {
17  
18      protected Time m_time;
19  
20      /**
21       * The main paint routine
22       * @param graphics2D should be cast to a {@link Graphics2D}
23       * @param context the current context
24       */
25      public void paint(IContext context, Graphics2D graphics2D) {
26          Time time = context.getTime();
27          context.setTime(m_time);
28          super.paint(context, graphics2D);
29          context.setTime(time);
30      }
31  
32      /**
33       * Always remember some attrs might not be there
34       * @param context
35       */
36      protected void initAttributes(IContext context) {
37          super.initAttributes(context);
38          ObjectUtil.initializeField("time", m_configElement, this, ObjectUtil.TIME_CONVERSION);
39      }
40  
41      protected void addJarlObjectInfo(IJarlObjectInfo jarlObjectInfo) {
42          super.addJarlObjectInfo(jarlObjectInfo);
43          populateInfo(jarlObjectInfo, "time", "Hold Time", JarlInfoUtil.TIME_DISPLAY);
44      }
45  }