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

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

?? iframe.java~1~

?? ibm的窗體
?? JAVA~1~
?? 第 1 頁 / 共 2 頁
字號:
package windowstest.com.ibm.iwt;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.image.BufferedImage;

import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.border.AbstractBorder;
import javax.swing.border.Border;

import com.ibm.iwt.event.WindowChangeListener;
import com.ibm.iwt.util.IWTUtilities;
import com.ibm.iwt.window.IBorderComponent;
import com.ibm.iwt.window.IContentPane;
import com.ibm.iwt.window.IWindowTitleBar;

/**
 * <p>The IFrame is the main class that is used to create
 * a custom frame.  In addition to the methods
 * inherited from the IFrame's superclass, JFrame,
 * there are public methods added to the IFrame that
 * allow you to change some basic look and feel components on your frame.
 * <p>The default IFrame behaves exactly the same as a JFrame does so that a
 * JFrame and default IFrame can be interchangeable.  However, by calling some of the
 * public methods available in the IFrame, you can quickly change the look of
 * your window with only a few lines of code.
 * <p><b>Note:</b> The IFrame functions <code>getIContentPane()</code>
 * and <code>setIContentPane()</code> should be used in place
 * of the JFrame equivelent <code>getContentPane()</code> and
 * <code>setContentPane()</code>.  All components that get
 * added to the IFrame should call <code>myIFrame.getIContentPane().add()</code>.
 * Adding components to the IFrame using <code>getContentPane()</code>
 * or setting the content pane using <code>setContentPane()</code>
 * will lead to unpredictable and most likely incorrect behavior.
 * @author MAbernethy
 * <p><font size=-1><b>Known Issues</b>
 * <br>+ When user clicks on transparent region of IFrame, IFrame is sent to back of all
 *		open windows, instead of just the window clicked on.
 * <br>+ There is no minimum size for the windows, which can lead to layout issues on
 * 		default title bars and disappearing windows which have 1 pixel width or height.
 * <br>+ When the window loses focus, and then regains focus, it does not recapture
 * 		the screen shot.  For example, but minimizing a window behind the IFrame,
 * 		correct behavior would be to recapture the screen shot without that minimized
 * 		window.  The solution causes slow performance when the IFrame regains
 * 		focus and has been omitted.  As a workaround, code can be added to
 * 		windowDeactived() to forcefully minimize the window when it loses focus.
 * </font>
 */
public class IFrame extends JFrame implements WindowChangeListener, WindowListener, MouseListener, MouseMotionListener
{
	/** the instance of the title panel inside the frame */
	protected IWindowTitleBar titleBar;
	/** the instance of the icontent pane inside the frame */
	protected IContentPane iContentPane;

	private static int RESTORE_WIDTH = 0;
	private static int RESTORE_HEIGHT = 0;
	private static int RESTORE_X = 0;
	private static int RESTORE_Y = 0;

	/** constant to turn on transparency when frame is initialized */
	protected int TRANSPARENT_STARTUP = -1;
	/** constant to turn off transparency */
	protected int TRANSPARENT_NONE = 0;
	/** contant to turn on transparency */
	protected int TRANSPARENT_ON = 1;

	private int direction = WindowChangeEvent.RESIZE_NONE;
	private int X = 0;
	private int Y = 0;
	private ResizeThread r;
	private boolean isDrawingTransparent = false;
	private IBorderComponent pressedComponent = null;

	/** the screenshot that is used to draw transparency */
	protected BufferedImage screenShot = null;
	/** the robot instance that captures screen shots */
	protected Robot robot;
	/** the rectangle that defines the screen dimensions */
	protected Rectangle rect;
	/** the frame's transparency status - when off it will speed performance */
	protected int transparentState = TRANSPARENT_STARTUP;

	/**
	 * Creates an IFrame.
	 */
	public IFrame()
	{
		super();
		setUndecorated(true);
		initialize();
	}

	/**
	 * A convenience static method that returns the current application size in pixels.
	 * Subclasses of the IBorderComponent may find this method useful.
	 * @return the size of the frame in pixels
	 */
	public static Dimension getApplicationSize()
	{
		return new Dimension(RESTORE_WIDTH, RESTORE_HEIGHT);
	}

