Package de.alpharogroup.layout
Class ScreenSizeExtensions
- java.lang.Object
-
- de.alpharogroup.layout.ScreenSizeExtensions
-
public class ScreenSizeExtensions extends java.lang.ObjectUtility class for handle with screensize.
-
-
Constructor Summary
Constructors Constructor Description ScreenSizeExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.awt.Point>computeDialogPositions(int dialogWidth, int dialogHeight)Compute how much dialog can be put into the screen and returns a list with the coordinates from the dialog positions as Point objects.static intgetFirstScreenHeight()Gets the first screen width.static intgetFirstScreenWidth()Gets the first screen width.static java.awt.PointgetPoint()Gets the Screensize and returns it as a Point object.static java.awt.GraphicsDevice[]getScreenDevices()Gets all the screen devices.static java.awt.DimensiongetScreenDimension(java.awt.Component component)Gets the screen dimension.static intgetScreenHeight()Gets the height from the current screen.static intgetScreenHeight(java.awt.Component component)Gets the screen height of theGraphicsDevicethat is displayed from the given componentstatic intgetScreenHeight(java.awt.GraphicsDevice graphicsDevice)Gets the screen height from the givenGraphicsDeviceobject.static intgetScreenID(java.awt.Component component)Gets the screen ID from the given componentstatic intgetScreenWidth()Gets the width from the current screen.static intgetScreenWidth(java.awt.Component component)Gets the screen width of theGraphicsDevicethat is displayed from the given componentstatic intgetScreenWidth(java.awt.GraphicsDevice graphicsDevice)Gets the screen width from the givenGraphicsDeviceobject.static voidtoggleFullScreen(@NonNull javax.swing.JFrame frame)Toggle full screen.
-
-
-
Method Detail
-
computeDialogPositions
public static java.util.List<java.awt.Point> computeDialogPositions(int dialogWidth, int dialogHeight)Compute how much dialog can be put into the screen and returns a list with the coordinates from the dialog positions as Point objects.- Parameters:
dialogWidth- the dialog widthdialogHeight- the dialog height- Returns:
- the list with the computed Point objects.
-
getFirstScreenHeight
public static int getFirstScreenHeight()
Gets the first screen width.- Returns:
- the first screen width.
-
getFirstScreenWidth
public static int getFirstScreenWidth()
Gets the first screen width.- Returns:
- the first screen width.
-
getPoint
public static java.awt.Point getPoint()
Gets the Screensize and returns it as a Point object.- Returns:
- A Point object.
-
getScreenDevices
public static java.awt.GraphicsDevice[] getScreenDevices()
Gets all the screen devices.- Returns:
- the screen devices
-
getScreenDimension
public static java.awt.Dimension getScreenDimension(java.awt.Component component)
Gets the screen dimension.- Parameters:
component- the component- Returns:
- the screen dimension
-
getScreenHeight
public static int getScreenHeight()
Gets the height from the current screen.- Returns:
- Returns the height from the current screen.
-
getScreenHeight
public static int getScreenHeight(java.awt.Component component)
Gets the screen height of theGraphicsDevicethat is displayed from the given component- Parameters:
component- the component- Returns:
- the screen height
-
getScreenHeight
public static int getScreenHeight(java.awt.GraphicsDevice graphicsDevice)
Gets the screen height from the givenGraphicsDeviceobject.- Parameters:
graphicsDevice- theGraphicsDeviceobject.- Returns:
- the screen height from the given
GraphicsDeviceobject.
-
getScreenID
public static int getScreenID(java.awt.Component component)
Gets the screen ID from the given component- Parameters:
component- the component- Returns:
- the screen ID
-
getScreenWidth
public static int getScreenWidth()
Gets the width from the current screen.- Returns:
- Returns the width from the current screen.
-
getScreenWidth
public static int getScreenWidth(java.awt.Component component)
Gets the screen width of theGraphicsDevicethat is displayed from the given component- Parameters:
component- the component- Returns:
- the screen width
-
getScreenWidth
public static int getScreenWidth(java.awt.GraphicsDevice graphicsDevice)
Gets the screen width from the givenGraphicsDeviceobject.- Parameters:
graphicsDevice- theGraphicsDeviceobject.- Returns:
- the screen width from the given
GraphicsDeviceobject.
-
toggleFullScreen
public static void toggleFullScreen(@NonNull @NonNull javax.swing.JFrame frame)Toggle full screen.- Parameters:
frame- the frame
-
-