Changeset 277


Ignore:
Timestamp:
08/25/08 12:42:23 (16 years ago)
Author:
bjn8
Message:

Simple changes

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

Legend:

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

    r219 r277  
    4545       
    4646        private LinkedList<AnimatedPopup> _animatingPopups = new LinkedList<AnimatedPopup>();
    47 
    4847        private AnimationThread _animationThread = null;
    49        
     48
    5049        private final int ANIMATION_DURATION = 180; // Tume its takes for a maximize . minimize to animate. In ms.
    5150        private final int ANIMATION_RATE = 30; // in ms
     
    8786                if (c == null) throw new NullPointerException("c");
    8887                return _invokers.contains(c);
     88        }
     89       
     90        /**
     91         * Gets an invoker for a popup
     92         *
     93         * @param p
     94         *              The popup to get the invoker for.
     95         *
     96         * @return
     97         *              The invoker for the given popup.
     98         *              Null if popup does not exist.
     99         */
     100        public Component getInvoker(Popup p) {
     101                if (p == null) throw new NullPointerException("p");
     102                return _popups.get(p);
    89103        }
    90104       
     
    704718        }
    705719       
     720       
    706721        public class ExpandShrinkAnimator implements PopupAnimator {
    707722               
  • trunk/src/org/expeditee/items/widgets/HeavyDutyInteractiveWidget.java

    r211 r277  
    77import java.awt.Graphics2D;
    88import java.awt.Rectangle;
     9import java.awt.Shape;
    910import java.awt.geom.Rectangle2D;
    1011import java.util.LinkedList;
     
    1314import javax.swing.SwingUtilities;
    1415
     16import org.expeditee.gui.Browser;
    1517import org.expeditee.gui.DisplayIO;
    1618import org.expeditee.gui.FrameGraphics;
     
    230232        private void paintLoadScreen(Graphics g, Color backgroundColor) {
    231233
     234                if (Browser._theBrowser == null) return;
     235               
    232236                // Render shaded window over widget
    233237                g.setColor(backgroundColor);
     
    248252                g.setFont(f);
    249253               
     254                // If need to re-calc the message drawing area... do so
     255
    250256                FontMetrics fm   = g.getFontMetrics(f);
    251257                Rectangle2D rect = fm.getStringBounds(message, g);
     
    258264                if (textY <= 0) textY = barY + 2;
    259265                textY += textHeight;
    260 
     266               
     267                // Ensure that load bar and text doesn't spill over widgets invalidation area
     268                Shape clipBackUp = g.getClip();
     269                Rectangle tmpClip = (clipBackUp != null) ? clipBackUp.getBounds() :
     270                        new Rectangle(0, 0,
     271                                        Browser._theBrowser.getContentPane().getWidth(),
     272                                        Browser._theBrowser.getContentPane().getHeight());
     273                       
     274                g.setClip(tmpClip.intersection(getBounds()));
     275       
     276               
    261277                if (loadState < 0.0f) { // indeterminant
    262278
     
    281297                else g.setColor(Color.BLACK);
    282298               
     299
     300               
    283301                g.drawString(message, textX, textY);
    284302               
     303                g.setClip(clipBackUp);
     304
    285305        }
    286306       
     
    453473                }
    454474        }
     475       
    455476       
    456477        /**
  • trunk/src/org/expeditee/items/widgets/InteractiveWidget.java

    r239 r277  
    587587         * @return The expeditee anotation string.
    588588         */
    589         private String getAnnotationString() {
     589        protected String getAnnotationString() {
    590590
    591591                // Create tag and append classname
Note: See TracChangeset for help on using the changeset viewer.