Changeset 184 for trunk/src/org/expeditee/gui/FrameGraphics.java
- Timestamp:
- 08/04/08 11:00:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameGraphics.java
r181 r184 36 36 // the maximum size that can be used to paint on 37 37 private static Dimension _MaxSize = new Dimension(1000, 1000); 38 39 // Final passes to renderering the current frame 40 private static LinkedList<FinalFrameRenderPass> _finalPasses = new LinkedList<FinalFrameRenderPass>(); 38 41 39 42 // modes … … 457 460 PaintNonLinesNonPicture(bg, freeItemsToPaint); 458 461 459 // Repaint popups / drags... 460 if (isActualFrame) 462 // Repaint popups / drags... As well as final passes 463 if (isActualFrame) { 461 464 PopupManager.getInstance().paintLayeredPane(bg, clip); 465 for (FinalFrameRenderPass pass : _finalPasses) { 466 pass.paint(bg); 467 } 468 } 462 469 463 470 bg.dispose(); … … 857 864 // Paint frame to window 858 865 Paint(dg, left, right, Item.DEFAULT_BACKGROUND); 859 866 860 867 // Paint any animations 861 868 PopupManager.getInstance().paintAnimations(); … … 905 912 906 913 } 914 915 /** 916 * Adds a FinalFrameRenderPass to the frame-render pipeline... 917 * 918 * Note that the last added FinalFrameRenderPass will be rendered at the 919 * very top. 920 * 921 * @param pass 922 * The pass to add. If already added then nothing results in the call. 923 * 924 * @throws NullPointerException 925 * If pass is null. 926 */ 927 public static void addFinalFrameRenderPass(FinalFrameRenderPass pass) { 928 if (pass == null) throw new NullPointerException("pass"); 929 930 if (!_finalPasses.contains(pass)) 931 _finalPasses.add(pass); 932 } 933 934 /** 935 * Adds a FinalFrameRenderPass to the frame-render pipeline... 936 * 937 * Note that the last added FinalFrameRenderPass will be rendered at the 938 * very top. 939 * 940 * @param pass 941 * The pass to remove 942 * 943 */ 944 public static void removeFinalFrameRenderPass(FinalFrameRenderPass pass) { 945 _finalPasses.remove(pass); 946 } 947 948 /** 949 * A FinalFrameRenderPass is invoked at the very final stages for rendering a frame: 950 * that is, after the popups are drawn. 951 * 952 * There can be many applications for FinalFrameRenderPass. Such as tool tips, balloons, 953 * or drawing items at the highest Z-order in special situations. 954 * 955 * Although if there are multiples FinalFrameRenderPasses attatach to the 956 * frame painter then it is not garaunteed to be rendered very last. 957 * 958 * @see FrameGraphics#addFinalFrameRenderPass(org.expeditee.gui.FrameGraphics.FinalFrameRenderPass) 959 * @see FrameGraphics#removeFinalFrameRenderPass(org.expeditee.gui.FrameGraphics.FinalFrameRenderPass) 960 * 961 * @author Brook Novak 962 */ 963 public interface FinalFrameRenderPass { 964 void paint(Graphics g); 965 } 907 966 908 967 }
Note:
See TracChangeset
for help on using the changeset viewer.