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

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

?? 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();    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
福利视频网站一区二区三区| 床上的激情91.| 成人黄色电影在线| 日韩三级免费观看| 亚洲六月丁香色婷婷综合久久| 麻豆极品一区二区三区| 欧美亚洲自拍偷拍| 一区二区三区中文免费| www.一区二区| 欧美国产一区在线| 天天影视色香欲综合网老头| 欧美三级电影在线观看| 亚洲最大色网站| 日本韩国欧美一区| 一区二区三区在线免费观看| 国产成人免费9x9x人网站视频| 日韩欧美精品在线视频| 日韩在线a电影| 欧美一区二区三区视频在线观看| 亚洲成人资源网| 欧美日韩在线播放一区| 天堂va蜜桃一区二区三区漫画版| 色婷婷综合久久久久中文一区二区| 国产欧美精品一区二区三区四区| 国产91在线观看| 亚洲电影在线免费观看| 精品成人a区在线观看| 国产成人精品一区二| 亚洲欧美另类图片小说| 欧美美女一区二区三区| 激情综合色丁香一区二区| 欧美高清在线一区| 91精品福利视频| 亚洲欧美一区二区三区极速播放| 精品午夜久久福利影院| 久久先锋影音av鲁色资源| 欧美精品 日韩| 欧美少妇一区二区| 欧美日韩精品欧美日韩精品一| 不卡av在线免费观看| 蜜乳av一区二区| 麻豆精品在线视频| 国产在线不卡一卡二卡三卡四卡| 日本va欧美va精品发布| 日韩高清不卡一区| 首页国产欧美久久| 蜜臀91精品一区二区三区| 美女免费视频一区二区| 国产精品白丝av| 天天综合天天综合色| 亚洲一区免费视频| av资源站一区| 日韩限制级电影在线观看| 国产一区二区三区视频在线播放| 蜜臀精品久久久久久蜜臀| 午夜视黄欧洲亚洲| 亚洲一区二区精品久久av| 亚洲一区视频在线观看视频| 欧美激情一区二区| 国产精品福利一区| 国产精品久久久久久久久久久免费看 | 日本精品视频一区二区| 成人午夜免费视频| 91亚洲精品久久久蜜桃| 成人精品小蝌蚪| 在线亚洲精品福利网址导航| 国产成人av影院| 不卡欧美aaaaa| 欧美一级精品在线| 亚洲欧美日韩在线播放| 婷婷久久综合九色综合伊人色| 激情综合五月婷婷| 欧美色视频一区| 国产精品国产馆在线真实露脸| 丝袜国产日韩另类美女| 92国产精品观看| 欧美v日韩v国产v| 亚洲观看高清完整版在线观看| 国产精品一二三四区| 欧美一级免费大片| 中文字幕亚洲在| 精品午夜久久福利影院| 91精品国产一区二区三区| 亚洲视频每日更新| 99国产精品久久| 1000精品久久久久久久久| 高清国产一区二区三区| 精品国产污网站| 国产中文一区二区三区| 91精品国产综合久久小美女| 亚洲va欧美va人人爽| 欧美在线视频全部完| 亚洲乱码国产乱码精品精的特点 | 久久99精品久久久久久国产越南| 国产精品女同一区二区三区| 一本大道av伊人久久综合| 天天综合色天天综合色h| 精品成人a区在线观看| 91久久精品一区二区三| 国产一区二区h| 香蕉加勒比综合久久| 国产精品嫩草影院com| 欧美日韩高清影院| 91在线观看视频| 国产精品一区二区在线观看不卡| 亚洲乱码中文字幕| 国产精品护士白丝一区av| 91精品黄色片免费大全| 91麻豆免费看| 大白屁股一区二区视频| 黑人巨大精品欧美黑白配亚洲| 亚洲一本大道在线| 国产色综合久久| 国产亚洲综合性久久久影院| 6080yy午夜一二三区久久| 欧美性色黄大片手机版| 99久久国产综合精品女不卡| 国产乱子轮精品视频| 精品在线免费观看| 久久99蜜桃精品| 激情深爱一区二区| 久久se这里有精品| 韩国v欧美v日本v亚洲v| 蜜臀av性久久久久蜜臀aⅴ流畅| 日日噜噜夜夜狠狠视频欧美人| 一区二区三区中文字幕在线观看| 亚洲免费资源在线播放| 一区二区三区四区国产精品| 日韩一区日韩二区| 亚洲国产色一区| 日本不卡视频在线观看| 日本不卡视频在线观看| 国内久久精品视频| 粉嫩在线一区二区三区视频| 国产成a人亚洲精| www.亚洲精品| 制服丝袜中文字幕一区| 久久综合久久综合亚洲| 国产日韩欧美激情| 亚洲国产日韩在线一区模特| 免费在线成人网| 99精品久久只有精品| 欧美精品视频www在线观看| 精品国产一区二区精华| 一区二区三区不卡视频在线观看 | 免费成人性网站| 成人app在线观看| 制服丝袜亚洲色图| 国产精品国产三级国产aⅴ原创 | 久久久久九九视频| 亚洲综合色丁香婷婷六月图片| 美女精品自拍一二三四| 色综合网色综合| 91精品婷婷国产综合久久性色| 色av成人天堂桃色av| 这里是久久伊人| 国产精品高潮呻吟| 免费国产亚洲视频| 91高清视频在线| 欧美大度的电影原声| 国产精品美女久久久久aⅴ| 石原莉奈在线亚洲二区| 成人深夜在线观看| 日韩欧美一二区| 亚洲一区二区欧美日韩| 国产精品乡下勾搭老头1| 欧美日本国产一区| 亚洲女人的天堂| 成人av动漫网站| 久久综合999| 国产一区二区导航在线播放| 69久久夜色精品国产69蝌蚪网 | 精品国产一区二区三区忘忧草 | 2019国产精品| 激情小说欧美图片| 久久综合五月天婷婷伊人| 天天综合日日夜夜精品| 欧美色窝79yyyycom| 亚洲影院免费观看| 欧洲精品一区二区三区在线观看| 亚洲精品久久久久久国产精华液| 成人av在线资源| 一区二区在线电影| 欧美无砖砖区免费| 麻豆一区二区在线| 久久久午夜电影| 成人av电影在线播放| 亚洲小说欧美激情另类| 欧美浪妇xxxx高跟鞋交| 久久电影网站中文字幕| 久久综合狠狠综合久久综合88| 成人精品亚洲人成在线| 亚洲精品久久7777| 4438x成人网最大色成网站| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产精品久久免费看| 91国在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲成精国产精品女| 国产欧美日本一区视频|