	/**
	 * Sets the frame visibility and also, if transparency is turned on, captures
	 * the screen shot.
	 * @param isVisible the visibility of the frame
	 */
	public void setVisible(boolean isVisible)
	{
		if (isVisible && transparentState != TRANSPARENT_NONE)
		{
			if (transparentState == TRANSPARENT_STARTUP)
				transparentState = TRANSPARENT_NONE;
			captureScreenShot();
		}
		super.setVisible(isVisible);
	}

	/**
	 * Sets the size of the frame.
	 * @param width the width in pixels
	 * @param height the height in pixels
	 */
	public void setSize(int width, int height)
	{
		super.setSize(width, height);
		repaint();
	}

	/**
	 * Sets the size of the frame.
	 * @param size the size of the frame in pixels
	 */
	public void setSize(Dimension size)
	{
		setSize((int)size.getWidth(), (int)size.getHeight());
	}


	/**
	 * Sets the bounds of the frame.
	 * @param r the rectangle that defines the bounds
	 */
	public void setBounds(Rectangle r)
	{
		setBounds(r.x, r.y, r.width, r.height);
	}

	/**
	 * Sets the location of the frame.
	 * @param x the x position
	 * @param y the y position
	 */
	public void setLocation(int x, int y)
	{
		super.setLocation(x, y);
		RESTORE_X = x;
		RESTORE_Y = y;
	}

	/**
	 * Sets the title of the frame and passes the title on to the current title bar.
	 * @param title the title of the frame
	 */
	public void setTitle(String title)
	{
		super.setTitle(title);
		getTitleBar().setTitle(title);
	}

	/**
	 * Sets the icon image of the frame and passes the icon on to the current title bar.
	 * @param i the icon of the frame
	 */
	public void setIconImage(Image i)
	{
		super.setIconImage(i);
		getTitleBar().setLogo(new ImageIcon(i));
	}


	private void initialize()
	{
		addWindowListener(this);
		getContentPane().setLayout(new BorderLayout());
		getContentPane().add(getTitleBar(), BorderLayout.NORTH);
		getContentPane().add(getIContentPane(), BorderLayout.CENTER);
		this.setSize(IWTUtilities.getScreenSize(this));
		RESTORE_WIDTH = getWidth();
		RESTORE_HEIGHT = getHeight();
		r = new ResizeThread(this, 0, 0, getWidth(), getHeight());
		getRootPane().addMouseListener(this);
		getRootPane().addMouseMotionListener(this);
	}

	/**
	 * Returns the instance of the icontent pane that is being used by the frame.
	 * <p><b>Important Note:</b> This method should be used to add components to the
	 * interior of the frame, not <code>getContentPane()</code>.  Using <code>
	 * getContentPane()</code> will cause unpredictable and most likely incorrect
	 * behavior.  By default, the icontent pane instance has a BorderLayout layout and
	 * a default Windows 2000 border.
	 * @return the current icontent pane
	 */
	public IContentPane getIContentPane()
	{
		if (iContentPane == null)
		{
			iContentPane = new IContentPane();
			iContentPane.setBorder(new DefaultBorder());
			iContentPane.setLayout(new BorderLayout());
			iContentPane.addWindowChangeListener(this);
		}
		return iContentPane;
	}

	/**
	 * Sets the current icontent pane of the frame.
	 * @param contentPane the new icontent pane
	 */
	public void setIContentPane(IContentPane contentPane)
	{
		getContentPane().add(contentPane, BorderLayout.CENTER);
		iContentPane = contentPane;
		iContentPane.addWindowChangeListener(this);
	}

	/**
	 * Returns the current title bar being used by the frame.
	 * @return the current title bar
	 */
	public IWindowTitleBar getTitleBar()
	{
		if (titleBar == null)
		{
			titleBar = new IWindowTitleBar();
			titleBar.addWindowChangeListener(this);
		}
		return titleBar;
	}

	/**
	 * Sets the title bar on the frame.
	 * @param windowTitleBar the new title bar
	 */
	public void setTitleBar(IWindowTitleBar windowTitleBar)
	{
		getContentPane().remove(titleBar);
		titleBar = windowTitleBar;
		titleBar.addWindowChangeListener(this);
		getContentPane().add(windowTitleBar, BorderLayout.NORTH);
		repaint();
	}

