Ignore:
Timestamp:
08/02/08 16:33:26 (16 years ago)
Author:
bjn8
Message:

Gave popups an option to have autohide on or off

File:
1 edited

Legend:

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

    r168 r183  
    3232        private boolean _isReadyToPaint = false;
    3333        private boolean _consumeBackClick = false;
     34        private boolean _autoHide = true;
    3435
    3536        /**
    3637         * Creates a new popup.
     38         * Autohide is set to true.
     39         *
    3740         */
    3841        public Popup() {
     
    9497        }
    9598       
     99        /**
     100         * Invoked when the popup becomes hidden, or when the popup is animating to show but cancelled.
     101         */
    96102        public void onHide() {}
     103       
     104        /**
     105         * Invoked when the popup shows. Note this might not eventuate for animated popups.
     106         */
    97107        public void onShow() {}
     108       
     109        /**
     110         * Invoked when popups is going to show.
     111         * This always is invoked first.
     112         */
     113        public void onShowing() {}
    98114
    99115        public boolean shouldConsumeBackClick() {
     
    107123         *              consume the back-click event.
    108124         */
    109         public void setConsumeBackClick(boolean consumeBackClick) {
     125        protected void setConsumeBackClick(boolean consumeBackClick) {
    110126                _consumeBackClick = consumeBackClick;
     127        }
     128       
     129        /**
     130         * @param autoHideOn
     131         *              Set to True if this popup should auto hide. (The default).
     132         *              Set to false if this popup should be manually hidden.
     133         */
     134        protected void setAudoHide(boolean autoHideOn) {
     135                _autoHide = autoHideOn;
     136        }
     137       
     138        /**
     139         * @return
     140         *              True if this popup auto hides.
     141         */
     142        public boolean doesAutoHide() {
     143                return _autoHide;
    111144        }
    112145       
    113146       
    114147       
     148       
     149       
    115150}
Note: See TracChangeset for help on using the changeset viewer.