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

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

?? basicprogressbarui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * @(#)BasicProgressBarUI.java	1.68 04/03/11 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import com.sun.java.swing.SwingUtilities2;import java.awt.*;import java.awt.geom.AffineTransform;import java.awt.event.*;import javax.swing.*;import javax.swing.event.*;import javax.swing.plaf.*;import java.beans.PropertyChangeListener;import java.beans.PropertyChangeEvent;import java.io.Serializable;import sun.swing.DefaultLookup;/** * A Basic L&F implementation of ProgressBarUI. * * @version 1.68 03/11/04 * @author Michael C. Albers * @author Kathy Walrath */public class BasicProgressBarUI extends ProgressBarUI {    private int cachedPercent;    private int cellLength, cellSpacing;    // The "selectionForeground" is the color of the text when it is painted    // over a filled area of the progress bar. The "selectionBackground"    // is for the text over the unfilled progress bar area.    private Color selectionForeground, selectionBackground;    private Animator animator;     protected JProgressBar progressBar;    protected ChangeListener changeListener;    private Handler handler;    /**      * The current state of the indeterminate animation's cycle.     * 0, the initial value, means paint the first frame.     * When the progress bar is indeterminate and showing,     * the default animation thread updates this variable     * by invoking incrementAnimationIndex()     * every repaintInterval milliseconds.     */    private int animationIndex = 0;    /**     * The number of frames per cycle. Under the default implementation,     * this depends on the cycleTime and repaintInterval.  It     * must be an even number for the default painting algorithm.  This     * value is set in the initIndeterminateValues method.     */    private int numFrames;   //0 1|numFrames-1 ... numFrames/2    /**     * Interval (in ms) between repaints of the indeterminate progress bar.     * The value of this method is set      * (every time the progress bar changes to indeterminate mode)     * using the      * "ProgressBar.repaintInterval" key in the defaults table.     */    private int repaintInterval;    /**     * The number of milliseconds until the animation cycle repeats.     * The value of this method is set      * (every time the progress bar changes to indeterminate mode)     * using the      * "ProgressBar.cycleTime" key in the defaults table.     */    private int cycleTime;  //must be repaintInterval*2*aPositiveInteger    //performance stuff    private static boolean ADJUSTTIMER = true; //makes a BIG difference;    					       //make this false for					       //performance tests    /**                                                                  * Used to hold the location and size of the bouncing box (returned     * by getBox) to be painted.     *     * @since 1.5     */                                                                 protected Rectangle boxRect;                                                                        /**                                                                  * The rectangle to be updated the next time the              * animation thread calls repaint.  For bouncing-box                 * animation this rect should include the union of         * the currently displayed box (which needs to be erased)            * and the box to be displayed next.     * This rectangle's values are set in      * the setAnimationIndex method.     */                                                                 private Rectangle nextPaintRect;                                                                        //cache    /** The component's painting area, not including the border. */    private Rectangle componentInnards;    //the current painting area    private Rectangle oldComponentInnards; //used to see if the size changed    /** For bouncing-box animation, the change in position per frame. */    private double delta = 0.0;    private int maxPosition = 0; //maximum X (horiz) or Y box location        public static ComponentUI createUI(JComponent x) {	return new BasicProgressBarUI();    }        public void installUI(JComponent c) {	progressBar = (JProgressBar)c;	installDefaults();	installListeners();        if (progressBar.isIndeterminate()) {            initIndeterminateValues();        }    }        public void uninstallUI(JComponent c) {        if (progressBar.isIndeterminate()) {            cleanUpIndeterminateValues();        }	uninstallDefaults();	uninstallListeners();	progressBar = null;    }        protected void installDefaults() {        LookAndFeel.installProperty(progressBar, "opaque", Boolean.TRUE); 	LookAndFeel.installBorder(progressBar,"ProgressBar.border");		LookAndFeel.installColorsAndFont(progressBar,					 "ProgressBar.background",					 "ProgressBar.foreground",					 "ProgressBar.font");	cellLength = UIManager.getInt("ProgressBar.cellLength");	cellSpacing = UIManager.getInt("ProgressBar.cellSpacing");	selectionForeground = UIManager.getColor("ProgressBar.selectionForeground");	selectionBackground = UIManager.getColor("ProgressBar.selectionBackground");    }        protected void uninstallDefaults() { 	LookAndFeel.uninstallBorder(progressBar);	    }        protected void installListeners() {	//Listen for changes in the progress bar's data.	changeListener = getHandler();	progressBar.addChangeListener(changeListener);	//Listen for changes between determinate and indeterminate state.	progressBar.addPropertyChangeListener(getHandler());    }	        private Handler getHandler() {        if (handler == null) {            handler = new Handler();        }        return handler;    }    /**     * Starts the animation thread, creating and initializing     * it if necessary. This method is invoked when an     * indeterminate progress bar should start animating.     * Reasons for this may include:     * <ul>     *    <li>The progress bar is determinate and becomes displayable     *    <li>The progress bar is displayable and becomes determinate     *    <li>The progress bar is displayable and determinate and this     *        UI is installed     * </ul>     * If you implement your own animation thread,     * you must override this method.     *     * @since 1.4     * @see #stopAnimationTimer     */    protected void startAnimationTimer() {        if (animator == null) {	    animator = new Animator();         }        animator.start(getRepaintInterval());    }    /**     * Stops the animation thread.     * This method is invoked when the indeterminate     * animation should be stopped. Reasons for this may include:     * <ul>     *    <li>The progress bar changes to determinate     *    <li>The progress bar is no longer part of a displayable hierarchy     *    <li>This UI in uninstalled     * </ul>     * If you implement your own animation thread,     * you must override this method.     *     * @since 1.4     * @see #startAnimationTimer     */    protected void stopAnimationTimer() {	if (animator != null) {            animator.stop();	}    }    /**     * Removes all listeners installed by this object.     */    protected void uninstallListeners() {	progressBar.removeChangeListener(changeListener);	progressBar.removePropertyChangeListener(getHandler());        handler = null;    }        // Many of the Basic*UI components have the following methods.    // This component does not have these methods because *ProgressBarUI    //  is not a compound component and does not accept input.    //    // protected void installComponents()    // protected void uninstallComponents()    // protected void installKeyboardActions()    // protected void uninstallKeyboardActions()    protected Dimension getPreferredInnerHorizontal() {        Dimension horizDim = (Dimension)DefaultLookup.get(progressBar, this,            "ProgressBar.horizontalSize");        if (horizDim == null) {            horizDim = new Dimension(146, 12);        }        return horizDim;    }        protected Dimension getPreferredInnerVertical() {        Dimension vertDim = (Dimension)DefaultLookup.get(progressBar, this,            "ProgressBar.vertictalSize");        if (vertDim == null) {            vertDim = new Dimension(12, 146);        }        return vertDim;    }        /**     * The "selectionForeground" is the color of the text when it is painted     * over a filled area of the progress bar.     */    protected Color getSelectionForeground() {	return selectionForeground;    }        /**     * The "selectionBackground" is the color of the text when it is painted     * over an unfilled area of the progress bar.     */    protected Color getSelectionBackground() {	return selectionBackground;    }        private int getCachedPercent() {	return cachedPercent;    }        private void setCachedPercent(int cachedPercent) {	this.cachedPercent = cachedPercent;    }        /**     * Returns the width (if HORIZONTAL) or height (if VERTICAL)     * of each of the indivdual cells/units to be rendered in the     * progress bar. However, for text rendering simplification and      * aesthetic considerations, this function will return 1 when     * the progress string is being rendered.     *     * @return the value representing the spacing between cells     * @see    #setCellLength     * @see    JProgressBar#isStringPainted     */    protected int getCellLength() {	if (progressBar.isStringPainted()) {	    return 1;	} else {	    return cellLength;	}    }        protected void setCellLength(int cellLen) {	this.cellLength = cellLen;    }        /**     * Returns the spacing between each of the cells/units in the     * progress bar. However, for text rendering simplification and      * aesthetic considerations, this function will return 0 when     * the progress string is being rendered.     *     * @return the value representing the spacing between cells     * @see    #setCellSpacing     * @see    JProgressBar#isStringPainted     */    protected int getCellSpacing() {	if (progressBar.isStringPainted()) {	    return 0;	} else {	    return cellSpacing;	}    }        protected void setCellSpacing(int cellSpace) {	this.cellSpacing = cellSpace;    }        /**     * This determines the amount of the progress bar that should be filled     * based on the percent done gathered from the model. This is a common     * operation so it was abstracted out. It assumes that your progress bar     * is linear. That is, if you are making a circular progress indicator,     * you will want to override this method.     */    protected int getAmountFull(Insets b, int width, int height) {	int amountFull = 0;	BoundedRangeModel model = progressBar.getModel();		if ( (model.getMaximum() - model.getMinimum()) != 0) {	    if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	        amountFull = (int)Math.round(width *					     progressBar.getPercentComplete());	    } else {	        amountFull = (int)Math.round(height *					     progressBar.getPercentComplete());	    }	}	return amountFull;    }        /**     * Delegates painting to one of two methods:     * paintDeterminate or paintIndeterminate.     */    public void paint(Graphics g, JComponent c) {        if (progressBar.isIndeterminate()) {            paintIndeterminate(g, c);        } else {            paintDeterminate(g, c);        }    }    /**     * Stores the position and size of     * the bouncing box that would be painted for the current animation index     * in <code>r</code> and returns <code>r</code>.     * Subclasses that add to the painting performed     * in this class's implementation of <code>paintIndeterminate</code> --     * to draw an outline around the bouncing box, for example --     * can use this method to get the location of the bouncing     * box that was just painted.     * By overriding this method,     * you have complete control over the size and position      * of the bouncing box,     * without having to reimplement <code>paintIndeterminate</code>.     *     * @param r  the Rectangle instance to be modified;     *           may be <code>null</code>     * @return   <code>null</code> if no box should be drawn;     *           otherwise, returns the passed-in rectangle     *           (if non-null)     *           or a new rectangle     *     * @see #setAnimationIndex     * @since 1.4     */    protected Rectangle getBox(Rectangle r) {        int currentFrame = getAnimationIndex();        int middleFrame = numFrames/2;        if (sizeChanged() || delta == 0.0 || maxPosition == 0.0) {            updateSizes();        }        r = getGenericBox(r);         if (r == null) {            return null;        }        if (middleFrame <= 0) {            return null;        }        //assert currentFrame >= 0 && currentFrame < numFrames        if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {            if (currentFrame < middleFrame) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜国产精品一区| 色网站国产精品| 成人av网在线| 日韩欧美视频一区| 玉米视频成人免费看| 国产一区二区成人久久免费影院| 91国产丝袜在线播放| 久久综合狠狠综合| 婷婷综合五月天| 99热精品国产| 国产欧美一区二区精品婷婷| 天堂在线一区二区| 色成人在线视频| 国产精品白丝在线| 国产成人鲁色资源国产91色综| 3d动漫精品啪啪1区2区免费| 亚洲欧美国产毛片在线| 国产91综合网| 久久久久久久久久久久久夜| 六月婷婷色综合| 欧美肥妇bbw| 亚洲午夜视频在线观看| 91视频一区二区三区| 国产精品美女视频| 国产电影精品久久禁18| 日韩精品专区在线影院观看| 天天影视色香欲综合网老头| 欧美亚洲免费在线一区| 亚洲精品国久久99热| 成人的网站免费观看| 国产欧美视频一区二区三区| 国产成人av电影在线| 久久精品亚洲麻豆av一区二区| 久久精品国产77777蜜臀| 日韩欧美一级片| 国产美女久久久久| 日韩亚洲欧美一区| 奇米一区二区三区| 日韩免费视频线观看| 国内外成人在线| 久久精品欧美日韩精品| 国产精品1区2区3区在线观看| 337p粉嫩大胆色噜噜噜噜亚洲 | 亚洲电影欧美电影有声小说| 99精品久久久久久| 亚洲欧洲精品天堂一级| 91福利视频久久久久| 亚洲图片欧美一区| 欧美一区二区三区人| 久久国产精品99久久人人澡| 久久亚洲免费视频| 成人免费三级在线| 亚洲综合色丁香婷婷六月图片| 欧美亚洲高清一区二区三区不卡| 偷拍自拍另类欧美| 久久综合久久综合亚洲| 成人精品小蝌蚪| 亚洲成人自拍网| 精品国产乱码久久久久久夜甘婷婷 | 一区二区国产盗摄色噜噜| 欧美日韩一区三区四区| 精品在线一区二区| 国产精品欧美综合在线| 欧美综合一区二区| 美腿丝袜亚洲综合| 亚洲国产精品av| 欧美日韩久久久一区| 狠狠久久亚洲欧美| 亚洲精品亚洲人成人网在线播放| 69久久99精品久久久久婷婷 | av爱爱亚洲一区| 一区二区三区中文字幕在线观看| 欧美精品一二三四| 粉嫩av一区二区三区粉嫩| 亚洲综合网站在线观看| 精品国产91久久久久久久妲己| www.视频一区| 免费高清视频精品| 亚洲精品日韩一| 精品国产精品网麻豆系列| 91精品1区2区| 九九**精品视频免费播放| 亚洲免费观看高清完整版在线| 日韩美女一区二区三区四区| 99re这里只有精品6| 精品中文字幕一区二区小辣椒| 亚洲女同女同女同女同女同69| 欧美一级日韩一级| 91丨porny丨国产| 国产精品99久久久久久有的能看 | 99久久久久久| 国产一区二区按摩在线观看| 午夜精品福利视频网站| 欧美激情一区二区三区不卡| 欧美一级欧美三级| 欧亚洲嫩模精品一区三区| www.欧美.com| 国产精品影视在线观看| 久久精品久久精品| 亚洲午夜三级在线| 亚洲色图另类专区| 国产嫩草影院久久久久| 精品国产乱码久久久久久久久| 欧美三级午夜理伦三级中视频| 成人三级伦理片| 国产成人一级电影| 蜜桃视频在线观看一区| 香蕉成人啪国产精品视频综合网| 亚洲色图欧美在线| 18成人在线视频| 成人免费视频在线观看| 欧美国产日韩精品免费观看| 国产亚洲综合在线| 精品成人一区二区| 日韩精品一区二区三区swag| 3751色影院一区二区三区| 在线国产亚洲欧美| 欧美亚洲国产一区二区三区va | 欧美亚洲尤物久久| 欧美在线观看18| 精品视频在线视频| 欧美日韩国产在线播放网站| 色噜噜夜夜夜综合网| 欧美午夜影院一区| 欧美色图第一页| 欧美精品三级日韩久久| 欧美精品高清视频| 欧美成人福利视频| 国产亚洲成av人在线观看导航| 26uuu色噜噜精品一区二区| 亚洲精品在线观看视频| 久久久久久亚洲综合影院红桃| 久久久久久久久久久久久女国产乱| 精品国产第一区二区三区观看体验| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美成人一区二区三区在线观看| 精品少妇一区二区三区免费观看 | 欧美精品丝袜中出| 日韩欧美国产一二三区| 日韩欧美在线一区二区三区| 久久亚洲二区三区| 1000精品久久久久久久久| 一区二区三区四区中文字幕| 日日骚欧美日韩| 在线观看不卡一区| 欧美大片拔萝卜| 欧美国产一区在线| 亚洲自拍偷拍av| 久久电影网电视剧免费观看| 风间由美性色一区二区三区| 欧美色男人天堂| 久久久精品黄色| 亚洲高清在线精品| 国产成人精品三级| 欧美日韩免费观看一区二区三区| 日韩欧美二区三区| 一区二区三区四区在线播放| 久久 天天综合| 在线免费不卡电影| 久久久久久久综合日本| 亚洲一区视频在线| 成人听书哪个软件好| 678五月天丁香亚洲综合网| 中文字幕av一区二区三区高| 午夜视黄欧洲亚洲| av中文字幕亚洲| 日韩欧美资源站| 亚洲国产视频网站| 成人午夜免费视频| 精品久久人人做人人爽| 亚洲国产一区二区在线播放| 风间由美中文字幕在线看视频国产欧美| 欧美日产在线观看| 亚洲男女毛片无遮挡| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲一卡二卡三卡四卡无卡久久| 国产乱子伦视频一区二区三区| 欧美午夜精品久久久久久孕妇| 国产日韩精品一区二区三区在线| 亚洲成av人片| 色婷婷久久久综合中文字幕| 国产视频一区在线观看| 免费在线观看一区二区三区| 欧美影院午夜播放| 中文字幕中文字幕一区| 国产精品18久久久| 精品国产一区久久| 久久精品国产久精国产| 欧美卡1卡2卡| 一区二区三区视频在线看| 成人免费va视频| 亚洲国产精品v| 粉嫩一区二区三区在线看| 久久久一区二区| 久久99国内精品| 亚洲精品一线二线三线| 久久99精品国产91久久来源| 日韩一本二本av| 美女网站色91| 日韩欧美中文字幕制服|