	private void captureScreenShot()
	{
		try
		{
			robot = new Robot();
			rect = new Rectangle(0, 0, IWTUtilities.getScreenWidth(), IWTUtilities.getScreenHeight());
			screenShot = robot.createScreenCapture(rect);
		}
		catch (java.awt.AWTException ex) {}
	}

	/**
	 * Sets a region on the specified component transparent to the pixels behind the
	 * frame.  To improve performance, the region that is being drawn transparent
	 * should be small, as painting the transparent regions is a relatively slow
	 * process compared to other repaints.  Also, calls to this function should
	 * be called from the caller's <code>paint()</code> so that the transparent
	 * region repaints itself properly as well.
	 * @param c the component that will have the transparent region
	 * @param g the Graphics instance
	 * @param x the x coordinate of the rectangular transparent region
	 * @param y the y coordinate of the rectangular transparent region
	 * @param w the width of the rectangular transparent region
	 * @param h the height of the rectangular transparent region
	 */
	public void setTransparent(JComponent c, Graphics g, int x, int y, int w, int h)
	{
		transparentState = TRANSPARENT_ON;
		Point p = new Point(x,y);
		SwingUtilities.convertPointToScreen(p,c);
		if (p.x+w > screenShot.getWidth())
			w = screenShot.getWidth() - p.x;
		if (p.y+h > screenShot.getHeight())
			h = screenShot.getHeight() - p.y;
		BufferedImage i = screenShot.getSubimage(Math.max(0,p.x), Math.max(0,p.y), w, h);
		ImageIcon icon = new ImageIcon(i);
		Point p2 = new Point(Math.max(0, p.x), Math.max(0, p.y));
		SwingUtilities.convertPointFromScreen(p2, c);
		icon.paintIcon(c, g, p2.x, p2.y);
	}

	/**
	 * Sets the solid background color of the title bar.
	 * @param background the background color
	 */
	public void setTitleBarBackground(Color background)
	{
		getTitleBar().setBackground(background);
	}

	/**
	 * Gets the background color of the title bar.
	 * @return the background color
	 */
	public Color getTitleBarBackground()
	{
		return getTitleBar().getBackground();
	}

	/**
	 * Sets the height of the title bar.
	 * @param height the height in pixels
	 */
	public void setTitleBarHeight(int height)
	{
		getTitleBar().setPreferredSize(new Dimension(1500, height));
	}

	/**
	 * Gets the height of the title bar.
	 * @return the height in pixels
	 */
	public int getTitleBarHeight()
	{
		return (int)getTitleBar().getPreferredSize().getHeight();
	}

	/**
	 * Sets the foreground and the background colors of the title bar buttons.
	 * @param foreground the foreground color
	 * @param background the background color
	 */
	public void setTitleBarButtonColors(Color foreground, Color background)
	{
		getTitleBar().setWindowButtonColors(background, foreground);
	}

	/**
	 * Gets the background color of the title bar buttons.
	 * @return the background color - note that since every title bar button can
	 * have a different color, this will be the background color of the first title bar
	 * button
	 */
	public Color getTitleBarButtonBackground()
	{
		return getTitleBar().getWindowButtonBackground();
	}

	/**
	 * Gets the foreground color of the title bar buttons.
	 * @return the foreground color - note that since every title bar button can
	 * have a different color, this will be the foreground color of the first title bar
	 * button
	 */
	public Color getTitleBarButtonForeground()
	{
		return getTitleBar().getWindowButtonForeground();
	}

	/**
	 * Sets the size of the title bar buttons.
	 * @param size the size in pixels
	 */
	public void setTitleBarButtonSize(Dimension size)
	{
		getTitleBar().setWindowButtonSize(size);
	}

	/**
	 * Gets the size of the title bar buttons.
	 * @return the size - note that since every title bar button can
	 * have a different size, this will be the size of the first title bar
	 * button
	 */
	public Dimension getTitleBarButtonSize()
	{
		return getTitleBar().getWindowButtonSize();
	}

