Package com.luna.common.swing
Class ScreenUtil
java.lang.Object
com.luna.common.swing.ScreenUtil
屏幕相关(当前显示设置)工具类
- Since:
- 4.1.14
- Author:
- looly
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
截取全屏static BufferedImage
captureScreen
(Rectangle screenRect) 截屏static File
captureScreen
(Rectangle screenRect, File outFile) 截屏static File
captureScreen
(File outFile) 截取全屏到文件static int
获取屏幕高度static Rectangle
获取屏幕的矩形static int
getWidth()
获取屏幕宽度
-
Field Details
-
dimension
-
-
Constructor Details
-
ScreenUtil
public ScreenUtil()
-
-
Method Details
-
getWidth
public static int getWidth()获取屏幕宽度- Returns:
- 屏幕宽度
-
getHeight
public static int getHeight()获取屏幕高度- Returns:
- 屏幕高度
-
getRectangle
获取屏幕的矩形- Returns:
- 屏幕的矩形
-
captureScreen
截取全屏- Returns:
- 截屏的图片
- See Also:
-
captureScreen
截取全屏到文件- Parameters:
outFile
- 写出到的文件- Returns:
- 写出到的文件
- See Also:
-
captureScreen
截屏- Parameters:
screenRect
- 截屏的矩形区域- Returns:
- 截屏的图片
- See Also:
-
captureScreen
截屏- Parameters:
screenRect
- 截屏的矩形区域outFile
- 写出到的文件- Returns:
- 写出到的文件
- See Also:
-