Changeset 167


Ignore:
Timestamp:
07/28/08 16:52:02 (16 years ago)
Author:
bjn8
Message:

Improvements for widgets and popups

Location:
trunk/src/org/expeditee/gui
Files:
3 edited

Legend:

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

    r162 r167  
    2222import org.expeditee.items.Picture;
    2323import org.expeditee.items.Text;
     24import org.expeditee.items.WidgetCacheManager;
    2425import org.expeditee.stats.SessionStats;
    2526import org.expeditee.taskmanagement.EntitySaveManager;
     
    332333
    333334                // Remove any popups that are showing on the current frame
    334                 PopupManager.hideAllPopups();
     335                PopupManager.getInstance().hideAllPopups();
    335336
    336337                if (_TwinFrames) {
     
    485486                }
    486487
     488                // Heavyduty widgets with lots of data may need to unload
     489                WidgetCacheManager.onFrameChanged();
     490               
    487491                FrameGraphics.refresh(false);
    488492        }
  • trunk/src/org/expeditee/gui/FrameGraphics.java

    r156 r167  
    327327                        // Note that these are the anchored widgets
    328328                        for (InteractiveWidget iw : paintWidgets) {
     329                               
    329330                                if (clip == null
    330331                                                || clip.intersects(iw.getComponant().getBounds()))
    331332                                        iw.paint(bg);
     333                               
     334                                // Paint borders
     335                                for (Item i : iw.getItems()) {
     336                                        if (clip == null
     337                                                        || i.isInDrawingArea(clip))
     338                                        i.paint(bg);
     339                                }
     340                               
    332341                        }
    333342
     
    448457                        // Repaint popups / drags...
    449458                        if (isActualFrame)
    450                                 PopupManager.paintLayeredPane(bg, clip);
     459                                PopupManager.getInstance().paintLayeredPane(bg, clip);
    451460
    452461                        bg.dispose();
     
    824833                                        MessageBay.refresh(true, dg, Item.DEFAULT_BACKGROUND);
    825834                                        return;
    826                                 }
     835                                       
     836                                } else return; // nothing to render
    827837                        }
    828838
     
    842852                // Paint frame to window
    843853                Paint(dg, left, right, Item.DEFAULT_BACKGROUND);
     854               
     855                // Paint any animations
     856                PopupManager.getInstance().paintAnimations();
    844857
    845858                // Paint message bay
  • trunk/src/org/expeditee/gui/FrameMouseActions.java

    r162 r167  
    233233                // + e.getWhen());
    234234
    235                 // Auto-hide popups when user clicks into expeditee world
    236                 PopupManager.hideAllPopups();
    237 
    238235                // TODO WHY DID I NOT COMMENT THIS LINE!! MIKE SAYS
    239236                if (LastRobotX != null) {
     
    364361        // This is where all the processing happens
    365362        public void mouseReleased(MouseEvent e) {
     363               
    366364                // System.out.println("Released " + e.getX() + "," + e.getY() + " " +
    367365                // e.getWhen());
    368366                FrameUtils.ResponseTimer.restart();
     367               
     368                // Auto-hide popups when user clicks into expeditee world
     369                // If the user clicks into empty space and a popup-is showing, then
     370                // the user porbably wants to click away the popup - therefore ignore the event
     371                boolean shouldConsume = PopupManager.getInstance().shouldConsumeBackClick();
     372                PopupManager.getInstance().hideAllPopups();
     373                if (shouldConsume && e.getButton() == MouseEvent.BUTTON1) {
     374                        return; // consume back click event
     375                }
    369376
    370377                // _lastMovedDistance = new Point(e.getX() - _lastMouseClick.getX(), e
Note: See TracChangeset for help on using the changeset viewer.