	/**
	 * Sets the border of the current icontent pane.
	 * @param b the new border
	 */
	public void setIContentPaneBorder(Border b)
	{
		getIContentPane().setBorder(b);
	}

	/**
	 * Gets the border of the current icontent pane.
	 * @return the border of the icontent pane
	 */
	public Border getIContentPaneBorder()
	{
		return getIContentPane().getBorder();
	}

	/**
	 * Sets the border of the current title bar.
	 * @param b the new border
	 */
	public void setTitleBarBorder(Border b)
	{
		getTitleBar().setBorder(b);
	}

	/**
	 * Gets the border of the current title bar.
	 * @return the border of the title bar
	 */
	public Border getTitleBarBorder()
	{
		return getTitleBar().getBorder();
	}

	/**
	 * Sets the bounds of the frame.
	 * @param x the x coordinate for the upper left corner of the frame
	 * @param y the y coordinate for the upper left corner of the frame
	 * @param width the width of the frame
	 * @param height the height of the frame
	 */
	public void setBounds(int x, int y, int width, int height)
	{
		super.setBounds(x, y, width, height);
		if (getRootPane() != null)
			getContentPane().setBounds(0, 0, width, height);
		repaint();
	}

	/**
	 * Repaints the frame and all of its children.
	 */
	public void repaint()
	{
		super.repaint();
		if (getRootPane() != null)
		{
			getContentPane().invalidate();
			getContentPane().validate();
		}
	}

	/**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久五月婷婷丁香社区| 美女视频免费一区| 欧美国产成人在线| 久久精品水蜜桃av综合天堂| 日韩欧美你懂的| 欧美精品 日韩| 51精品久久久久久久蜜臀| 欧美日韩中文另类| 欧美日韩精品免费观看视频 | 欧美亚洲国产bt| 日本乱人伦aⅴ精品| 一本色道久久综合亚洲精品按摩| 成人免费毛片片v| www.亚洲色图| 91色|porny| 欧美丝袜自拍制服另类| 欧美亚洲综合久久| 欧美午夜一区二区三区 | 国产情人综合久久777777| 日韩精品一区二区三区中文不卡| 日韩精品一区二区三区三区免费 | 欧美最新大片在线看| 在线观看一区二区视频| 欧美性色综合网| 欧美一区二区三区四区在线观看| 91精品国产综合久久精品性色| 91精品国产综合久久精品图片| 精品免费国产二区三区| 亚洲国产成人一区二区三区| 中文字幕一区二区三区不卡在线| 亚洲同性gay激情无套| 亚洲一区二区精品视频| 视频在线观看一区二区三区| 麻豆91免费看| 国产69精品久久久久毛片| 99精品视频在线播放观看| 欧洲激情一区二区| 日韩丝袜美女视频| 国产精品久久看| 亚洲第一成年网| 精品一区二区三区视频在线观看| 粉嫩一区二区三区性色av| 在线亚洲+欧美+日本专区| 91精品国产麻豆| 欧美国产一区二区| 午夜精品一区二区三区电影天堂 | 国产精品久久久久一区二区三区共 | 精品国一区二区三区| 欧美国产精品中文字幕| 亚洲一区二区在线观看视频 | 欧洲av一区二区嗯嗯嗯啊| 91精品国产91久久久久久最新毛片| 久久久精品免费观看| 亚洲精品视频在线看| 免播放器亚洲一区| heyzo一本久久综合| 欧美日韩国产首页| 国产精品美女视频| 日本免费在线视频不卡一不卡二| 国产成人精品亚洲日本在线桃色 | 亚洲人成在线播放网站岛国 | 色欧美88888久久久久久影院| 欧美一级国产精品| 亚洲另类在线一区| 国产一区二区女| 欧美日韩一区二区三区在线| 久久久久久久国产精品影院| 一区二区高清在线| 国产精品77777竹菊影视小说| 欧美亚洲高清一区| 国产精品久久久久久久久免费樱桃 | 久久精品国产999大香线蕉| a在线播放不卡| 欧美videossexotv100| 亚洲一区二区av在线| 高清成人在线观看| 精品国产青草久久久久福利| 一区二区三区91| 成人av影视在线观看| 26uuu欧美| 日本女优在线视频一区二区| 91国偷自产一区二区三区观看| 久久久91精品国产一区二区精品 | 亚洲综合丝袜美腿| 成人永久免费视频| 日韩欧美久久一区| 亚洲国产日韩综合久久精品| a级精品国产片在线观看| 精品美女在线观看| 人人爽香蕉精品| 欧美日韩你懂的| 亚洲免费观看高清| 99热精品一区二区| 欧美激情在线看| 国内不卡的二区三区中文字幕 | 午夜视频在线观看一区| 色94色欧美sute亚洲13| 亚洲图片激情小说| 91理论电影在线观看| 国产精品不卡在线| av爱爱亚洲一区| 中文字幕在线不卡一区二区三区| 国产精品综合二区| 久久久不卡网国产精品二区| 九九视频精品免费| 欧美成人艳星乳罩| 国产呦精品一区二区三区网站| 日韩免费视频一区| 国产一区在线看| 久久久99精品免费观看| 国产二区国产一区在线观看| 欧美精品一区二区三区在线| 欧美图片一区二区三区| 亚洲一区二区三区中文字幕 | 国产视频一区在线观看 | 欧美一级二级在线观看| 欧美aa在线视频| 欧美一区二区视频在线观看| 日本午夜精品一区二区三区电影| 在线播放一区二区三区| 热久久国产精品| 欧美成人乱码一区二区三区| 精品一区二区三区免费观看| 久久久久久久久伊人| 国产精品456露脸| 国产精品蜜臀在线观看| 91一区在线观看| 香蕉乱码成人久久天堂爱免费| 欧美福利视频导航| 久久精品国产亚洲5555| 国产欧美一区二区三区沐欲| 成人性生交大合| 亚洲综合一区二区三区| 91精品欧美一区二区三区综合在| 极品少妇一区二区| 国产精品久久久爽爽爽麻豆色哟哟 | 玖玖九九国产精品| 国产亚洲成aⅴ人片在线观看| eeuss鲁片一区二区三区| 亚洲精品第一国产综合野| 欧美日韩一区二区在线观看视频| 日本午夜一本久久久综合| 久久美女高清视频| 91在线视频18| 日韩经典一区二区| 久久久国产精品午夜一区ai换脸| 一本色道**综合亚洲精品蜜桃冫 | 亚洲视频一区在线观看| 在线观看免费一区| 久久精品国产一区二区三| 亚洲国产精品ⅴa在线观看| 欧美午夜一区二区三区| 国内偷窥港台综合视频在线播放| 亚洲婷婷综合色高清在线| 欧美日韩国产天堂| 成人性生交大合| 午夜精品久久久久久久蜜桃app | 亚洲国产一区二区a毛片| 欧美大片在线观看一区二区| av在线这里只有精品| 天天色天天爱天天射综合| 国产视频一区不卡| 欧美性猛片xxxx免费看久爱| 国产精品一区二区果冻传媒| 亚洲国产日产av| 中文字幕欧美国产| 欧美一区二区三区爱爱| 99视频精品全部免费在线| 老司机午夜精品99久久| 亚洲免费av观看| 久久久精品免费观看| 9191国产精品| 色综合久久久久综合体桃花网| 精品一区二区三区的国产在线播放 | 久久久综合网站| 91黄色免费版| 国产成人小视频| 秋霞电影网一区二区| 国产精品久久99| 日韩女同互慰一区二区| 91黄色免费观看| av一区二区三区黑人| 极品瑜伽女神91| 日韩精品亚洲专区| 亚洲最大成人网4388xx| 国产女人18毛片水真多成人如厕| 欧美一区二区在线播放| 欧美在线观看视频一区二区| 成人国产视频在线观看| 韩日欧美一区二区三区| 奇米色一区二区| 婷婷一区二区三区| 夜夜嗨av一区二区三区网页| 日本一区二区三区在线不卡 | 经典三级一区二区| 免费观看在线综合| 日本特黄久久久高潮| 亚洲福利一二三区| 亚洲伦在线观看| 成人欧美一区二区三区黑人麻豆|