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

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

?? jsframe.java

?? Java自定義窗體JsFrame。簡(jiǎn)介見(jiàn):http://jason0086.spaces.live.com/Blog/cns!A797D0C5C0C13C92!518.entry
?? JAVA
字號(hào):
package com.hfkj.jsframe.frame;

import java.awt.Dimension;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Insets;
import java.awt.LayoutManager;
import java.awt.Rectangle;
import java.awt.Toolkit;

import javax.swing.JComponent;
import javax.swing.JFrame;

import com.hfkj.jsframe.border.JsFrameBorder;
import com.hfkj.jsframe.titlebar.JsTitleBar;
import com.hfkj.jsframe.titlebar.JsTitleBarLine;

/**
 * An extended version of <code>java.awt.Frame</code> that supports a demonstrate frame
 * with its own frame border and title bar.
 * It uses the <code>JsFrameLayout</code> as its layout manager, which contains thirteen
 * compoennts associated with the following constaints as their location in the layout:
 * <p>
 * <ul>
 * <li><code>NORTHWEST</code>(defined in <code>JsFrameLayout</code>):
 * The northwest portion of the layout for this frame.
 * <li><code>NORTH</code>(defined in <code>JsFrameLayout</code>):
 * The north portion of the layout for this frame.
 * <li><code>NORTHEAST</code>(defined in <code>JsFrameLayout</code>):
 * The northeast portion of the layout for this frame.
 * <li><code>WEST</code>(defined in <code>JsFrameLayout</code>):
 * The west portion of the layout for this frame.
 * <li><code>TITLE</code>(defined in <code>JsFrameLayout</code>):
 * The title  portion of the layout for this frame.
 * <li><code>TITLE_LINE</code>(defined in <code>JsFrameLayout</code>):
 * The title line portion of the layout for this frame.
 * <li><code>MENU</code>(defined in <code>JsFrameLayout</code>):
 * The menu portion of the layout for this frame.
 * <li><code>CONTENT</code>(defined in <code>JsFrameLayout</code>):
 * The content portion of the layout for this frame.
 * <li><code>STATE</code>(defined in <code>JsFrameLayout</code>):
 * The state portion of the layout for this frame.
 * <li><code>SOUTHWEST</code>(defined in <code>JsFrameLayout</code>):
 * The southwest portion of the layout for this frame.
 * <li><code>SOUTH</code>(defined in <code>JsFrameLayout</code>):
 * The south portion of the layout for this frame.
 * <li><code>SOUTHEAST</code>(defined in <code>JsFrameLayout</code>):
 * The southeast portion of the layout for this frame.
 * </ul>
 * <p>
 * If you just want to operate some of the above portions, you should first get it 
 * from the layout of the <code>JsFrame</code> by doing the following:
 * <pre>
 * JsFrameLayout layout = (JsFrameLayout) jsframe.getLayout();
 * Component northwest = layout.getLayoutComponent(JsFrameLayout.NORTHWEST);
 * </pre>
 * or doing the following when the component added to this frame is <code>JsFrameBorderBlock</code>:
 * <pre>
 * JsFrameLayout layout = (JsFrameLayout) jsframe.getLayout();
 * JsFrameBorderBlock northwest = (JsFrameBorderBlock) layout.getLayoutComponent(JsFrameLayout.NORTHWEST);
 * </pre>
 * <p>
 * In fact, a <code>JsFrame</code> object has a <code>JsFrameBorder</code> object
 * which contains the following portions of the frame:
 * <code>NORTHWEST</code>, <code>NORTH</code>, <code>NORTHEAST</code>, <code>WEST</code>, <code>EAST</code>, <code>SOUTHWEST</code>,
 * <code>SOUTH</code>, <code>SOUTHEAST</code>. And all the <code>JsFrameBorderBlock</code> in the <code>JsFrameBorder</code> object
 * may respond the mouse events to resize the frame.
 * Each of the above frame border portion can be get from the frame directly by doing the following:
 * <pre>
 * JsFrameLayout layout = (JsFrameLayout) jsframe.getLayout();
 * Component northwest = layout.getLayoutComponent(JsFrameLayout.NORTHWEST);
 * </pre>
 * <p>
 * Additionally, a <code>JsFrame</code> object has a <code>JsTitleBar</code> object
 * which takes up the <code>TITLE</code> portion of the frame. And the <code>JsTitleBar</code>
 * object uses the <code>JsTitleBarLayout</code> as its layout manager, which contains five components
 * associated with the following constaints as their locations in the layout:
 * <code>ICON</code>, <code>TITLE</code>, <code>MINIMIZE</code>, <code>MAXIMIZE_RESTORE</code>, <code>CLOSE</code>.
 * By the <code>JsTitleBar</code> object, the frame can be moved, minimized, maximized and closed(disposed)
 * as the mouse operates on the <code>JsTitleBar</code> object.
 * If you want to change some of the <code>JsTitleBar</code> of the frame, you should get the portion first
 * by doing the following:
 * <pre>
 * JsFrameLayout frameLayout = (JsFrameLayout) jsframe.getLayout();
 * JsTitleBar frameTitle = (JsTitleBar) frameLayout.getLayoutComponent(JsFrameLayout.TITLE);
 * JsTitleBarLayout titleLayout = (JsTitleBarLayout) frameTitle.getLayout();
 * Component icon = titleLayout.getLayoutComponent(JsTitleBarLayout.ICON);
 * Component title = titleLayout.getLayoutComponent(JsTitleBarLayout.TITLE);
 * Component minimize = titleLayout.getLayoutComponent(JsTitleBarLayout.MINIMIZE);
 * Component maximize = titleLayout.getLayoutComponent(JsTitleBarLayout.MAXIMIZE_RESTORE);
 * Component close = titleLayout.getLayoutComponent(JsTitleBarLayout.CLOSE);
 * </pre>
 * or doing the following:
 * <pre>
 * JsFrameLayout frameLayout = (JsFrameLayout) jsframe.getLayout();
 * JsTitleBar frameTitle = (JsTitleBar) frameLayout.getLayoutComponent(JsFrameLayout.TITLE);
 * JsTitleBarLayout titleLayout = (JsTitleBarLayout) frameTitle.getLayout();
 * JLabel icon = (JLabel) titleLayout.getLayoutComponent(JsTitleBarLayout.ICON);
 * JLabel title = (JLabel) titleLayout.getLayoutComponent(JsTitleBarLayout.TITLE);
 * JButton minimize = (JButton) titleLayout.getLayoutComponent(JsTitleBarLayout.MINIMIZE);
 * JButton maximize = (JButton) titleLayout.getLayoutComponent(JsTitleBarLayout.MAXIMIZE_RESTORE);
 * JButton close = (JButton) titleLayout.getLayoutComponent(JsTitleBarLayout.CLOSE);
 * </pre>
 * <p>
 * And a <code>JsFrame</code> has a <code>JsTitleBarLine</code> which draws a line
 * with the gradually changing colors. The color of the title line would change gradually from outside
 * color at the start to inside color at the midpoint, then to outside color at the three-quarter point,
 * and then to inside color at the end.
 * 
 * @version 1.0 01/05/09
 * @author Jason (MSN:www.jason0086.com@hotmail.com)
 */
