Changeset 1054


Ignore:
Timestamp:
04/30/16 21:45:22 (8 years ago)
Author:
davidb
Message:

Delayed drawing of InteractiveWidgets so they end up on top

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameGraphics.java

    r1039 r1054  
    421421                }
    422422
    423                 HashSet<Item> paintedFillsAndLines = new HashSet<Item>();
     423
     424                                HashSet<Item> paintedFillsAndLines = new HashSet<Item>();
    424425                // FIRST: Paint widgets swing gui (not expeditee gui) .
    425426                // Note that these are the anchored widgets
     
    432433                        InteractiveWidget iw = widgetItor.previous();
    433434                        if (clip == null || clip.intersects(iw.getComponant().getBounds())) {
    434                                 iw.paint(bg);
    435                                 PaintItem(bg, iw.getItems().get(4));
    436435                                paintedFillsAndLines.addAll(iw.getItems());
    437                         }
    438                 }
    439 
     436                                //iw.paint(bg);
     437                                //PaintItem(bg, iw.getItems().get(4));
     438
     439                        }
     440                }
     441
     442               
    440443                // Filter out items that do not need to be painted
    441444                List<Item> paintItems;
     
    466469                PaintPictures(bg, paintItems, fillOnlyItems, paintedFillsAndLines);
    467470                PaintLines(bg, visibleItems);
     471
     472
     473                widgetItor = paintWidgets.listIterator(paintWidgets.size());
     474                while (widgetItor.hasPrevious()) {
     475                        // Paint first-in-last-serve ordering - like swing
     476                        // If it is done the other way around then widgets are covered up by
     477                        // the box that is supposed to be underneath
     478                        InteractiveWidget iw = widgetItor.previous();
     479                        if (clip == null || clip.intersects(iw.getComponant().getBounds())) {
     480                                iw.paint(bg);
     481                                PaintItem(bg, iw.getItems().get(4));
     482                        }
     483                }
     484
    468485
    469486                // Filter out free items that do not need to be painted
Note: See TracChangeset for help on using the changeset viewer.