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

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

?? jsframelayout.java

?? Java自定義窗體JsFrame。簡介見:http://jason0086.spaces.live.com/Blog/cns!A797D0C5C0C13C92!518.entry
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package com.hfkj.jsframe.frame;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Insets;

import com.hfkj.jsframe.layout.JsLayoutManager;

/**
 * A js frame layout lays out a container, arranging and resizing its components to
 * fit in thirteen regions: northwest, north, northeast, west, title, title line, menu,
 * content, state, east, southwest, south, southeas. Each region may contain no more than
 * one component, and is identified by a corresponding constraint: 
 * <code>NORTHWEST</code>, <code>NORTH</code>, <code>NORTHEAST</code>, <code>WEST</code>,
 * <code>TITLE</code>, <code>TITLE_LINE</code>, <code>MENU</code>, <code>CONTENT</code>,
 * <code>STATE</code>, <code>EAST</code>, <code>SOUTHWEST</code>, <code>SOUTH</code>,
 * <code>SOUTHEAST</code>.
 * When adding a component to a container with a js frame layout, use one of the above thirteen
 * constraints, for example:
 * <pre>
 * Panel p = new Panel();
 * p.setLayout(new JsFrameLayout());
 * p.add(new Button("Okay"), JsFrameLayout.TITLE);
 * </pre>
 * <p>
 * As a convenience, <code>JsFrameLayout</code> interprets the absence of a string specification
 * the same as the constraint <code>CONTENT</code>:
 * <pre>
 * Panel p = new Panel();
 * p.setLayout(new JsFrameLayout());
 * p.add(new Button("Okay"));	// Same as: p.add(new Button("Okay"), JsFrameLayout.CONTENT);
 * </pre>
 * <p>
 * The components are laid out according to their preferred sizes and the constraints of the
 * container's size. The <code>NORTH</code>, <code>TITLE</code>, <code>TITLE_LINE</code>,
 * <code>MENU</code>, <code>STATE</code> and <code>SOUTH</code> components may be stretched horizontally;
 * the <code>WEST</code> and <code>EAST</code> components may be stretched vertically;
 * the <code>CONTENT</code> component may stretch both horizontally and vertically to
 * fill any space left over.
 * <p>
 * Here is an example of thirteen buttons in frame laid out using the <code>JsFrameLayout</code>
 * layout manager:
 * <p>
 * <img src="doc-files/JsFrameLayout.png" alt="Diagram of a frame demonstrating JsFrameLayout.
 * Each section of the JsFrameLayout contains a Button corresponding to its location in the layout,
 * one of: NORTHWEST, NORTH, NORTHEAST, WEST, TITLE, TITLE_LINE, MENU,CONTENT, STATE, EAST,
 * SOUTHWEST, SOUTH, or SOUTHEAST.">
 * <p>
 * The code for this frame is as follows:
 * <p>
 * <pre>
 * import java.awt.Button;
 * import java.awt.Frame;
 * 
 * import com.hfkj.jsframe.frame.JsFrameLayout;
 * 
 * public class Test {
 * 
 * 	public static void main(String[] args) {
 * 		Frame xFrm = new Frame("Test JsFrameLayout");
 * 		xFrm.setUndecorated(true);
 * 		xFrm.setSize(500, 400);
 * 		xFrm.setLocation(200, 100);
 * 		xFrm.setLayout(new JsFrameLayout(5));
 * 		xFrm.add(new Button("Northwest"), JsFrameLayout.NORTHWEST);
 * 		xFrm.add(new Button("North"), JsFrameLayout.NORTH);
 * 		xFrm.add(new Button("Northeast"), JsFrameLayout.NORTHEAST);
 * 		xFrm.add(new Button("West"), JsFrameLayout.WEST);
 * 		xFrm.add(new Button("Title"), JsFrameLayout.TITLE);
 * 		xFrm.add(new Button("Title line"), JsFrameLayout.TITLE_LINE);
 * 		xFrm.add(new Button("Menu"), JsFrameLayout.MENU);
 * 		xFrm.add(new Button("Content"), JsFrameLayout.CONTENT);
 * 		xFrm.add(new Button("State"), JsFrameLayout.STATE);
 * 		xFrm.add(new Button("East"), JsFrameLayout.EAST);
 * 		xFrm.add(new Button("Southwest"), JsFrameLayout.SOUTHWEST);
 * 		xFrm.add(new Button("South"), JsFrameLayout.SOUTH);
 * 		xFrm.add(new Button("Southeast"), JsFrameLayout.SOUTHEAST);
 * 		xFrm.setVisible(true);
 * 	}
 * 		
 * }
 * </pre>
 * 		
 * @version 1.0 01/05/09
 * @author Jason (MSN:www.jason0086.com@hotmail.com)
 */
