Class ScreenUtil

java.lang.Object
com.luna.common.swing.ScreenUtil

public class ScreenUtil extends Object
屏幕相关(当前显示设置)工具类
Since:
4.1.14
Author:
looly
  • Field Details

    • dimension

      public static Dimension dimension
  • Constructor Details

    • ScreenUtil

      public ScreenUtil()
  • Method Details

    • getWidth

      public static int getWidth()
      获取屏幕宽度
      Returns:
      屏幕宽度
    • getHeight

      public static int getHeight()
      获取屏幕高度
      Returns:
      屏幕高度
    • getRectangle

      public static Rectangle getRectangle()
      获取屏幕的矩形
      Returns:
      屏幕的矩形
    • captureScreen

      public static BufferedImage captureScreen()
      截取全屏
      Returns:
      截屏的图片
      See Also:
    • captureScreen

      public static File captureScreen(File outFile)
      截取全屏到文件
      Parameters:
      outFile - 写出到的文件
      Returns:
      写出到的文件
      See Also:
    • captureScreen

      public static BufferedImage captureScreen(Rectangle screenRect)
      截屏
      Parameters:
      screenRect - 截屏的矩形区域
      Returns:
      截屏的图片
      See Also:
    • captureScreen

      public static File captureScreen(Rectangle screenRect, File outFile)
      截屏
      Parameters:
      screenRect - 截屏的矩形区域
      outFile - 写出到的文件
      Returns:
      写出到的文件
      See Also: