Package com.rvandoosselaer.jmeutils.gui
Class GuiUtils
- java.lang.Object
-
- com.rvandoosselaer.jmeutils.gui.GuiUtils
-
public class GuiUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GuiUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcenter(com.simsilica.lemur.Panel panel)Set the location of the panel to the center (horizontal and vertical) of the screenstatic voidclampBoundaries(com.simsilica.lemur.Panel panel)Updates the location of the panel if the panel goes outside the screen boundaries.static intgetHeight()static intgetWidth()static voidsetMouseCursor(java.lang.String image)Sets a mouse cursor image.
-
-
-
Method Detail
-
clampBoundaries
public static void clampBoundaries(com.simsilica.lemur.Panel panel)
Updates the location of the panel if the panel goes outside the screen boundaries. This can be useful if you want to make sure that draggable panels can't be dragged outside the screen.- Parameters:
panel- the panel to check
-
center
public static void center(com.simsilica.lemur.Panel panel)
Set the location of the panel to the center (horizontal and vertical) of the screen- Parameters:
panel- the panel to center
-
getHeight
public static int getHeight()
- Returns:
- the height/resolution of the display
-
getWidth
public static int getWidth()
- Returns:
- the width/resolution of the display
-
setMouseCursor
public static void setMouseCursor(java.lang.String image)
Sets a mouse cursor image. When a null string is given the default system cursor is set.- Parameters:
image- path to the cursor in the assets folder, or null for the default system cursor
-
-