public class JsFrame extends JFrame {
	
	/**
	 * The layout for this js frame.
	 */
	private JsFrameLayout layoutJfl = null;
	
	/**
	 * The js frame border for this js frame.
	 */
	private JsFrameBorder borderJfb = null;
	
	private static final long serialVersionUID = 2190889408218809796L;
	
	/**
     * Constructs a js frame.
	 */
    public JsFrame() {
        super();
        this.setupJsFrame();
    }

    /**
     * Creates a new js frame in the specify GraphicsConfiguration of a screen device.
     * @param gc the <code>GraphicsConfiguration</code> that is used
     * 		to construct the new <code>JsFrame</code>;
     * 		if <code>gc</code> is <code>null</code>, the system
     * 		default <code>GraphicsConfiguration</code> is assumed
     * @exception IllegalArgumentException if <code>gc</code> is not from
     * 		a screen device.  This exception is always thrown when
     *      GraphicsEnvironment.isHeadless() returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see JComponent#getDefaultLocale
     */
    public JsFrame(GraphicsConfiguration gc) {
        super(gc);
        this.setupJsFrame();
    }

    /**
     * Creates a new js frame with the specify title.
     * @param title the title to be displayed in the frame's border. 
     * 		A <code>null</code> value is treated as an empty string, ""
     */
    public JsFrame(String title) {
        super(title);
        this.setupJsFrame();
    	((JsTitleBar) this.layoutJfl.getLayoutComponent(JsFrameLayout.TITLE)).setTitle(title);
    }
    