public class JsFrameLayout implements JsLayoutManager {

	/**
	 * The northwest layout constraint(northwest of container).
	 */
	public static final String NORTHWEST = "Northwest";
	
	/**
	 * The north layout constraint(north of container).
	 */
	public static final String NORTH = "North";
	
	/**
	 * The northeast layout constraint(northeast of container).
	 */
	public static final String NORTHEAST = "Northeast";
	
	/**
	 * The west layout constraint(west of container).
	 */
	public static final String WEST = "West";
	
	/**
	 * The title layout constraint.
	 */
	public static final String TITLE = "Title";
	
	/**
	 * The title line layout constraint.
	 */
	public static final String TITLE_LINE = "Title_Line";
	
	/**
	 * The menu layout constraint.
	 */
	public static final String MENU = "Menu";
	
	/**
	 * The content layout constraint.
	 */
	public static final String CONTENT = "Content";
	
	/**
	 * The state layout constraint.
	 */
	public static final String STATE = "State";
	
	/**
	 * The east layout constraint(east of container).
	 */
	public static final String EAST = "East";
	
	/**
	 * The southwest layout constraint(southwest of container).
	 */
	public static final String SOUTHWEST = "Southwest";
	
	/**
	 * The south layout constraint(south of container).
	 */
	public static final String SOUTH = "South";
	
	/**
	 * The southeast layout constraint(southeast of container).
	 */
	public static final String SOUTHEAST = "Southeast";
	
	/**
	 * Constant to specify components location to be the northwest portion of the js frame layout.
	 */
	private Component northwest = null;
	
	/**
	 * Constant to specify components location to be the north portion of the js frame layout.
	 */
	private Component north = null;
	
	/**
	 * Constant to specify components location to be the northeast portion of the js frame layout.
	 */
	private Component northeast = null;
	
	/**
	 * Constant to specify components location to be the west portion of the js frame layout.
	 */
	private Component west = null;
	
	/**
	 * Constant to specify components location to be the title portion of the js frame layout.
	 */
	private Component title = null;
	
	/**
	 * Constant to specify components location to be the title line portion of the js frame layout.
	 */
	private Component titleLine = null;
	
	/**
	 * Constant to specify components location to be the menu portion of the js frame layout.
	 */
	private Component menu = null;
	
	/**
	 * Constant to specify components location to be the content portion of the js frame layout.
	 */
	private Component content = null;
	
	/**
	 * Constant to specify components location to be the state portion of the js frame layout.
	 */
	private Component state = null;
	
	/**
	 * Constant to specify components location to be the east portion of the js frame layout.
	 */
	private Component east = null;
	
	/**
	 * Constant to specify components location to be the southwest portion of the js frame layout.
	 */
	private Component southwest = null;
	
	/**
	 * Constant to specify components location to be the south portion of the js frame layout.
	 */
	private Component south = null;
	
	/**
	 * Constant to specify components location to be the southeast portion of the js frame layout.
	 */
	private Component southeast = null;
	
	/**
	 * Constriant to specify the vertical gaps between components.
	 */
	private int vgap = 0;
	
	/**
	 * Constructs a new js frame layout with no gaps between components.
	 *
	 */
	public JsFrameLayout() {
		this(0);
	}
	
	/**
	 * Constructs a js frame layout with the specify gaps between components.
	 * The vertical gap is specified by v.
	 * @param v the vertical gap
	 */
	public JsFrameLayout(int v) {
		vgap = v;
	}
	
	/**
	 * Sets the vertical gap between components.
	 * @param v the vertical gap
	 */
	public void setVgap(int v) {
		vgap = v;
	}
	
