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

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

?? basictabbedpaneui.java

?? java1.6眾多例子參考
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
        }        return baseline;    }    private void calculateBaseline() {        int tabCount = tabPane.getTabCount();        int tabPlacement = tabPane.getTabPlacement();        maxTabHeight = calculateMaxTabHeight(tabPlacement);        baseline = getBaseline(0);        if (isHorizontalTabPlacement()) {            for(int i = 1; i < tabCount; i++) {                if (getBaseline(i) != baseline) {                    baseline = -1;                    break;                }            }        }        else {            // left/right, tabs may be different sizes.            FontMetrics fontMetrics = getFontMetrics();            int fontHeight = fontMetrics.getHeight();            int height = calculateTabHeight(tabPlacement, 0, fontHeight);            for(int i = 1; i < tabCount; i++) {                int newHeight = calculateTabHeight(tabPlacement, i,fontHeight);                if (height != newHeight) {                    // assume different baseline                    baseline = -1;                    break;                }            }        }    }// UI Rendering     public void paint(Graphics g, JComponent c) {        int selectedIndex = tabPane.getSelectedIndex();        int tabPlacement = tabPane.getTabPlacement();        ensureCurrentLayout();        // Paint content border and tab area	if (tabsOverlapBorder) {	    paintContentBorder(g, tabPlacement, selectedIndex);	}        // If scrollable tabs are enabled, the tab area will be        // painted by the scrollable tab panel instead.        //        if (!scrollableTabLayoutEnabled()) { // WRAP_TAB_LAYOUT            paintTabArea(g, tabPlacement, selectedIndex);        }	if (!tabsOverlapBorder) {	    paintContentBorder(g, tabPlacement, selectedIndex);	}    }    /**     * Paints the tabs in the tab area.     * Invoked by paint().     * The graphics parameter must be a valid <code>Graphics</code>     * object.  Tab placement may be either:      * <code>JTabbedPane.TOP</code>, <code>JTabbedPane.BOTTOM</code>,     * <code>JTabbedPane.LEFT</code>, or <code>JTabbedPane.RIGHT</code>.     * The selected index must be a valid tabbed pane tab index (0 to     * tab count - 1, inclusive) or -1 if no tab is currently selected.     * The handling of invalid parameters is unspecified.     *     * @param g the graphics object to use for rendering     * @param tabPlacement the placement for the tabs within the JTabbedPane     * @param selectedIndex the tab index of the selected component     *     * @since 1.4     */    protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) {        int tabCount = tabPane.getTabCount();        Rectangle iconRect = new Rectangle(),                  textRect = new Rectangle();        Rectangle clipRect = g.getClipBounds();          // Paint tabRuns of tabs from back to front        for (int i = runCount - 1; i >= 0; i--) {            int start = tabRuns[i];            int next = tabRuns[(i == runCount - 1)? 0 : i + 1];            int end = (next != 0? next - 1: tabCount - 1);            for (int j = start; j <= end; j++) {                if (j != selectedIndex && rects[j].intersects(clipRect)) {                    paintTab(g, tabPlacement, rects, j, iconRect, textRect);                }            }        }        // Paint selected tab if its in the front run        // since it may overlap other tabs        if (selectedIndex >= 0 && rects[selectedIndex].intersects(clipRect)) {            paintTab(g, tabPlacement, rects, selectedIndex, iconRect, textRect);        }    }    protected void paintTab(Graphics g, int tabPlacement,                            Rectangle[] rects, int tabIndex,                             Rectangle iconRect, Rectangle textRect) {        Rectangle tabRect = rects[tabIndex];        int selectedIndex = tabPane.getSelectedIndex();        boolean isSelected = selectedIndex == tabIndex;        if (tabsOpaque || tabPane.isOpaque()) {            paintTabBackground(g, tabPlacement, tabIndex, tabRect.x, tabRect.y,                    tabRect.width, tabRect.height, isSelected);        }        paintTabBorder(g, tabPlacement, tabIndex, tabRect.x, tabRect.y,                        tabRect.width, tabRect.height, isSelected);                String title = tabPane.getTitleAt(tabIndex);        Font font = tabPane.getFont();        FontMetrics metrics = SwingUtilities2.getFontMetrics(tabPane, g, font);        Icon icon = getIconForTab(tabIndex);        layoutLabel(tabPlacement, metrics, tabIndex, title, icon,                     tabRect, iconRect, textRect, isSelected);        if (tabPane.getTabComponentAt(tabIndex) == null) {            String clippedTitle = title;            if (scrollableTabLayoutEnabled() && tabScroller.croppedEdge.isParamsSet() &&                    tabScroller.croppedEdge.getTabIndex() == tabIndex && isHorizontalTabPlacement()) {                int availTextWidth = tabScroller.croppedEdge.getCropline() -                        (textRect.x - tabRect.x) - tabScroller.croppedEdge.getCroppedSideWidth();                clippedTitle = SwingUtilities2.clipStringIfNecessary(null, metrics, title, availTextWidth);            }            paintText(g, tabPlacement, font, metrics,                    tabIndex, clippedTitle, textRect, isSelected);            paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected);        }        paintFocusIndicator(g, tabPlacement, rects, tabIndex,                   iconRect, textRect, isSelected);    }    private boolean isHorizontalTabPlacement() {        return tabPane.getTabPlacement() == TOP || tabPane.getTabPlacement() == BOTTOM;     }    /* This method will create and return a polygon shape for the given tab rectangle     * which has been cropped at the specified cropline with a torn edge visual.     * e.g. A "File" tab which has cropped been cropped just after the "i":     *             -------------     *             |  .....     |     *             |  .          |     *             |  ...  .    |     *             |  .    .   |     *             |  .    .    |     *             |  .    .     |     *             --------------     *     * The x, y arrays below define the pattern used to create a "torn" edge     * segment which is repeated to fill the edge of the tab.     * For tabs placed on TOP and BOTTOM, this righthand torn edge is created by     * line segments which are defined by coordinates obtained by     * subtracting xCropLen[i] from (tab.x + tab.width) and adding yCroplen[i]     * to (tab.y).     * For tabs placed on LEFT or RIGHT, the bottom torn edge is created by     * subtracting xCropLen[i] from (tab.y + tab.height) and adding yCropLen[i]     * to (tab.x).     */    private static int xCropLen[] = {1,1,0,0,1,1,2,2};    private static int yCropLen[] = {0,3,3,6,6,9,9,12};    private static final int CROP_SEGMENT = 12;    private static Polygon createCroppedTabShape(int tabPlacement, Rectangle tabRect, int cropline) {        int rlen = 0;        int start = 0;        int end = 0;        int ostart = 0;        switch(tabPlacement) {          case LEFT:          case RIGHT:              rlen = tabRect.width;              start = tabRect.x;              end = tabRect.x + tabRect.width;              ostart = tabRect.y + tabRect.height;              break;          case TOP:          case BOTTOM:          default:             rlen = tabRect.height;                         start = tabRect.y;             end = tabRect.y + tabRect.height;             ostart = tabRect.x + tabRect.width;        }        int rcnt = rlen/CROP_SEGMENT;        if (rlen%CROP_SEGMENT > 0) {            rcnt++;        }        int npts = 2 + (rcnt*8);        int xp[] = new int[npts];        int yp[] = new int[npts];        int pcnt = 0;         xp[pcnt] = ostart;        yp[pcnt++] = end;        xp[pcnt] = ostart;        yp[pcnt++] = start;        for(int i = 0; i < rcnt; i++) {            for(int j = 0; j < xCropLen.length; j++) {                xp[pcnt] = cropline - xCropLen[j];                yp[pcnt] = start + (i*CROP_SEGMENT) + yCropLen[j];                if (yp[pcnt] >= end) {                    yp[pcnt] = end;                    pcnt++;                    break;                }                pcnt++;            }                                   }        if (tabPlacement == JTabbedPane.TOP || tabPlacement == JTabbedPane.BOTTOM) {           return new Polygon(xp, yp, pcnt);        } else { // LEFT or RIGHT           return new Polygon(yp, xp, pcnt);        }               }    /* If tabLayoutPolicy == SCROLL_TAB_LAYOUT, this method will paint an edge     * indicating the tab is cropped in the viewport display     */    private void paintCroppedTabEdge(Graphics g) {        int tabIndex = tabScroller.croppedEdge.getTabIndex();        int cropline = tabScroller.croppedEdge.getCropline();        int x,y;         switch(tabPane.getTabPlacement()) {          case LEFT:          case RIGHT:            x = rects[tabIndex].x;            y = cropline;             int xx = x;            g.setColor(shadow);            while(xx <= x+rects[tabIndex].width) {                for (int i=0; i < xCropLen.length; i+=2) {                    g.drawLine(xx+yCropLen[i],y-xCropLen[i],                               xx+yCropLen[i+1]-1,y-xCropLen[i+1]);                }                xx+=CROP_SEGMENT;            }                   break;          case TOP:          case BOTTOM:          default:            x = cropline;            y = rects[tabIndex].y;             int yy = y;                   g.setColor(shadow);            while(yy <= y+rects[tabIndex].height) {                for (int i=0; i < xCropLen.length; i+=2) {                    g.drawLine(x-xCropLen[i],yy+yCropLen[i],                               x-xCropLen[i+1],yy+yCropLen[i+1]-1);                }                yy+=CROP_SEGMENT;            }               }    }    protected void layoutLabel(int tabPlacement,                                FontMetrics metrics, int tabIndex,                               String title, Icon icon,                               Rectangle tabRect, Rectangle iconRect,                                Rectangle textRect, boolean isSelected ) {        textRect.x = textRect.y = iconRect.x = iconRect.y = 0;        View v = getTextViewForTab(tabIndex);        if (v != null) {            tabPane.putClientProperty("html", v);        }        SwingUtilities.layoutCompoundLabel((JComponent) tabPane,                                           metrics, title, icon,                                           SwingUtilities.CENTER,                                           SwingUtilities.CENTER,                                           SwingUtilities.CENTER,                                           SwingUtilities.TRAILING,                                           tabRect,                                           iconRect,                                           textRect,                                           textIconGap);        tabPane.putClientProperty("html", null);        int xNudge = getTabLabelShiftX(tabPlacement, tabIndex, isSelected);        int yNudge = getTabLabelShiftY(tabPlacement, tabIndex, isSelected);        iconRect.x += xNudge;        iconRect.y += yNudge;        textRect.x += xNudge;        textRect.y += yNudge;    }    protected void paintIcon(Graphics g, int tabPlacement,                             int tabIndex, Icon icon, Rectangle iconRect,                              boolean isSelected ) {        if (icon != null) {            icon.paintIcon(tabPane, g, iconRect.x, iconRect.y);        }    }    protected void paintText(Graphics g, int tabPlacement,                             Font font, FontMetrics metrics, int tabIndex,                             String title, Rectangle textRect,                              boolean isSelected) {        g.setFont(font);        View v = getTextViewForTab(tabIndex);        if (v != null) {            // html            v.paint(g, textRect);        } else {            // plain text            int mnemIndex = tabPane.getDisplayedMnemonicIndexAt(tabIndex);            if (tabPane.isEnabled() && tabPane.isEnabledAt(tabIndex)) {                Color fg = tabPane.getForegroundAt(tabIndex);                if (isSelected && (fg instanceof UIResource)) {                    Color selectedFG = UIManager.getColor(                                  "TabbedPane.selectedForeground");                    if (selectedFG != null) {                        fg = selectedFG;                    }                }                g.setColor(fg);                SwingUtilities2.drawStringUnderlineCharAt(tabPane, g,                             title, mnemIndex,                             textRect.x, textRect.y + metrics.getAscent());                            } else { // tab disabled                g.setColor(tabPane.getBackgroundAt(tabIndex).brighter());                SwingUtilities2.drawStringUnderlineCharAt(tabPane, g,                             title, mnemIndex,                             textRect.x, textRect.y + metrics.getAscent());                g.setColor(tabPane.getBackgroundAt(tabIndex).darker());                SwingUtilities2.drawStringUnderlineCharAt(tabPane, g,                             title, mnemIndex,                             textRect.x - 1, textRect.y + metrics.getAscent() - 1);            }        }    }     protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) {        Rectangle tabRect = rects[tabIndex];        int nudge = 0;        switch(tabPlacement) {          case LEFT:              nudge = isSelected? -1 : 1;              break;          case RIGHT:              nudge = isSelected? 1 : -1;              break;          case BOTTOM:          case TOP:          default:              nudge = tabRect.width % 2;        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级欧美三级在线观看 | 91精品国产色综合久久久蜜香臀| 99精品国产热久久91蜜凸| 一本久道中文字幕精品亚洲嫩| 色综合久久久网| 日韩一区二区中文字幕| 国产精品伦一区二区三级视频| 亚洲一区自拍偷拍| 精品一区二区三区在线视频| 日本午夜一本久久久综合| 国产精品一区二区不卡| 欧美影院一区二区| 国产日韩欧美麻豆| 日本中文一区二区三区| 精品制服美女丁香| 日本丶国产丶欧美色综合| 26uuu国产日韩综合| 亚洲成人tv网| eeuss鲁片一区二区三区| 91精品国产综合久久精品图片 | 日日噜噜夜夜狠狠视频欧美人| 美女一区二区三区| 欧美日韩在线一区二区| 亚洲欧美精品午睡沙发| 波多野结衣中文一区| 亚洲国产电影在线观看| 国产麻豆欧美日韩一区| 精品国产91乱码一区二区三区 | 婷婷久久综合九色综合伊人色| 色噜噜狠狠成人中文综合| 国产精品国产成人国产三级| 国产成人啪午夜精品网站男同| 精品va天堂亚洲国产| 国内偷窥港台综合视频在线播放| 91精品国产一区二区三区 | 午夜精彩视频在线观看不卡| 欧美性xxxxxx少妇| 丝袜诱惑制服诱惑色一区在线观看 | 中文字幕亚洲区| 91小视频免费看| 亚洲女性喷水在线观看一区| 欧美主播一区二区三区美女| 一个色妞综合视频在线观看| 欧美乱熟臀69xxxxxx| 日本欧美一区二区三区| 久久综合九色综合97_久久久| 精品一区二区免费| 国产精品妹子av| 欧洲一区二区三区免费视频| 婷婷久久综合九色综合绿巨人| 91麻豆精品国产综合久久久久久| 美女视频黄免费的久久 | 欧美精品乱码久久久久久| 午夜精品123| 久久网站热最新地址| 成人白浆超碰人人人人| 亚洲另类春色校园小说| 欧美日韩www| 国产一区999| 亚洲一区二区偷拍精品| 精品国产乱码久久| 91麻豆成人久久精品二区三区| 亚洲成人免费视| 国产视频一区二区在线观看| 欧美午夜精品一区二区蜜桃| 九九国产精品视频| 综合网在线视频| 欧美成人性战久久| 日本韩国欧美三级| 久国产精品韩国三级视频| 国产精品的网站| 欧美电影在线免费观看| 成人综合在线视频| 青娱乐精品在线视频| 中文字幕免费在线观看视频一区| 欧美日韩一区中文字幕| 国产在线精品一区二区夜色| 亚洲欧美一区二区三区久本道91 | 欧美猛男超大videosgay| 国产99一区视频免费| 丝袜美腿亚洲一区二区图片| 国产精品久久久久影院老司| 欧美成人精品1314www| 色94色欧美sute亚洲线路一久| 国产中文字幕一区| 日韩av在线发布| 又紧又大又爽精品一区二区| 国产免费观看久久| 精品久久久久久亚洲综合网 | 奇米影视在线99精品| 一区二区国产视频| 国产精品视频一二三区| 欧美一区三区二区| 欧美午夜免费电影| 色综合久久久久综合体| 成年人网站91| 国产成人免费在线| 国产一区二区免费看| 日韩不卡手机在线v区| 亚洲在线成人精品| 亚洲激情图片一区| 最新日韩av在线| 精品成人在线观看| 精品国产一区二区亚洲人成毛片| 欧美日韩国产天堂| 欧美日韩一二三| 在线一区二区三区做爰视频网站| 99精品一区二区三区| 成人免费高清视频在线观看| 国产一区二区成人久久免费影院| 另类欧美日韩国产在线| 美女在线视频一区| 九九热在线视频观看这里只有精品| 日韩精品视频网站| 日韩av中文字幕一区二区| 视频一区国产视频| 日韩福利视频导航| 日韩成人午夜电影| 久久国产尿小便嘘嘘| 麻豆成人av在线| 激情文学综合丁香| 国产精品亚洲成人| a级高清视频欧美日韩| 91视频在线观看免费| 色狠狠色噜噜噜综合网| 欧美日韩和欧美的一区二区| 欧美日韩精品久久久| 91精品国产欧美一区二区18| 91精品国产入口| www激情久久| 亚洲欧美自拍偷拍| 夜夜精品浪潮av一区二区三区| 亚洲最大的成人av| 美日韩一级片在线观看| 国产91在线|亚洲| 色av成人天堂桃色av| 91精品在线麻豆| 国产午夜精品一区二区三区视频 | 国产精品全国免费观看高清 | 中文字幕亚洲视频| 亚洲成av人片| 国产一区二区三区av电影| 成人激情免费视频| 欧美日韩在线不卡| 久久久久久免费网| 亚洲小少妇裸体bbw| 久久精品国产网站| av亚洲产国偷v产偷v自拍| 欧美日韩第一区日日骚| 精品久久一区二区| 亚洲天堂av老司机| 美女国产一区二区| 99久久99精品久久久久久 | 欧美日韩午夜在线视频| 欧美精品一区二区蜜臀亚洲| 亚洲丝袜另类动漫二区| 蜜臀久久久99精品久久久久久| 成人小视频在线| 欧美一区二区三区四区五区| 国产精品久久久一本精品| 久久精品免费观看| 91高清视频免费看| 国产精品网站在线| 奇米色一区二区| 欧美图区在线视频| 国产精品天天摸av网| 人人精品人人爱| 欧美性欧美巨大黑白大战| 国产日韩欧美不卡| 奇米精品一区二区三区在线观看一| 成人福利视频网站| 国产亚洲短视频| 麻豆国产精品视频| 7777精品伊人久久久大香线蕉超级流畅 | 国v精品久久久网| 91麻豆精品国产91久久久资源速度| 国产精品久久久久一区二区三区| 亚洲成人久久影院| 色天天综合久久久久综合片| 国产女人18毛片水真多成人如厕| 久久av老司机精品网站导航| 欧美日韩精品是欧美日韩精品| 中文字幕精品—区二区四季| 久久爱www久久做| 制服.丝袜.亚洲.另类.中文| 又紧又大又爽精品一区二区| 99国产精品一区| 中文字幕一区不卡| 懂色av噜噜一区二区三区av| 久久香蕉国产线看观看99| 美女视频一区在线观看| 日韩一级免费一区| 三级亚洲高清视频| 51午夜精品国产| 五月天激情综合网| 欧美男男青年gay1069videost| 亚洲成人黄色小说| 91精品欧美一区二区三区综合在| 婷婷开心久久网| 精品理论电影在线观看|