public final class StartupUiUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARIAL_FONT_NAME |
Constructor and Description |
---|
StartupUiUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
configureHtmlKitStylesheet() |
static javax.swing.text.html.StyleSheet |
createStyleSheet(java.lang.String css) |
static int |
doGetLcdContrastValueForSplash(boolean isUnderDarcula) |
static void |
drawImage(java.awt.Graphics g,
java.awt.image.BufferedImage image,
java.awt.image.BufferedImageOp op,
int x,
int y) |
static void |
drawImage(java.awt.Graphics g,
java.awt.Image image,
int x,
int y,
java.awt.image.ImageObserver observer)
A hidpi-aware wrapper over
Graphics.drawImage(Image, int, int, ImageObserver) . |
static void |
drawImage(java.awt.Graphics g,
java.awt.Image image,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
Deprecated.
Note, the method interprets [x,y,width,height] as the destination and source bounds which doesn't conform
to the
Graphics.drawImage(Image, int, int, int, int, ImageObserver) method contract. This works
just fine for the general-purpose one-to-one drawing, however when the dst and src bounds need to be specific,
use drawImage(Graphics, Image, Rectangle, Rectangle, BufferedImageOp, ImageObserver) . |
static void |
drawImage(java.awt.Graphics g,
java.awt.Image image,
java.awt.Rectangle dstBounds,
java.awt.image.ImageObserver observer)
A hidpi-aware wrapper over
Graphics.drawImage(Image, int, int, int, int, ImageObserver) . |
static void |
drawImage(java.awt.Graphics g,
java.awt.Image image,
java.awt.Rectangle dstBounds,
java.awt.Rectangle srcBounds,
java.awt.image.BufferedImageOp op,
java.awt.image.ImageObserver observer)
A hidpi-aware wrapper over
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver) . |
static void |
drawImage(java.awt.Graphics g,
java.awt.Image image,
java.awt.Rectangle dstBounds,
java.awt.Rectangle srcBounds,
java.awt.image.ImageObserver observer) |
static java.awt.Point |
getCenterPoint(java.awt.Dimension container,
java.awt.Dimension child) |
static java.awt.Point |
getCenterPoint(java.awt.Rectangle container,
java.awt.Dimension child) |
static java.awt.Font |
getLabelFont() |
static java.lang.String |
getSystemLookAndFeelClassName() |
static void |
initDefaultLaF() |
static boolean |
isDialogFont(java.awt.Font font) |
static boolean |
isJreHiDPI()
Returns whether the JRE-managed HiDPI mode is enabled and the default monitor device is HiDPI.
|
static boolean |
isJreHiDPI(java.awt.Component comp)
Returns whether the JRE-managed HiDPI mode is enabled and the provided component is tied to a HiDPI device.
|
static boolean |
isJreHiDPI(ScaleContext ctx)
Returns whether the JRE-managed HiDPI mode is enabled and the provided system scale context is HiDPI.
|
static boolean |
isUnderDarcula() |
public static final java.lang.String ARIAL_FONT_NAME
public static java.lang.String getSystemLookAndFeelClassName()
public static void initDefaultLaF() throws java.lang.ClassNotFoundException, javax.swing.UnsupportedLookAndFeelException, java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.ClassNotFoundException
javax.swing.UnsupportedLookAndFeelException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static void configureHtmlKitStylesheet()
public static javax.swing.text.html.StyleSheet createStyleSheet(java.lang.String css)
public static boolean isUnderDarcula()
public static int doGetLcdContrastValueForSplash(boolean isUnderDarcula)
public static boolean isJreHiDPI()
UIUtil.isRetina()
on macOS)public static boolean isJreHiDPI(java.awt.Component comp)
public static boolean isJreHiDPI(ScaleContext ctx)
public static java.awt.Point getCenterPoint(java.awt.Dimension container, java.awt.Dimension child)
public static java.awt.Point getCenterPoint(java.awt.Rectangle container, java.awt.Dimension child)
public static void drawImage(java.awt.Graphics g, java.awt.Image image, int x, int y, java.awt.image.ImageObserver observer)
Graphics.drawImage(Image, int, int, ImageObserver)
.@Deprecated public static void drawImage(java.awt.Graphics g, java.awt.Image image, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
Graphics.drawImage(Image, int, int, int, int, ImageObserver)
method contract. This works
just fine for the general-purpose one-to-one drawing, however when the dst and src bounds need to be specific,
use drawImage(Graphics, Image, Rectangle, Rectangle, BufferedImageOp, ImageObserver)
.Graphics.drawImage(Image, int, int, int, int, ImageObserver)
.
public static void drawImage(java.awt.Graphics g, java.awt.Image image, java.awt.Rectangle dstBounds, java.awt.image.ImageObserver observer)
Graphics.drawImage(Image, int, int, int, int, ImageObserver)
.public static void drawImage(java.awt.Graphics g, java.awt.Image image, java.awt.Rectangle dstBounds, java.awt.Rectangle srcBounds, java.awt.image.ImageObserver observer)
public static void drawImage(java.awt.Graphics g, java.awt.Image image, java.awt.Rectangle dstBounds, java.awt.Rectangle srcBounds, java.awt.image.BufferedImageOp op, java.awt.image.ImageObserver observer)
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
.
The dstBounds
and srcBounds
are in the user space (just like the width/height of the image).
If dstBounds
is null or if its width/height is set to (-1) the image bounds or the image width/height is used.
If srcBounds
is null or if its width/height is set to (-1) the image bounds or the image right/bottom area to the provided x/y is used.
public static void drawImage(java.awt.Graphics g, java.awt.image.BufferedImage image, java.awt.image.BufferedImageOp op, int x, int y)
public static java.awt.Font getLabelFont()
public static boolean isDialogFont(java.awt.Font font)