	/**
	 * Returns the vertical gap between components.
	 * @return the vertical gap
	 */
	public int getVgap() {
		return vgap;
	}
	
	/**
	 * Adds the specify component to the layout, using the specify constraint object.
	 * The constraint should be null or one of the following constriants:
	 * <code>NORTHWEST</code>, <code>NORTH</code>, <code>NORTHEAST</code>, <code>WEST</code>,
	 * <code>TITLE</code>, <code>TITLE_LINE</code>, <code>MENU</code>, <code>CONTENT</code>, <code>STATE</code>,
	 * <code>EAST</code>, <code>SOUTHWEST</code>, <code>SOUTH</code>, <code>SOUTHEAST</code>.
	 * @param component the component to be added to this layout
	 * @param constraints the constraints indicating the location of the component in this layout
	 */
	public void addLayoutComponent(Component component, Object constraints) {
		synchronized (component.getTreeLock()) {
			if ((constraints == null)  
					|| (constraints instanceof String)) {
				addLayoutComponent((String) constraints, component);
			}
			else {
				throw new IllegalArgumentException("Can not add to layout: constraint must be a string (or null)");
			}
		}
	}

	/**
	 * Adds the specify component to the layout, using the specify constraint object.
	 * The name must be null or one of the following constraints:
	 * <code>NORTHWEST</code>, <code>NORTH</code>, <code>NORTHEAST</code>, <code>WEST</code>,
	 * <code>TITLE</code>, <code>TITLE_LINE</code>, <code>MENU</code>, <code>CONTENT</code>, <code>STATE</code>,
	 * <code>EAST</code>, <code>SOUTHWEST</code>, <code>SOUTH</code>, <code>SOUTHEAST</code>.
	 * @param name the location of the specify component to add into this layout
	 * @param component the component to be added to this layout
	 */
	public void addLayoutComponent(String name, Component component) {
		synchronized (component.getTreeLock()) {
			/* Special case: treat null the same as CENTER. */
			if (name == null) {
				name = CONTENT;
			}
			/* Assign the componentonent to one of the known regions of the layout. */
			if (NORTHWEST.equals(name)) {
				northwest = component;
			}
			else if (NORTH.equals(name)) {
				north = component;
			}
			else if (NORTHEAST.equals(name)) {
				northeast = component;
			}
			else if (WEST.equals(name)) {
				west = component;
			}
			else if (TITLE.equals(name)) {
				title = component;
			}
			else if (TITLE_LINE.equals(name)) {
				titleLine = component;
			}
			else if (MENU.equals(name)) {
				menu = component;
			}
			else if (CONTENT.equals(name)) {
				content = component;
			}
			else if (STATE.equals(name)) {
				state = component;
			}
			else if (EAST.equals(name)) {
				east = component;
			}
			else if (SOUTHWEST.equals(name)) {
				southwest = component;
			}
			else if (SOUTH.equals(name)) {
				south = component;
			}
			else if (SOUTHEAST.equals(name)) {
				southeast = component;
			}
			else {
				throw new IllegalArgumentException("Can not add to layout:unkown constraint:" + name);
			}
		}
	}
	
	/**
	 * Returns the component that was added using the given constraint.
	 * The constraint must be null or one of the following constraints:
	 * <code>NORTHWEST</code>, <code>NORTH</code>, <code>NORTHEAST</code>, <code>WEST</code>,
	 * <code>TITLE</code>, <code>TITLE_LINE</code>, <code>MENU</code>, <code>CONTENT</code>, <code>STATE</code>,
	 * <code>EAST</code>, <code>SOUTHWEST</code>, <code>SOUTH</code>, <code>SOUTHEAST</code>.
	 * @param constraints the location of the specify component in this layout
	 * @return the component associated with the given constraints
	 */
	public Component getLayoutComponent(Object constraints) {
		if (NORTHWEST.equals(constraints)) {
			return northwest;
		}
		else if (NORTH.equals(constraints)) {
			return north;
		}
		else if (NORTHEAST.equals(constraints)) {
			return northeast;
		}
		else if (WEST.equals(constraints)) {
			return west;
		}
		else if (TITLE.equals(constraints)) {
			return title;
		}
		else if (TITLE_LINE.equals(constraints)) {
			return titleLine;
		}
		else if (MENU.equals(constraints)) {
			return menu;
		}
		else if (CONTENT.equals(constraints)) {
			return content;
		}
		else if (STATE.equals(constraints)) {
			return state;
		}
		else if (EAST.equals(constraints)) {
			return east;
		}
		else if (SOUTHWEST.equals(constraints)) {
			return southwest;
		}
		else if (SOUTH.equals(constraints)) {
			return south;
		}
		else if (SOUTHEAST.equals(constraints)) {
			return southeast;
		}
		else {
			throw new IllegalArgumentException("Can not get component: unknown constraint:" + constraints);
		}
	}

