亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? basicprogressbarui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
	return size;    }    /**     * The Minimum size for this component is 10. The rationale here      * is that there should be at least one pixel per 10 percent.     */    public Dimension getMinimumSize(JComponent c) {	Dimension pref = getPreferredSize(progressBar);	if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	    pref.width = 10;	} else {	    pref.height = 10;	}	return pref;    }    public Dimension getMaximumSize(JComponent c) {	Dimension pref = getPreferredSize(progressBar);	if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	    pref.width = Short.MAX_VALUE;	} else {	    pref.height = Short.MAX_VALUE;	}	return pref;    }    /**     * Gets the index of the current animation frame.     *     * @since 1.4     */    protected int getAnimationIndex() {	return animationIndex;    }    /**     * Sets the index of the current animation frame     * to the specified value and requests that the     * progress bar be repainted.     * Subclasses that don't use the default painting code     * might need to override this method     * to change the way that the <code>repaint</code> method     * is invoked.     *     * @param newValue the new animation index; no checking     *                 is performed on its value     * @see #incrementAnimationIndex     *     * @since 1.4     */    protected void setAnimationIndex(int newValue) {        if (animationIndex != newValue) {            if (sizeChanged()) {                 animationIndex = newValue;                maxPosition = 0;  //needs to be recalculated                delta = 0.0;      //needs to be recalculated                progressBar.repaint();                return;            }            //Get the previous box drawn.            nextPaintRect = getBox(nextPaintRect);            //Update the frame number.            animationIndex = newValue;                            //Get the next box to draw.            if (nextPaintRect != null) {                boxRect = getBox(boxRect);                if (boxRect != null) {                    nextPaintRect.add(boxRect);                }            }        } else { //animationIndex == newValue            return;        }        if (nextPaintRect != null) {            progressBar.repaint(nextPaintRect);        } else {            progressBar.repaint();        }    }    private boolean sizeChanged() {        if ((oldComponentInnards == null) || (componentInnards == null)) {	    return true;	}        oldComponentInnards.setRect(componentInnards);        componentInnards = SwingUtilities.calculateInnerArea(progressBar,	                                                     componentInnards);        return !oldComponentInnards.equals(componentInnards);    }    /**     * Sets the index of the current animation frame,     * to the next valid value,     * which results in the progress bar being repainted.     * The next valid value is, by default,     * the current animation index plus one.     * If the new value would be too large,      * this method sets the index to 0.     * Subclasses might need to override this method     * to ensure that the index does not go over     * the number of frames needed for the particular      * progress bar instance.     * This method is invoked by the default animation thread     * every <em>X</em> milliseconds,      * where <em>X</em> is specified by the "ProgressBar.repaintInterval"     * UI default.     *     * @see #setAnimationIndex     * @since 1.4     */    protected void incrementAnimationIndex() {        int newValue = getAnimationIndex() + 1;        if (newValue < numFrames) {            setAnimationIndex(newValue);        } else {            setAnimationIndex(0);        }    }    /**     * Returns the desired number of milliseconds between repaints.     * This value is meaningful     * only if the progress bar is in indeterminate mode.     * The repaint interval determines how often the      * default animation thread's timer is fired.     * It's also used by the default indeterminate progress bar     * painting code when determining     * how far to move the bouncing box per frame.     * The repaint interval is specified by     * the "ProgressBar.repaintInterval" UI default.     *      * @return  the repaint interval, in milliseconds     */    private int getRepaintInterval() {        return repaintInterval;    }    private int initRepaintInterval() {        repaintInterval = DefaultLookup.getInt(progressBar,                this, "ProgressBar.repaintInterval", 50);        return repaintInterval;    }    /**     * Returns the number of milliseconds per animation cycle.     * This value is meaningful     * only if the progress bar is in indeterminate mode.     * The cycle time is used by the default indeterminate progress bar     * painting code when determining     * how far to move the bouncing box per frame.     * The cycle time is specified by     * the "ProgressBar.cycleTime" UI default     * and adjusted, if necessary,     * by the initIndeterminateDefaults method.     *      * @return  the cycle time, in milliseconds     */    private int getCycleTime() {        return cycleTime;    }    private int initCycleTime() {        cycleTime = DefaultLookup.getInt(progressBar, this,                "ProgressBar.cycleTime", 3000);        return cycleTime;    }    /** Initialize cycleTime, repaintInterval, numFrames, animationIndex. */    private void initIndeterminateDefaults() {        initRepaintInterval(); //initialize repaint interval        initCycleTime();       //initialize cycle length        // Make sure repaintInterval is reasonable.        if (repaintInterval <= 0) {            repaintInterval = 100;        }        // Make sure cycleTime is reasonable.        if (repaintInterval > cycleTime) {            cycleTime = repaintInterval * 20;        } else {            // Force cycleTime to be a even multiple of repaintInterval.            int factor = (int)Math.ceil(                                 ((double)cycleTime)                               / ((double)repaintInterval*2));            cycleTime = repaintInterval*factor*2;        }    }    /**     * Invoked by PropertyChangeHandler.     *     *  NOTE: This might not be invoked until after the first     *  paintIndeterminate call.     */    private void initIndeterminateValues() {        initIndeterminateDefaults();        //assert cycleTime/repaintInterval is a whole multiple of 2.        numFrames = cycleTime/repaintInterval;        initAnimationIndex();                    boxRect = new Rectangle();        nextPaintRect = new Rectangle();        componentInnards = new Rectangle();        oldComponentInnards = new Rectangle();        // we only bother installing the HierarchyChangeListener if we        // are indeterminate        progressBar.addHierarchyListener(getHandler());        // start the animation thread if necessary        if (progressBar.isDisplayable()) {            startAnimationTimer();        }    }    /** Invoked by PropertyChangeHandler. */    private void cleanUpIndeterminateValues() {        // stop the animation thread if necessary        if (progressBar.isDisplayable()) {            stopAnimationTimer();        }        cycleTime = repaintInterval = 0;        numFrames = animationIndex = 0;        maxPosition = 0;        delta = 0.0;        boxRect = nextPaintRect = null;        componentInnards = oldComponentInnards = null;        progressBar.removeHierarchyListener(getHandler());    }    // Called from initIndeterminateValues to initialize the animation index.    // This assumes that numFrames is set to a correct value.    private void initAnimationIndex() {        if ((progressBar.getOrientation() == JProgressBar.HORIZONTAL) &&            (BasicGraphicsUtils.isLeftToRight(progressBar))) {            // If this is a left-to-right progress bar,	    // start at the first frame.            setAnimationIndex(0);        } else {            // If we go right-to-left or vertically, start at the right/bottom.            setAnimationIndex(numFrames/2);        }    }    //    // Animation Thread    //    /**     * Implements an animation thread that invokes repaint     * at a fixed rate.  If ADJUSTTIMER is true, this thread     * will continuously adjust the repaint interval to      * try to make the actual time between repaints match     * the requested rate.       */    private class Animator implements ActionListener {        private Timer timer;        private long previousDelay; //used to tune the repaint interval        private int interval; //the fixed repaint interval        private long lastCall; //the last time actionPerformed was called        private int MINIMUM_DELAY = 5;	/**	 * Creates a timer if one doesn't already exist, 	 * then starts the timer thread.	 */        private void start(int interval) {            previousDelay = interval;            lastCall = 0;	    if (timer == null) {                timer = new Timer(interval, this);	    } else {                timer.setDelay(interval);	    }	    if (ADJUSTTIMER) {		timer.setRepeats(false);                timer.setCoalesce(false);	    }	    timer.start();	}	/**	 * Stops the timer thread.	 */	private void stop() {	    timer.stop();	}	/**	 * Reacts to the timer's action events.	 */	public void actionPerformed(ActionEvent e) {            if (ADJUSTTIMER) {                long time = System.currentTimeMillis();                if (lastCall > 0) { //adjust nextDelay                //XXX maybe should cache this after a while                    //actual = time - lastCall                    //difference = actual - interval                    //nextDelay = previousDelay - difference                    //          = previousDelay - (time - lastCall - interval)                   int nextDelay = (int)(previousDelay                                          - time + lastCall                                          + getRepaintInterval());                    if (nextDelay < MINIMUM_DELAY) {                        nextDelay = MINIMUM_DELAY;                    }                    timer.setInitialDelay(nextDelay);                    previousDelay = nextDelay;                }                timer.start();                lastCall = time;            }	    incrementAnimationIndex(); //paint next frame	}    }    /**     * This inner class is marked &quot;public&quot; due to a compiler bug.     * This class should be treated as a &quot;protected&quot; inner class.     * Instantiate it only within subclasses of BasicProgressBarUI.     */    public class ChangeHandler implements ChangeListener {        // NOTE: This class exists only for backward compatability. All        // its functionality has been moved into Handler. If you need to add        // new functionality add it to the Handler, but make sure this              // class calls into the Handler.	public void stateChanged(ChangeEvent e) {            getHandler().stateChanged(e);	}    }    private class Handler implements ChangeListener, PropertyChangeListener, HierarchyListener {        // ChangeListener	public void stateChanged(ChangeEvent e) {	    BoundedRangeModel model = progressBar.getModel();	    int newRange = model.getMaximum() - model.getMinimum();	    int newPercent;	    int oldPercent = getCachedPercent();	    	    if (newRange > 0) {		newPercent = (int)((100 * (long)model.getValue()) / newRange);	    } else {		newPercent = 0;	    }	    	    if (newPercent != oldPercent) {		setCachedPercent(newPercent);		progressBar.repaint();	    }	}        // PropertyChangeListener	public void propertyChange(PropertyChangeEvent e) {	    String prop = e.getPropertyName();	    if ("indeterminate" == prop) {		if (progressBar.isIndeterminate()) {                    initIndeterminateValues();	        } else {                    //clean up                    cleanUpIndeterminateValues();                }                progressBar.repaint();            }        }                // we don't want the animation to keep running if we're not displayable        public void hierarchyChanged(HierarchyEvent he) {            if ((he.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0) {                if (progressBar.isIndeterminate()) {                    if (progressBar.isDisplayable()) {                        startAnimationTimer();                    } else {                        stopAnimationTimer();                    }                }            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区成人精品| 日韩免费看的电影| 日韩限制级电影在线观看| 久久久美女艺术照精彩视频福利播放 | 不卡av在线免费观看| 欧美日韩中文字幕一区二区| 久久日一线二线三线suv| 亚洲久草在线视频| 成人性生交大合| 精品成人佐山爱一区二区| 亚洲综合免费观看高清完整版| 国产一区二区三区av电影| 欧美人狂配大交3d怪物一区 | 欧美日韩国产首页| 中文字幕一区av| 国产激情视频一区二区三区欧美 | 91在线免费播放| 欧美成人vps| 日本三级韩国三级欧美三级| 91免费观看视频在线| 国产女主播视频一区二区| 免费高清在线视频一区·| 欧美日韩精品一区二区三区四区 | 国产精品乱码久久久久久| 秋霞电影一区二区| 欧美日本在线播放| 一区二区三区在线观看网站| www.亚洲色图| 国产精品萝li| 成人免费视频视频| 国产免费成人在线视频| 国产精一区二区三区| 久久久久国产成人精品亚洲午夜 | 欧美成人乱码一区二区三区| 日韩高清不卡一区二区三区| 欧美日韩中文字幕一区| 图片区小说区国产精品视频| 欧美日韩国产首页在线观看| 亚洲成人av资源| 337p亚洲精品色噜噜狠狠| 天天影视涩香欲综合网| 欧美日韩一区二区在线视频| 亚洲宅男天堂在线观看无病毒| 色天使久久综合网天天| 亚洲码国产岛国毛片在线| 色香蕉成人二区免费| 亚洲一区国产视频| 欧美福利视频导航| 久久99深爱久久99精品| 精品国产a毛片| 国产成人综合网站| 中文字幕欧美一| 欧美在线观看18| 天堂蜜桃91精品| 亚洲精品在线网站| 成人激情视频网站| 亚洲成在线观看| 日韩一区二区三区四区| 国产九色精品成人porny| 国产精品的网站| 欧美日韩大陆一区二区| 狠狠色狠狠色综合| 欧美一卡2卡3卡4卡| 国产精一品亚洲二区在线视频| 国产色91在线| 色中色一区二区| 日韩av电影天堂| 国产精品久久久久久久久图文区| 日本乱人伦aⅴ精品| 免费观看91视频大全| 国产精品毛片高清在线完整版| 色综合久久天天| 激情小说亚洲一区| 亚洲最色的网站| 欧美va亚洲va| 色狠狠色噜噜噜综合网| 精品一区二区免费在线观看| 中文字幕日韩一区| 91精品婷婷国产综合久久竹菊| 国产成人综合网站| 免费在线观看一区| 亚洲激情av在线| 亚洲靠逼com| 国产调教视频一区| 欧美一区二区三区思思人| 国产91在线|亚洲| 日本中文字幕一区二区视频| 国产精品久久国产精麻豆99网站| 欧美精品久久一区二区三区| 成人av中文字幕| 紧缚奴在线一区二区三区| 亚洲一区二区三区四区不卡| 国产喷白浆一区二区三区| 欧美一区二区成人6969| 在线一区二区三区做爰视频网站| 久久精品99国产国产精| 香蕉久久一区二区不卡无毒影院 | 国产亚洲欧美一级| 欧美精品久久久久久久久老牛影院| 国产成人综合在线播放| 91在线视频18| 91在线免费看| 欧美精品第1页| 91丨porny丨首页| 国产一区不卡视频| 免费三级欧美电影| 丝袜亚洲另类丝袜在线| 亚洲国产三级在线| 一区二区三区欧美视频| 国产精品高潮久久久久无| 国产视频一区在线观看| 久久色中文字幕| 日韩美女视频在线| 欧美一区二区三级| 欧美精品日韩精品| 欧美二区乱c少妇| 欧美精品1区2区3区| 欧美日韩黄视频| 欧美另类一区二区三区| 欧美日韩激情在线| 91精品国产91热久久久做人人| 欧美日韩高清在线| 欧美一区二区美女| 日韩精品中午字幕| 欧美xxxxx牲另类人与| 精品久久人人做人人爰| 久久你懂得1024| 国产欧美一区二区精品性色| 久久久久久久久久久久久久久99 | 天天操天天干天天综合网| 亚洲国产你懂的| 视频一区欧美精品| 久久精品国产99国产| 国产麻豆91精品| 99精品在线免费| 欧美日韩亚洲不卡| 欧美一区二区免费观在线| 久久伊人中文字幕| 中文字幕日本不卡| 日韩中文字幕麻豆| 国产一区二区毛片| 色天天综合色天天久久| 91精品综合久久久久久| 国产丝袜在线精品| 亚洲国产精品久久艾草纯爱| 日本在线播放一区二区三区| 国内精品第一页| 色婷婷激情一区二区三区| 8v天堂国产在线一区二区| 精品不卡在线视频| 亚洲欧美激情视频在线观看一区二区三区 | 久久在线免费观看| 中文字幕一区不卡| a级精品国产片在线观看| 91成人网在线| 国产亚洲短视频| 亚洲成人av免费| 韩国精品免费视频| 日本精品一区二区三区四区的功能| 欧美日本在线播放| 国产精品精品国产色婷婷| 日韩成人精品在线| 91浏览器打开| 久久精子c满五个校花| 亚洲成人免费观看| 国产91精品一区二区| 欧美精品1区2区| 亚洲激情男女视频| 成人一区在线看| 91精品国产综合久久精品app| 国产欧美日韩麻豆91| 免费成人在线视频观看| 色婷婷综合久久久久中文一区二区 | 男人的天堂久久精品| 99国产精品久久久久久久久久久| 欧美一级在线视频| 亚洲国产精品自拍| 91亚洲国产成人精品一区二三| 欧美岛国在线观看| 丝袜诱惑制服诱惑色一区在线观看 | 国产精一区二区三区| 91精品免费在线| 亚洲午夜精品网| 99久久综合精品| 国产亚洲欧美日韩在线一区| 免费观看一级特黄欧美大片| 欧美天天综合网| 亚洲精品视频在线| av高清不卡在线| 国产欧美日韩视频一区二区| 久草精品在线观看| 日韩亚洲欧美综合| 亚洲gay无套男同| 欧美日韩亚洲综合| 亚洲曰韩产成在线| 欧美最新大片在线看| 一区二区三国产精华液| 色天天综合久久久久综合片| 日韩毛片一二三区| 成人h动漫精品一区二区|