    /**
     * Creates a new js frame with the specify title and the specify GraphicsConfiguration of a screen device.
     * @param title the title to be displayed in the frame's title bar. 
     * 		A <code>null</code> value is treated as an empty string, ""
     * @param gc the <code>GraphicsConfiguration</code> that is used
     * 		to construct the new <code>JsFrame</code>;
     * 		if <code>gc</code> is <code>null</code>, the system
     * 		default <code>GraphicsConfiguration</code> is assumed
     * @exception IllegalArgumentException if <code>gc</code> is not from
     * 		a screen device.  This exception is always thrown when
     *      GraphicsEnvironment.isHeadless() returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see JComponent#getDefaultLocale
     */
    public JsFrame(String title, GraphicsConfiguration gc) {
        super(title, gc);
        this.setupJsFrame();
    	((JsTitleBar) this.layoutJfl.getLayoutComponent(JsFrameLayout.TITLE)).setTitle(title);
    }
    
    /**
	 * Change the icon and string associated with the look and feel.
     *
     */
    public void changeLookAndFeel() {
    	((JsTitleBar) this.layoutJfl.getLayoutComponent(JsFrameLayout.TITLE)).changeLookAndFeel();
    	((JsTitleBarLine) this.layoutJfl.getLayoutComponent(JsFrameLayout.TITLE_LINE)).changeLookAndFeel();
    	this.borderJfb.changeLookAndFeel();
    }
    
    /**
     * Sets the js frame border for this js frame.
     * @param frameBorder the border for this frame
     */
    public void setBorder(JsFrameBorder frameBorder) {
    	this.borderJfb = frameBorder;
    }
    
    /**
     * Returns the js frame border of this js frame.
     * @return the border of this frame
     */
    public JsFrameBorder getBorder() {
    	return this.borderJfb;
    }
    
    @Override
    public LayoutManager getLayout() {
    	return this.layoutJfl;
    }
    
    @Override
    public void setResizable(boolean resizabled) {
    	super.setResizable(resizabled);
    	this.borderJfb.setResizable(resizabled);
    }
    
    @Override
    public void setIconImage(Image image) {
    	super.setIconImage(image);
    	((JsTitleBar) this.layoutJfl.getLayoutComponent(JsFrameLayout.TITLE)).setIconImage(image);
    }
    
    @Override
    public void setTitle(String title) {
    	super.setTitle(title);
    	((JsTitleBar) this.layoutJfl.getLayoutComponent(JsFrameLayout.TITLE)).setTitle(title);
    }
    
    protected void setupJsFrame() {
    	this.setUndecorated(true);
    	// set the layout for this frame with the given int as the vertical gap between components
    	this.layoutJfl = new JsFrameLayout(3);
    	this.setLayout(this.layoutJfl);
		// add the title portion to this frame
		this.add(new JsTitleBar(this), JsFrameLayout.TITLE);
		// add the title line portion to this frame
    	this.add(new JsTitleBarLine(), JsFrameLayout.TITLE_LINE);
    	// set the border and the title line for this frame
    	this.setBorder(new JsFrameBorder(this));
    	// set the miximized bouds for this frame
    	this.setMaximizedBounds4JsFrame();
	}
    