	/**
	 * Returns the aligment along the x axis.
	 * This specifies how the component would like to aligned relative to other components.
	 * The value should be a number between 0 and 1 
	 * where 0 represents alignment along the origin, 
	 * 1 is aligned the furthest away from the origin, 
	 * 0.5 is centered, etc.
	 * @param target the container
	 * @return the aligment along the x axis
	 */
	public float getLayoutAlignmentX(Container target) {
		return 0.5f;
	}

	/**
	 * Returns the alignment along the y axis.
	 * This specifies how the component would like to be aligned relative to other components.
	 * The value should be a number between 0 and 1
	 * where 0 represents alignment along the origin, 
	 * 1 is aligned the furthest away from the origin, 
	 * 0.5 is centered, etc.
	 * @param target the container
	 * @return the aligment along the y axis
	 */
	public float getLayoutAlignmentY(Container target) {
		return 0.5f;
	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲综合一区| 综合色中文字幕| 亚洲欧美日韩中文字幕一区二区三区| 亚洲成年人影院| 成人少妇影院yyyy| 精品久久久影院| 天天综合天天做天天综合| 岛国av在线一区| 欧美大胆一级视频| 天堂蜜桃91精品| 色婷婷av一区| 亚洲精品久久久久久国产精华液| 国产一区二区在线视频| 日韩欧美在线影院| 日日嗨av一区二区三区四区| 色诱视频网站一区| 亚洲私人影院在线观看| 成人免费的视频| 国产亚洲一区二区三区| 国产一区在线看| 精品国产免费人成在线观看| 免费观看日韩av| 欧美一区二区三区视频在线观看 | 亚洲成人av免费| 91麻豆文化传媒在线观看| 国产精品免费av| 国产成人精品免费看| 久久久午夜电影| 国产精品白丝av| 国产农村妇女精品| 成人av网站在线| 国产精品毛片高清在线完整版| 国产成人综合在线观看| 国产午夜亚洲精品午夜鲁丝片| 国产综合久久久久影院| 国产色产综合色产在线视频| 成人亚洲精品久久久久软件| 国产喂奶挤奶一区二区三区| 国产传媒日韩欧美成人| 国产精品伦一区二区三级视频| 高清在线不卡av| 国产精品久久毛片av大全日韩| proumb性欧美在线观看| 亚洲欧美一区二区视频| 在线视频综合导航| 午夜精品国产更新| 精品国产一区二区三区久久久蜜月| 久久国产精品色婷婷| 久久精品欧美日韩| 99久久亚洲一区二区三区青草 | 91色porny| 首页欧美精品中文字幕| 精品国产乱码久久久久久1区2区| 国产成人av一区二区| 亚洲男同性恋视频| 宅男噜噜噜66一区二区66| 国产乱人伦偷精品视频免下载 | 北条麻妃一区二区三区| 一区二区三区日韩| 精品美女一区二区三区| 成人激情av网| 日韩福利电影在线| 中文字幕在线一区免费| 欧美美女bb生活片| 高清在线观看日韩| 日韩精品一卡二卡三卡四卡无卡| 国产日韩欧美高清| 欧美日韩精品系列| 国产不卡一区视频| 视频一区视频二区中文字幕| 欧美国产综合一区二区| 欧美日韩黄色影视| 成人app网站| 青青草国产精品亚洲专区无| 亚洲欧洲综合另类在线| 欧美大黄免费观看| 欧美日韩日本视频| a美女胸又www黄视频久久| 日本欧美在线观看| 夜夜爽夜夜爽精品视频| 久久久青草青青国产亚洲免观| 欧美日韩亚洲国产综合| 97se亚洲国产综合在线| 国内外成人在线| 日韩av网站在线观看| 亚洲一区二区三区小说| 国产精品久久久久aaaa樱花| 精品粉嫩超白一线天av| 欧美一区二区在线观看| 91精彩视频在线观看| 国产v综合v亚洲欧| 激情综合色播五月| 免费不卡在线观看| 亚洲成av人综合在线观看| 亚洲欧美中日韩| 国产亚洲精品福利| 久久综合久久综合亚洲| 欧美一级日韩一级| 欧美人与禽zozo性伦| 91欧美一区二区| 97se狠狠狠综合亚洲狠狠| 粉嫩av一区二区三区| 国产精品亚洲а∨天堂免在线| 麻豆精品视频在线| 麻豆精品在线播放| 蜜桃精品在线观看| 免费成人在线观看| 老司机精品视频导航| 精品亚洲欧美一区| 久草精品在线观看| 极品销魂美女一区二区三区| 久久99精品国产麻豆不卡| 九九在线精品视频| 国产在线看一区| 国产一二精品视频| 成人午夜短视频| bt欧美亚洲午夜电影天堂| 99精品久久只有精品| 色婷婷亚洲综合| 欧美精品一卡两卡| 欧美一区三区四区| 精品播放一区二区| 国产日韩欧美一区二区三区乱码 | 欧美电视剧免费全集观看| 日韩欧美的一区| 精品欧美久久久| 欧美极品美女视频| 一区二区在线免费观看| 日韩精品乱码av一区二区| 日韩不卡在线观看日韩不卡视频| 美国三级日本三级久久99| 国产激情视频一区二区三区欧美 | 久久五月婷婷丁香社区| 久久久一区二区| 亚洲免费在线播放| 捆绑调教美女网站视频一区| 丁香天五香天堂综合| 欧美最猛性xxxxx直播| 欧美一级黄色大片| 国产精品三级视频| 亚洲国产另类精品专区| 麻豆91精品视频| 波多野洁衣一区| 欧美一区二区三区喷汁尤物| www激情久久| 亚洲线精品一区二区三区| 精品亚洲国产成人av制服丝袜| 岛国av在线一区| 欧美一区二区视频在线观看2022| 国产夜色精品一区二区av| 亚洲图片一区二区| 国产成人在线观看免费网站| 欧美日韩中字一区| 欧美激情综合网| 蜜臀av亚洲一区中文字幕| 91美女片黄在线观看91美女| 91精品国产aⅴ一区二区| 一区在线观看视频| 精品在线播放午夜| 日本精品免费观看高清观看| 久久综合精品国产一区二区三区| 亚洲乱码日产精品bd| 国产一区在线看| 欧美一区二区在线免费播放| 亚洲日本免费电影| 国产中文字幕精品| 制服丝袜中文字幕亚洲| 亚洲美女视频一区| 高清日韩电视剧大全免费| 欧美一区二区三区四区在线观看 | 国产伦精品一区二区三区免费迷 | 日韩中文字幕区一区有砖一区| 粉嫩高潮美女一区二区三区| 欧美一区二区三区婷婷月色| 一区二区三区四区在线播放| 高清不卡一二三区| 久久久午夜精品| 国产专区欧美精品| 精品国产三级a在线观看| 爽好久久久欧美精品| 欧美日韩国产在线观看| 亚洲最大成人网4388xx| 成年人网站91| 亚洲国产精品av| 国产成人免费在线观看| 久久久久免费观看| 精品一区二区成人精品| 欧美成va人片在线观看| 青青草97国产精品免费观看无弹窗版 | 色天天综合色天天久久| 一区精品在线播放| 91免费看视频| 亚洲精品久久久久久国产精华液| 99久久综合国产精品| 亚洲视频一区二区免费在线观看 | 亚洲视频综合在线| 91免费小视频| 亚洲国产成人av网| 欧美日韩高清一区二区| 日韩av在线发布|