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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? basicinternalframetitlepane.java

?? java1.6眾多例子參考
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * @(#)BasicInternalFrameTitlePane.java	1.64 05/11/30 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import sun.swing.SwingUtilities2;import java.awt.*;import java.awt.event.*;import javax.accessibility.AccessibleContext;import javax.swing.*;import javax.swing.plaf.*;import javax.swing.border.*;import javax.swing.event.InternalFrameEvent;import java.util.EventListener;import java.beans.PropertyChangeListener;import java.beans.PropertyChangeEvent;import java.beans.VetoableChangeListener;import java.beans.PropertyVetoException;import sun.swing.DefaultLookup;import sun.swing.UIAction;/** * The class that manages a basic title bar * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing.  As of 1.4, support for long term storage * of all JavaBeans<sup><font size="-2">TM</font></sup> * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @version 1.41 01/18/01 * @author David Kloba * @author Steve Wilson */public class BasicInternalFrameTitlePane extends JComponent{    protected JMenuBar menuBar;    protected JButton iconButton;    protected JButton maxButton;    protected JButton closeButton;    protected JMenu windowMenu;    protected JInternalFrame frame;    protected Color selectedTitleColor;    protected Color selectedTextColor;    protected Color notSelectedTitleColor;    protected Color notSelectedTextColor;    protected Icon maxIcon;    protected Icon minIcon;    protected Icon iconIcon;    protected Icon closeIcon;    protected PropertyChangeListener propertyChangeListener;    protected Action closeAction;    protected Action maximizeAction;    protected Action iconifyAction;    protected Action restoreAction;    protected Action moveAction;    protected Action sizeAction;    protected static final String CLOSE_CMD =        UIManager.getString("InternalFrameTitlePane.closeButtonText");    protected static final String ICONIFY_CMD =        UIManager.getString("InternalFrameTitlePane.minimizeButtonText");    protected static final String RESTORE_CMD =        UIManager.getString("InternalFrameTitlePane.restoreButtonText");    protected static final String MAXIMIZE_CMD =        UIManager.getString("InternalFrameTitlePane.maximizeButtonText");    protected static final String MOVE_CMD =        UIManager.getString("InternalFrameTitlePane.moveButtonText");    protected static final String SIZE_CMD =        UIManager.getString("InternalFrameTitlePane.sizeButtonText");    private String closeButtonToolTip;    private String iconButtonToolTip;    private String restoreButtonToolTip;    private String maxButtonToolTip;    private Handler handler;    public BasicInternalFrameTitlePane(JInternalFrame f) {	frame = f;	installTitlePane();    }    protected void installTitlePane() {	installDefaults();        installListeners();        	createActions();	enableActions();	createActionMap();	setLayout(createLayout());	assembleSystemMenu();	createButtons();	addSubComponents();    }    protected void addSubComponents() {	add(menuBar);	add(iconButton);	add(maxButton);	add(closeButton);    }    protected void createActions() {	maximizeAction = new MaximizeAction();	iconifyAction = new IconifyAction();	closeAction = new CloseAction();	restoreAction = new RestoreAction();	moveAction = new MoveAction();	sizeAction = new SizeAction();    }    ActionMap createActionMap() {	ActionMap map = new ActionMapUIResource();	map.put("showSystemMenu", new ShowSystemMenuAction(true));	map.put("hideSystemMenu", new ShowSystemMenuAction(false));	return map;    }    protected void installListeners() {        if( propertyChangeListener == null ) {            propertyChangeListener = createPropertyChangeListener();        }	frame.addPropertyChangeListener(propertyChangeListener);    }    protected void uninstallListeners() {	frame.removePropertyChangeListener(propertyChangeListener);        handler = null;    }    protected void installDefaults() {        maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");	minIcon = UIManager.getIcon("InternalFrame.minimizeIcon");	iconIcon = UIManager.getIcon("InternalFrame.iconifyIcon");	closeIcon = UIManager.getIcon("InternalFrame.closeIcon");	selectedTitleColor = UIManager.getColor("InternalFrame.activeTitleBackground");	selectedTextColor = UIManager.getColor("InternalFrame.activeTitleForeground");	notSelectedTitleColor = UIManager.getColor("InternalFrame.inactiveTitleBackground");	notSelectedTextColor = UIManager.getColor("InternalFrame.inactiveTitleForeground");        setFont(UIManager.getFont("InternalFrame.titleFont"));        closeButtonToolTip =                UIManager.getString("InternalFrame.closeButtonToolTip");        iconButtonToolTip =                UIManager.getString("InternalFrame.iconButtonToolTip");        restoreButtonToolTip =                UIManager.getString("InternalFrame.restoreButtonToolTip");        maxButtonToolTip =                UIManager.getString("InternalFrame.maxButtonToolTip");    }    protected void uninstallDefaults() {    }    protected void createButtons() {	iconButton = new NoFocusButton(                     "InternalFrameTitlePane.iconifyButtonAccessibleName",                     "InternalFrameTitlePane.iconifyButtonOpacity");	iconButton.addActionListener(iconifyAction);        if (iconButtonToolTip != null && iconButtonToolTip.length() != 0) {            iconButton.setToolTipText(iconButtonToolTip);        }	maxButton = new NoFocusButton(                        "InternalFrameTitlePane.maximizeButtonAccessibleName",                        "InternalFrameTitlePane.maximizeButtonOpacity");	maxButton.addActionListener(maximizeAction);	closeButton = new NoFocusButton(                      "InternalFrameTitlePane.closeButtonAccessibleName",                      "InternalFrameTitlePane.closeButtonOpacity");	closeButton.addActionListener(closeAction);        if (closeButtonToolTip != null && closeButtonToolTip.length() != 0) {            closeButton.setToolTipText(closeButtonToolTip);        }        setButtonIcons();    }        protected void setButtonIcons() {        if(frame.isIcon()) {            if (minIcon != null) {                iconButton.setIcon(minIcon);            }            if (restoreButtonToolTip != null &&                    restoreButtonToolTip.length() != 0) {                iconButton.setToolTipText(restoreButtonToolTip);            }            if (maxIcon != null) {                maxButton.setIcon(maxIcon);            }            if (maxButtonToolTip != null && maxButtonToolTip.length() != 0) {                maxButton.setToolTipText(maxButtonToolTip);            }        } else if (frame.isMaximum()) {            if (iconIcon != null) {	        iconButton.setIcon(iconIcon);            }            if (iconButtonToolTip != null && iconButtonToolTip.length() != 0) {                iconButton.setToolTipText(iconButtonToolTip);            }            if (minIcon != null) {	        maxButton.setIcon(minIcon);            }            if (restoreButtonToolTip != null &&                    restoreButtonToolTip.length() != 0) {                maxButton.setToolTipText(restoreButtonToolTip);            }        } else {            if (iconIcon != null) {	        iconButton.setIcon(iconIcon);            }            if (iconButtonToolTip != null && iconButtonToolTip.length() != 0) {                iconButton.setToolTipText(iconButtonToolTip);            }            if (maxIcon != null) {	        maxButton.setIcon(maxIcon);            }            if (maxButtonToolTip != null && maxButtonToolTip.length() != 0) {                maxButton.setToolTipText(maxButtonToolTip);            }        }        if (closeIcon != null) {	    closeButton.setIcon(closeIcon);        }    }    protected void assembleSystemMenu() {        menuBar = createSystemMenuBar();	windowMenu = createSystemMenu();	    	menuBar.add(windowMenu);	addSystemMenuItems(windowMenu);	enableActions();    }    protected void addSystemMenuItems(JMenu systemMenu) {        JMenuItem mi = (JMenuItem)systemMenu.add(restoreAction);	mi.setMnemonic('R');	mi = (JMenuItem)systemMenu.add(moveAction);	mi.setMnemonic('M');	mi = (JMenuItem)systemMenu.add(sizeAction);	mi.setMnemonic('S');	mi = (JMenuItem)systemMenu.add(iconifyAction);	mi.setMnemonic('n');	mi = (JMenuItem)systemMenu.add(maximizeAction);	mi.setMnemonic('x');	systemMenu.add(new JSeparator());	mi = (JMenuItem)systemMenu.add(closeAction);	mi.setMnemonic('C');    }    protected JMenu createSystemMenu() {	return new JMenu("    ");    }    protected JMenuBar createSystemMenuBar() {	menuBar = new SystemMenuBar();	menuBar.setBorderPainted(false);	return menuBar;    }          protected void showSystemMenu(){	//      windowMenu.setPopupMenuVisible(true);      //      windowMenu.setVisible(true);      windowMenu.doClick();    }    public void paintComponent(Graphics g)  {	paintTitleBackground(g);	if(frame.getTitle() != null) {	    boolean isSelected = frame.isSelected();	    Font f = g.getFont();	    g.setFont(getFont());	    if(isSelected)		g.setColor(selectedTextColor);	    else		g.setColor(notSelectedTextColor);            // Center text vertically.	    FontMetrics fm = SwingUtilities2.getFontMetrics(frame, g);            int baseline = (getHeight() + fm.getAscent() - fm.getLeading() -                    fm.getDescent()) / 2;            int titleX;            Rectangle r = new Rectangle(0, 0, 0, 0);            if (frame.isIconifiable())  r = iconButton.getBounds();            else if (frame.isMaximizable())  r = maxButton.getBounds();            else if (frame.isClosable())  r = closeButton.getBounds();	    int titleW;	            String title = frame.getTitle();            if( BasicGraphicsUtils.isLeftToRight(frame) ) {              if (r.x == 0)  r.x = frame.getWidth()-frame.getInsets().right;              titleX = menuBar.getX() + menuBar.getWidth() + 2;              titleW = r.x - titleX - 3;              title = getTitle(frame.getTitle(), fm, titleW);            } else {                titleX = menuBar.getX() - 2                         - SwingUtilities2.stringWidth(frame,fm,title);            }            	    SwingUtilities2.drawString(frame, g, title, titleX, baseline);	    g.setFont(f);	}    }   /**    * Invoked from paintComponent.    * Paints the background of the titlepane.  All text and icons will    * then be rendered on top of this background.    * @param g the graphics to use to render the background    * @since 1.4    */    protected void paintTitleBackground(Graphics g) {	boolean isSelected = frame.isSelected();	if(isSelected)	    g.setColor(selectedTitleColor);	else	    g.setColor(notSelectedTitleColor);	g.fillRect(0, 0, getWidth(), getHeight());    }    protected String getTitle(String text, FontMetrics fm, int availTextWidth) {        return SwingUtilities2.clipStringIfNecessary(                           frame, fm, text, availTextWidth);      }    /**     * Post a WINDOW_CLOSING-like event to the frame, so that it can     * be treated like a regular Frame.     */    protected void postClosingEvent(JInternalFrame frame) {        InternalFrameEvent e = new InternalFrameEvent(            frame, InternalFrameEvent.INTERNAL_FRAME_CLOSING);        // Try posting event, unless there's a SecurityManager.        if (JInternalFrame.class.getClassLoader() == null) {            try {                Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);                return;            } catch (SecurityException se) {                // Use dispatchEvent instead.            }        }        frame.dispatchEvent(e);    }    protected void enableActions() {        restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());         maximizeAction.setEnabled(            (frame.isMaximizable() && !frame.isMaximum() && !frame.isIcon()) ||            (frame.isMaximizable() && frame.isIcon()));        iconifyAction.setEnabled(frame.isIconifiable() && !frame.isIcon());         closeAction.setEnabled(frame.isClosable());        sizeAction.setEnabled(false);        moveAction.setEnabled(false);    }    private Handler getHandler() {        if (handler == null) {            handler = new Handler();        }        return handler;    }    protected PropertyChangeListener createPropertyChangeListener() {        return getHandler();    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久久免费丝袜 | 免费高清视频精品| 色又黄又爽网站www久久| 国产精品久久一级| 91视频91自| 亚洲国产cao| 欧美一区二区在线免费播放| 激情文学综合网| 日本一区二区成人在线| 99re8在线精品视频免费播放| 亚洲欧美日韩国产成人精品影院| 色婷婷亚洲婷婷| 天天爽夜夜爽夜夜爽精品视频| 日韩欧美精品在线视频| 国产久卡久卡久卡久卡视频精品| 中文字幕免费在线观看视频一区| 91丝袜高跟美女视频| 亚洲成人www| 2021国产精品久久精品| 成人一区在线观看| 亚洲自拍偷拍网站| 精品国产91洋老外米糕| 成+人+亚洲+综合天堂| 亚洲综合免费观看高清完整版 | 久久久久久久久97黄色工厂| 国产999精品久久久久久| 一区二区三区四区精品在线视频 | 精品一区二区三区日韩| 中文子幕无线码一区tr| 欧美高清性hdvideosex| 国产一区二区网址| 久久精品国内一区二区三区| 精品国产乱码久久久久久影片| 成人三级在线视频| 天堂在线亚洲视频| 国产丝袜美腿一区二区三区| 欧美三级三级三级| 精品一区二区三区不卡| 一区二区三区中文在线观看| 久久亚洲免费视频| 欧美日韩精品综合在线| 成人黄页在线观看| 免费在线视频一区| 亚洲人成网站在线| 精品国产青草久久久久福利| 在线看国产日韩| 国产精品18久久久久久久久 | 成人免费毛片app| 日韩成人伦理电影在线观看| 亚洲天堂2014| 国产欧美日韩三级| 日韩女同互慰一区二区| 欧美自拍偷拍一区| 成人久久18免费网站麻豆| 久久www免费人成看片高清| 亚洲综合在线视频| 国产精品美女视频| 久久精品一区蜜桃臀影院| 欧美一区二区人人喊爽| 在线观看亚洲一区| 91影院在线观看| 成人网男人的天堂| 国产一区二区三区四区在线观看| 青青草国产精品亚洲专区无| 亚洲最大色网站| 亚洲精品一卡二卡| 18成人在线观看| 亚洲国产精品高清| 久久精品一区八戒影视| 精品乱人伦小说| 日韩一区二区视频| 欧美一激情一区二区三区| 欧美日韩一级大片网址| 在线精品视频小说1| 91小视频免费观看| av福利精品导航| av毛片久久久久**hd| 亚洲第一主播视频| 中文字幕在线不卡视频| 成人激情黄色小说| 99精品一区二区三区| 国产99精品国产| 日韩亚洲欧美高清| 日韩精品自拍偷拍| 日韩视频免费直播| 精品电影一区二区| 久久久久久久网| 国产精品久久久久久久岛一牛影视| 日本一区二区三区dvd视频在线 | 日本丰满少妇一区二区三区| 91黄视频在线观看| 欧美精品久久久久久久多人混战| 欧美一区二区视频在线观看| 日韩一区二区中文字幕| 国产亚洲成av人在线观看导航 | 亚洲免费大片在线观看| 亚洲精品视频免费看| 午夜欧美在线一二页| 免费成人你懂的| 国产美女久久久久| av色综合久久天堂av综合| 欧美在线观看视频在线| 8v天堂国产在线一区二区| 亚洲精品一线二线三线| 欧美国产精品一区二区三区| 亚洲精品亚洲人成人网在线播放| 五月天亚洲婷婷| 国产suv精品一区二区6| 色8久久人人97超碰香蕉987| 欧美一区二区三区系列电影| 久久精品亚洲精品国产欧美| 亚洲免费视频中文字幕| 天堂午夜影视日韩欧美一区二区| 国产一区二区美女诱惑| 色天使色偷偷av一区二区| 日韩一区二区三区三四区视频在线观看| 久久影院电视剧免费观看| 一区二区在线看| 国产中文字幕精品| 91久久线看在观草草青青| 日韩欧美美女一区二区三区| 亚洲日本一区二区| 国产一区美女在线| 91久久精品网| 免费成人深夜小野草| 波多野结衣91| 日韩亚洲欧美在线| 亚洲精品视频自拍| 国产成人综合在线| 555www色欧美视频| 亚洲三级在线观看| 国产精品自拍网站| 欧美肥妇bbw| 亚洲人妖av一区二区| 国产另类ts人妖一区二区| 精品视频一区三区九区| 国产精品免费久久| 国产综合色产在线精品| 欧美日高清视频| 亚洲人成小说网站色在线| 国产精品一区二区x88av| 欧美精品v国产精品v日韩精品| 综合久久久久综合| 大胆欧美人体老妇| 精品99一区二区三区| 日韩中文字幕亚洲一区二区va在线| 91视频一区二区三区| 国产婷婷色一区二区三区在线| 免费xxxx性欧美18vr| 欧美日本免费一区二区三区| 综合av第一页| 不卡一区在线观看| 久久综合丝袜日本网| 麻豆精品在线视频| 欧美日韩国产美| 亚洲国产精品嫩草影院| 91网站最新网址| 欧美经典一区二区三区| 国产伦精品一区二区三区免费| 日韩精品一区二区三区三区免费 | 奇米亚洲午夜久久精品| 欧美色图片你懂的| 一区二区三区欧美亚洲| 91一区在线观看| 国产精品欧美一级免费| 国产色一区二区| 亚洲国产va精品久久久不卡综合| 色狠狠综合天天综合综合| ...中文天堂在线一区| 成人免费高清视频| 国产精品久久久久久久久快鸭| 韩国精品久久久| 五月天一区二区| 欧美日韩中文国产| 亚洲国产精品天堂| 欧美精品一区二区在线观看| 亚洲精品国产a| 欧美videos中文字幕| 欧美一级高清大全免费观看| 制服丝袜日韩国产| www激情久久| 欧美精彩视频一区二区三区| 日韩精品国产欧美| 日产国产高清一区二区三区| 国产在线视频精品一区| a级高清视频欧美日韩| 色综合久久88色综合天天| aa级大片欧美| 精品视频在线免费观看| 精品免费国产一区二区三区四区| 久久这里只有精品视频网| 国产精品盗摄一区二区三区| 亚洲午夜久久久久久久久久久| 国产美女av一区二区三区| 国内精品伊人久久久久av一坑| 欧美无砖砖区免费| 337p亚洲精品色噜噜噜| 欧美三电影在线| 国产免费成人在线视频| 亚洲风情在线资源站|