    private void setMaximizedBounds4JsFrame() {
		int x = 0;
		int y = 0;
		int width = 0;
		int height = 0;
		Insets scrrenIns = Toolkit.getDefaultToolkit().getScreenInsets(this.getGraphicsConfiguration());
		Dimension  screenDmn = Toolkit.getDefaultToolkit().getScreenSize();
		x = -this.layoutJfl.getLayoutComponent(JsFrameLayout.WEST).getPreferredSize().width;
		y = -this.layoutJfl.getLayoutComponent(JsFrameLayout.NORTH).getPreferredSize().height;
		width = screenDmn.width 
				+ this.layoutJfl.getLayoutComponent(JsFrameLayout.WEST).getPreferredSize().width 
				+ this.layoutJfl.getLayoutComponent(JsFrameLayout.EAST).getPreferredSize().width 
				- scrrenIns.left 
				- scrrenIns.right;
		height = screenDmn.height 
					+ this.layoutJfl.getLayoutComponent(JsFrameLayout.NORTH).getPreferredSize().height 
					+ this.layoutJfl.getLayoutComponent(JsFrameLayout.SOUTH).getPreferredSize().height 
					- scrrenIns.top 
					- scrrenIns.bottom;
		this.setMaximizedBounds(new Rectangle(x, y, width, height));
    	
    }

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区在线视频观看58| 一区二区高清视频在线观看| 91麻豆国产精品久久| 亚洲国产精品一区二区久久| 国产日韩欧美不卡在线| 欧美久久久久久久久中文字幕| 美女网站色91| 亚洲激情欧美激情| 久久午夜羞羞影院免费观看| 欧美久久久久久久久| 91丝袜呻吟高潮美腿白嫩在线观看| 免费成人美女在线观看| 亚洲一区二区在线视频| 国产精品网曝门| 制服丝袜亚洲精品中文字幕| 91在线观看下载| 国产资源精品在线观看| 日韩经典一区二区| 亚洲蜜桃精久久久久久久| 欧美精品一区二区三区一线天视频| 欧美午夜精品久久久久久孕妇 | 高清av一区二区| 日韩精品亚洲一区二区三区免费| 亚洲免费观看高清完整| 26uuu久久天堂性欧美| 在线不卡a资源高清| 在线看日本不卡| 成人a免费在线看| 国产999精品久久| 激情综合一区二区三区| 强制捆绑调教一区二区| 日韩精品三区四区| 天天综合网 天天综合色| 一区二区三区四区在线| 亚洲欧美偷拍另类a∨色屁股| 国产精品麻豆久久久| 国产精品三级电影| 欧美激情一区二区三区蜜桃视频| 久久久99免费| 国产欧美精品一区二区三区四区 | 91在线丨porny丨国产| 国产成人av电影| 国产精品一卡二卡| 国产乱码精品一区二区三区五月婷| 久久国产精品无码网站| 蜜桃视频在线观看一区二区| 琪琪久久久久日韩精品| 蜜臀久久99精品久久久画质超高清| 日本欧美在线观看| 久久精品国产一区二区| 韩国在线一区二区| 国产一区二区三区美女| 国产精品中文字幕欧美| 粉嫩aⅴ一区二区三区四区| 国产91丝袜在线18| 暴力调教一区二区三区| 91在线观看地址| 欧美少妇一区二区| 日韩三级免费观看| 久久欧美中文字幕| 中文av一区二区| 一区二区三区欧美视频| 亚洲sss视频在线视频| 蜜桃视频一区二区| 国产精品996| 色婷婷综合中文久久一本| 欧美日韩精品一区二区三区四区| 日韩视频一区二区三区在线播放| 精品国产不卡一区二区三区| 国产精品美女视频| 亚洲高清在线精品| 久久精品国产精品亚洲综合| 粉嫩av一区二区三区| 欧美影院一区二区三区| 欧美一区二区日韩| 国产精品无码永久免费888| 一区二区免费看| 麻豆91在线观看| 不卡的av电影| 欧美一区日韩一区| 国产精品久久久久久久久图文区 | 欧美日韩一区 二区 三区 久久精品| 9191成人精品久久| 日本一区二区三区在线观看| 亚洲成人黄色影院| 国产精品一卡二卡| 欧美日韩一级黄| 久久久不卡影院| 亚洲一级电影视频| 国产老妇另类xxxxx| 在线观看不卡一区| 久久精品日产第一区二区三区高清版| 亚洲视频一区二区在线观看| 美女视频黄久久| 色88888久久久久久影院按摩| 26uuu久久天堂性欧美| 亚洲一区二区三区四区在线观看 | 亚洲va国产va欧美va观看| 国产精品香蕉一区二区三区| 精品视频1区2区3区| 免费在线观看不卡| 91视频一区二区三区| 精品国产免费视频| 亚洲电影第三页| aaa国产一区| 久久亚洲免费视频| 三级欧美在线一区| 成人亚洲精品久久久久软件| 欧美电影免费观看高清完整版| 一区二区三区小说| 成人伦理片在线| 久久网站最新地址| 七七婷婷婷婷精品国产| 91久久精品一区二区三| 欧美高清一级片在线观看| 蜜桃一区二区三区在线| 欧美影院一区二区| 最新热久久免费视频| 国产九色精品成人porny| 欧美精品99久久久**| 一区二区中文视频| 成人综合婷婷国产精品久久蜜臀 | 国产亚洲一二三区| 日韩高清一区二区| 欧美日韩一区二区在线观看视频 | 激情文学综合网| 欧美一三区三区四区免费在线看| 一区二区三国产精华液| 91一区一区三区| 日韩美女视频一区二区 | 综合久久久久综合| 国产99久久久精品| 国产三级精品在线| 国产精品77777竹菊影视小说| 久久亚洲捆绑美女| 韩国精品免费视频| 久久先锋影音av| 国产传媒久久文化传媒| 久久免费电影网| 国产精品一区二区91| 久久久亚洲精品石原莉奈| 国产一区二区三区香蕉| 国产亚洲一区二区三区四区| 国产成人欧美日韩在线电影| 国产精品三级视频| 91最新地址在线播放| 一区二区三区国产精华| 91成人网在线| 视频在线观看91| 欧美www视频| 国产一本一道久久香蕉| 亚洲国产成人一区二区三区| youjizz国产精品| 一区二区三区四区蜜桃| 欧美日韩国产天堂| 蜜桃一区二区三区在线| 久久综合九色欧美综合狠狠| 国产乱一区二区| 成人免费视频在线观看| 91国模大尺度私拍在线视频| 欧美午夜影院一区| 日韩黄色免费电影| 欧美成人精品高清在线播放| 丰满岳乱妇一区二区三区| 日韩美女视频一区二区 | 91麻豆精品国产自产在线观看一区| 视频在线在亚洲| 久久精品欧美日韩| 91麻豆国产福利在线观看| 午夜欧美电影在线观看| 欧美α欧美αv大片| 国产91丝袜在线播放| 亚洲欧美日韩成人高清在线一区| 欧美日韩国产综合一区二区 | 91激情在线视频| 青青草原综合久久大伊人精品| 久久久久久免费| 欧美亚洲动漫制服丝袜| 麻豆传媒一区二区三区| 中文字幕中文字幕一区二区| 7777精品伊人久久久大香线蕉经典版下载 | 国产suv精品一区二区三区| 一区二区三区四区在线播放| 精品成人佐山爱一区二区| 色综合久久99| 国产尤物一区二区在线| 亚洲一区二区三区四区的| 精品福利一二区| 91黄视频在线| 国产成人精品一区二区三区网站观看| 一区二区三区蜜桃| 国产亚洲va综合人人澡精品| 欧美日韩亚洲综合| 国产麻豆精品95视频| 亚洲一区二区精品久久av| 国产人成一区二区三区影院| 91精品国产综合久久蜜臀| 99久久伊人网影院| 久久99久久久久久久久久久| 一区二区三区国产豹纹内裤在线 |