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

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

?? basicprogressbarui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                r.x = componentInnards.x                      + (int)Math.round(delta * (double)currentFrame);            } else {                r.x = maxPosition                      - (int)Math.round(delta *                                         (currentFrame - middleFrame));            }        } else { //VERTICAL indeterminate progress bar            if (currentFrame < middleFrame) {                r.y = componentInnards.y                      + (int)Math.round(delta * currentFrame);            } else {                r.y = maxPosition                      - (int)Math.round(delta *                                        (currentFrame - middleFrame));            }        }        return r;    }    /**     * Updates delta, max position.     * Assumes componentInnards is correct (e.g. call after sizeChanged()).     */    private void updateSizes() {        int length = 0;        if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {            length = getBoxLength(componentInnards.width,                                  componentInnards.height);            maxPosition = componentInnards.x + componentInnards.width                          - length;        } else { //VERTICAL progress bar            length = getBoxLength(componentInnards.height,                                  componentInnards.width);            maxPosition = componentInnards.y + componentInnards.height                          - length;        }        //If we're doing bouncing-box animation, update delta.        delta = 2.0 * (double)maxPosition/(double)numFrames;    }    /**     * Assumes that the component innards, max position, etc. are up-to-date.     */    private Rectangle getGenericBox(Rectangle r) {        if (r == null) {            r = new Rectangle();        }        if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {            r.width = getBoxLength(componentInnards.width,                                   componentInnards.height);            if (r.width < 0) {                r = null;            } else {                r.height = componentInnards.height;                r.y = componentInnards.y;            }          // end of HORIZONTAL        } else { //VERTICAL progress bar            r.height = getBoxLength(componentInnards.height,                                    componentInnards.width);            if (r.height < 0) {                r = null;            } else {                r.width = componentInnards.width;                r.x = componentInnards.x;            }        } // end of VERTICAL        return r;    }    /**     * Returns the length     * of the "bouncing box" to be painted.     * This method is invoked by the      * default implementation of <code>paintIndeterminate</code>     * to get the width (if the progress bar is horizontal)     * or height (if vertical) of the box.     * For example:     * <blockquote>     * <pre>     *boxRect.width = getBoxLength(componentInnards.width,     *                             componentInnards.height);     * </pre>     * </blockquote>     *     * @param availableLength  the amount of space available     *                         for the bouncing box to move in;     *                         for a horizontal progress bar,     *                         for example,     *                         this should be     *                         the inside width of the progress bar     *                         (the component width minus borders)     * @param otherDimension   for a horizontal progress bar, this should be     *                         the inside height of the progress bar; this     *                         value might be used to constrain or determine     *                         the return value      *     * @return the size of the box dimension being determined;      *         must be no larger than <code>availableLength</code>     *     * @see javax.swing.SwingUtilities#calculateInnerArea     * @since 1.5     */    protected int getBoxLength(int availableLength, int otherDimension) {        return (int)Math.round(availableLength/6.0);    }    /**     * All purpose paint method that should do the right thing for all     * linear bouncing-box progress bars.      * Override this if you are making another kind of      * progress bar.     *     * @see #paintDeterminate     *     * @since 1.4     */    protected void paintIndeterminate(Graphics g, JComponent c) {        if (!(g instanceof Graphics2D)) {            return;        }	Insets b = progressBar.getInsets(); // area for border	int barRectWidth = progressBar.getWidth() - (b.right + b.left);	int barRectHeight = progressBar.getHeight() - (b.top + b.bottom);        Graphics2D g2 = (Graphics2D)g;        // Paint the bouncing box.        boxRect = getBox(boxRect);        if (boxRect != null) {            g2.setColor(progressBar.getForeground());            g2.fillRect(boxRect.x, boxRect.y,                       boxRect.width, boxRect.height);        }	// Deal with possible text painting	if (progressBar.isStringPainted()) {            if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {                paintString(g2, b.left, b.top,                            barRectWidth, barRectHeight,                            boxRect.x, boxRect.width, b);            }            else {                paintString(g2, b.left, b.top,                            barRectWidth, barRectHeight,                            boxRect.y, boxRect.height, b);            }        }    }    /**     * All purpose paint method that should do the right thing for almost     * all linear, determinate progress bars. By setting a few values in     * the defaults     * table, things should work just fine to paint your progress bar.     * Naturally, override this if you are making a circular or     * semi-circular progress bar.     *      * @see #paintIndeterminate     *     * @since 1.4     */    protected void paintDeterminate(Graphics g, JComponent c) {        if (!(g instanceof Graphics2D)) {            return;        }	Insets b = progressBar.getInsets(); // area for border	int barRectWidth = progressBar.getWidth() - (b.right + b.left);	int barRectHeight = progressBar.getHeight() - (b.top + b.bottom);        int cellLength = getCellLength();        int cellSpacing = getCellSpacing();	// amount of progress to draw	int amountFull = getAmountFull(b, barRectWidth, barRectHeight);	        Graphics2D g2 = (Graphics2D)g;	g2.setColor(progressBar.getForeground());	if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	    // draw the cells	    if (cellSpacing == 0 && amountFull > 0) {                // draw one big Rect because there is no space between cells                g2.setStroke(new BasicStroke((float)barRectHeight,                        BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));	    } else {                // draw each individual cell                g2.setStroke(new BasicStroke((float)barRectHeight,                        BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL,                        0.f, new float[] { cellLength, cellSpacing }, 0.f));            }            if (BasicGraphicsUtils.isLeftToRight(c)) {                g2.drawLine(b.left, (barRectHeight/2) + b.top,                        amountFull + b.left, (barRectHeight/2) + b.top);            } else {                g2.drawLine((barRectWidth + b.left),                        (barRectHeight/2) + b.top,                        barRectWidth + b.left - amountFull,                        (barRectHeight/2) + b.top);            }            	} else { // VERTICAL	    // draw the cells	    if (cellSpacing == 0 && amountFull > 0) {                // draw one big Rect because there is no space between cells                g2.setStroke(new BasicStroke((float)barRectWidth,                        BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));	    } else {                // draw each individual cell                g2.setStroke(new BasicStroke((float)barRectWidth,                        BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL,                        0f, new float[] { cellLength, cellSpacing }, 0f));	    }            g2.drawLine(barRectWidth/2 + b.left,                    b.top + barRectHeight,                    barRectWidth/2 + b.left,                    b.top + barRectHeight - amountFull);	}		// Deal with possible text painting	if (progressBar.isStringPainted()) {	    paintString(g, b.left, b.top,			barRectWidth, barRectHeight,			amountFull, b);	}    }    protected void paintString(Graphics g, int x, int y,			       int width, int height,			       int amountFull, Insets b) {	if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {            if (BasicGraphicsUtils.isLeftToRight(progressBar)) {                if (progressBar.isIndeterminate()) {                    boxRect = getBox(boxRect);                    paintString(g, x, y, width, height,                            boxRect.x, boxRect.width, b);                } else {                    paintString(g, x, y, width, height, x, amountFull, b);                }            }            else {                paintString(g, x, y, width, height, x + width - amountFull,                            amountFull, b);            }        }        else {            if (progressBar.isIndeterminate()) {                boxRect = getBox(boxRect);                paintString(g, x, y, width, height,                        boxRect.y, boxRect.height, b);            } else {                paintString(g, x, y, width, height, y + height - amountFull,                        amountFull, b);            }        }    }    /**     * Paints the progress string.     *     * @param g Graphics used for drawing.     * @param x x location of bounding box     * @param y y location of bounding box     * @param width width of bounding box     * @param height height of bounding box     * @param fillStart start location, in x or y depending on orientation,     *        of the filled portion of the progress bar.     * @param amountFull size of the fill region, either width or height     *        depending upon orientation.     * @param b Insets of the progress bar.     */    private void paintString(Graphics g, int x, int y, int width, int height,                             int fillStart, int amountFull, Insets b) {        if (!(g instanceof Graphics2D)) {            return;        }        Graphics2D g2 = (Graphics2D)g;	String progressString = progressBar.getString();	g2.setFont(progressBar.getFont());	Point renderLocation = getStringPlacement(g2, progressString,						  x, y, width, height);	Rectangle oldClip = g2.getClipBounds();		if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	    g2.setColor(getSelectionBackground());	    SwingUtilities2.drawString(progressBar, g2, progressString,                                       renderLocation.x, renderLocation.y);	    g2.setColor(getSelectionForeground());            g2.clipRect(fillStart, y, amountFull, height);	    SwingUtilities2.drawString(progressBar, g2, progressString,                                       renderLocation.x, renderLocation.y);	} else { // VERTICAL	    g2.setColor(getSelectionBackground());            AffineTransform rotate =                    AffineTransform.getRotateInstance(Math.PI/2);            g2.setFont(progressBar.getFont().deriveFont(rotate));	    renderLocation = getStringPlacement(g2, progressString,						  x, y, width, height);	    SwingUtilities2.drawString(progressBar, g2, progressString,                                       renderLocation.x, renderLocation.y);	    g2.setColor(getSelectionForeground());	    g2.clipRect(x, fillStart, width, amountFull);	    SwingUtilities2.drawString(progressBar, g2, progressString,                                       renderLocation.x, renderLocation.y);	}	g2.setClip(oldClip);    }            /**     * Designate the place where the progress string will be painted.     * This implementation places it at the center of the progress     * bar (in both x and y). Override this if you want to right,     * left, top, or bottom align the progress string or if you need     * to nudge it around for any reason.     */    protected Point getStringPlacement(Graphics g, String progressString,				       int x,int y,int width,int height) {	FontMetrics fontSizer = SwingUtilities2.getFontMetrics(progressBar, g,	                                    progressBar.getFont());	int stringWidth = SwingUtilities2.stringWidth(progressBar, fontSizer,                                                      progressString);	if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	    return new Point(x + Math.round(width/2 - stringWidth/2),			     y + ((height +                                 fontSizer.getAscent() -                                 fontSizer.getLeading() -                                 fontSizer.getDescent()) / 2));	} else { // VERTICAL            return new Point(x + ((width - fontSizer.getAscent() +                    fontSizer.getLeading() + fontSizer.getDescent()) / 2),		    y + Math.round(height/2 - stringWidth/2));	}    }            public Dimension getPreferredSize(JComponent c) {	Dimension	size;	Insets		border = progressBar.getInsets();	FontMetrics     fontSizer = progressBar.getFontMetrics(         	                                  progressBar.getFont());		if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {	    size = new Dimension(getPreferredInnerHorizontal());	    // Ensure that the progress string will fit	    if (progressBar.isStringPainted()) {		// I'm doing this for completeness.		String progString = progressBar.getString();		int stringWidth = SwingUtilities2.stringWidth(                          progressBar, fontSizer, progString);		if (stringWidth > size.width) {		    size.width = stringWidth;		}		// This uses both Height and Descent to be sure that 		// there is more than enough room in the progress bar		// for everything.		// This does have a strange dependency on 		// getStringPlacememnt() in a funny way.		int stringHeight = fontSizer.getHeight() +		                   fontSizer.getDescent();		if (stringHeight > size.height) {		    size.height = stringHeight;		}	    }	} else {	    size = new Dimension(getPreferredInnerVertical());	    // Ensure that the progress string will fit.	    if (progressBar.isStringPainted()) {		String progString = progressBar.getString();		int stringHeight = fontSizer.getHeight() +                        fontSizer.getDescent();		if (stringHeight > size.width) {		    size.width = stringHeight;		}		// This is also for completeness.		int stringWidth = SwingUtilities2.stringWidth(                                       progressBar, fontSizer, progString);		if (stringWidth > size.height) {		    size.height = stringWidth;		}	    }	}	size.width += border.left + border.right;	size.height += border.top + border.bottom;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产澳门| 亚洲一区自拍偷拍| 国产综合成人久久大片91| 欧美顶级少妇做爰| 美女视频黄 久久| 日韩美女在线视频| 岛国一区二区三区| 亚洲蜜臀av乱码久久精品| 欧美色手机在线观看| 偷偷要91色婷婷| 久久色中文字幕| 99这里都是精品| 午夜视频在线观看一区二区三区| 欧美一区二区三区的| 久久99精品久久久久婷婷| 欧美激情一区二区| 欧美三级日韩在线| 狠狠色丁香婷婷综合| 国产精品国产成人国产三级| 91福利区一区二区三区| 久久99精品一区二区三区| 日韩一区中文字幕| 8x福利精品第一导航| 国产成人无遮挡在线视频| 怡红院av一区二区三区| 日韩欧美国产不卡| 99精品国产99久久久久久白柏 | 国产午夜精品一区二区三区四区| 成人动漫在线一区| 午夜欧美在线一二页| 国产欧美一区二区三区在线老狼| 欧美做爰猛烈大尺度电影无法无天| 日本免费新一区视频| 亚洲色图欧洲色图| 精品日产卡一卡二卡麻豆| 91视频一区二区| 韩国一区二区三区| 图片区小说区区亚洲影院| 国产精品女上位| 欧美成人一区二区三区片免费| 91蝌蚪porny成人天涯| 国产永久精品大片wwwapp| 天天综合色天天| 国产精品国产三级国产普通话99| 日韩免费电影一区| 欧美日韩亚洲综合一区| 成人avav影音| 国产一区高清在线| 日韩高清中文字幕一区| 亚洲柠檬福利资源导航| 中文字幕av资源一区| 欧美电视剧免费全集观看| 欧美日韩中文精品| 97精品久久久午夜一区二区三区| 国产乱人伦精品一区二区在线观看 | 日本sm残虐另类| 一区二区三区欧美视频| 国产精品久久久久久久久晋中| 精品国产乱码久久久久久免费| 欧美色偷偷大香| 在线免费视频一区二区| av成人动漫在线观看| 国产精品一区2区| 激情综合网天天干| 蜜臀va亚洲va欧美va天堂| 日韩主播视频在线| 亚洲成人免费看| 亚洲成a人片综合在线| 亚洲一区二区不卡免费| 一区二区三区欧美久久| 亚洲手机成人高清视频| 亚洲码国产岛国毛片在线| 国产精品色婷婷久久58| 欧美国产精品一区| 国产精品色哟哟网站| 欧美日韩国产大片| 欧美日韩一区二区三区不卡| 在线观看亚洲一区| 在线观看日韩毛片| 欧美色男人天堂| 欧美人xxxx| 日韩欧美一二三区| 久久久久久久综合日本| 国产日韩在线不卡| 中文字幕第一区综合| 综合色中文字幕| 一区二区三区加勒比av| 亚洲国产日产av| 日韩精品亚洲专区| 国产在线精品免费av| 国产河南妇女毛片精品久久久 | 26uuu亚洲综合色欧美| 国产婷婷色一区二区三区在线| 中文字幕精品在线不卡| 最新日韩av在线| 亚洲大片在线观看| 久久99九九99精品| 成人动漫一区二区| 欧美日韩国产电影| 久久综合九色综合久久久精品综合 | 日韩一区二区三区高清免费看看| www久久精品| 亚洲婷婷综合色高清在线| 午夜精品久久久| 国产一区二区三区香蕉| www..com久久爱| 欧美日韩另类一区| 亚洲精品一线二线三线无人区| 中文字幕av一区二区三区免费看 | 国产91精品露脸国语对白| 91免费国产在线| 91精品久久久久久久99蜜桃| 国产女人aaa级久久久级| 亚洲一区二区3| 国产激情精品久久久第一区二区| 91网站最新地址| 日韩你懂的电影在线观看| 国产精品国产三级国产普通话99| 婷婷久久综合九色综合绿巨人| 国产风韵犹存在线视精品| 欧美日韩在线直播| 国产精品美女久久久久久2018 | 国产一区二区三区电影在线观看| 色域天天综合网| 26uuu亚洲| 日韩精品欧美精品| av在线播放成人| 精品久久久网站| 香蕉加勒比综合久久| 成人av在线网| 精品国产免费久久| 午夜国产不卡在线观看视频| 成人h动漫精品一区二区| 精品久久久久av影院| 午夜不卡av免费| 色欲综合视频天天天| 国产精品视频一二三区 | 高清视频一区二区| 精品入口麻豆88视频| 亚洲影视资源网| av成人免费在线| 一区二区三区资源| 久久99国产精品久久99果冻传媒| 色综合中文字幕国产 | 欧美不卡一区二区三区四区| 亚洲精品一卡二卡| 成人午夜激情视频| 欧美成人猛片aaaaaaa| 污片在线观看一区二区| 91成人在线免费观看| **欧美大码日韩| www.久久久久久久久| 国产日韩欧美麻豆| 国产精品18久久久久久久久 | 青青草视频一区| 欧美日韩国产bt| 亚洲国产三级在线| 欧美亚洲一区二区在线观看| 中文字幕一区二区三| 成人av网站在线| 中文字幕在线一区| 国产成人精品免费视频网站| 精品国产精品一区二区夜夜嗨| 免费观看在线综合色| 日韩一区和二区| 久久国内精品视频| 日韩你懂的在线观看| 韩国在线一区二区| 国产视频911| 成人a区在线观看| 最新日韩在线视频| 欧美综合一区二区三区| 亚洲国产综合人成综合网站| 欧美日韩不卡在线| 日韩精品色哟哟| 2欧美一区二区三区在线观看视频| 国内精品免费**视频| 精品日韩成人av| 成人激情免费网站| 亚洲精品免费视频| 69av一区二区三区| 久久99精品国产| 中文字幕精品综合| 色吧成人激情小说| 日韩福利视频网| 欧美成人一级视频| voyeur盗摄精品| 亚洲丶国产丶欧美一区二区三区| 日韩一区二区视频在线观看| 久久99久久久久久久久久久| 欧美激情综合五月色丁香小说| 91亚洲男人天堂| 日韩电影免费一区| 国产日韩精品一区二区三区| 日本乱人伦aⅴ精品| 日韩电影一二三区| 国产精品短视频| 欧美精品tushy高清| 成人美女视频在线观看18| 亚洲一区二区三区美女|