public class JBUI
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JBUI.BaseScaleContext
Deprecated.
Use
UserScaleContext . |
static class |
JBUI.Borders |
static class |
JBUI.CurrentTheme |
static class |
JBUI.Fonts |
static class |
JBUI.JBIcon<T extends JBScalableIcon>
Deprecated.
Use
JBScalableIcon . |
static class |
JBUI.Panels |
static class |
JBUI.ScaleContext
Deprecated.
Use
ScaleContext . |
static class |
JBUI.ScaleType
Deprecated.
Use
ScaleType . |
Constructor and Description |
---|
JBUI() |
Modifier and Type | Method and Description |
---|---|
static javax.swing.border.Border |
asUIResource(javax.swing.border.Border border) |
static JBInsets |
emptyInsets() |
static JBDimension |
emptySize() |
static int |
getInt(java.lang.String propertyName,
int defaultValue) |
static JBInsets |
insets(java.awt.Insets insets) |
static JBInsets |
insets(int all) |
static JBInsets |
insets(int topBottom,
int leftRight) |
static JBInsets |
insets(int top,
int left,
int bottom,
int right) |
static JBInsets |
insets(java.lang.String propName,
JBInsets defaultValue) |
static JBInsets |
insetsBottom(int b) |
static JBInsets |
insetsLeft(int l) |
static JBInsets |
insetsRight(int r) |
static JBInsets |
insetsTop(int t) |
static boolean |
isHiDPI()
Deprecated.
use
JBUIScale.isUsrHiDPI() instead |
static boolean |
isPixHiDPI(java.awt.Component comp)
Returns whether the
DerivedScaleType.PIX_SCALE scale factor assumes HiDPI-awareness in the provided component's device. |
static boolean |
isPixHiDPI(java.awt.GraphicsConfiguration gc)
Returns whether the
DerivedScaleType.PIX_SCALE scale factor assumes HiDPI-awareness in the provided graphics config. |
static boolean |
isUsrHiDPI()
Deprecated.
|
static float |
pixScale()
Returns the pixel scale factor, corresponding to the default monitor device.
|
static float |
pixScale(java.awt.Component comp)
Returns the pixel scale factor, corresponding to the device the provided component is tied to.
|
static float |
pixScale(float f)
Returns "f" scaled by pixScale().
|
static float |
pixScale(java.awt.GraphicsConfiguration gc)
Returns the pixel scale factor, corresponding to the provided configuration.
|
static float |
scale(float f)
Deprecated.
|
static int |
scale(int i) |
static <T extends JBScalableIcon> |
scale(T icon)
Deprecated.
|
static <T extends JBUI.JBIcon> |
scale(T icon)
Deprecated.
|
static int |
scaleFontSize(float fontSize) |
static float |
setUserScaleFactor(float scale)
Deprecated.
|
static JBDimension |
size(java.awt.Dimension size) |
static JBDimension |
size(int widthAndHeight) |
static JBDimension |
size(int width,
int height) |
static float |
sysScale()
Deprecated.
|
static float |
sysScale(java.awt.Component comp)
Deprecated.
|
static float |
sysScale(java.awt.Graphics2D g)
Deprecated.
|
static JBValue |
uiIntValue(java.lang.String key,
int defValue) |
static JBValue |
value(float value) |
@Deprecated public static float sysScale()
JBUIScale.sysScale()
@Deprecated public static float sysScale(java.awt.Graphics2D g)
JBUIScale.sysScale(Graphics2D)
@Deprecated public static float sysScale(java.awt.Component comp)
JBUIScale.sysScale(Component)
public static float pixScale()
public static float pixScale(float f)
public static float pixScale(java.awt.GraphicsConfiguration gc)
pixScale()
public static float pixScale(java.awt.Component comp)
pixScale()
@Deprecated public static float setUserScaleFactor(float scale)
JBUIScale.setUserScaleFactor(float)
@Deprecated public static float scale(float f)
JBUIScale.scale(float)
public static int scale(int i)
public static int scaleFontSize(float fontSize)
public static JBValue value(float value)
public static JBValue uiIntValue(java.lang.String key, int defValue)
public static JBDimension size(int width, int height)
public static JBDimension size(int widthAndHeight)
public static JBDimension size(java.awt.Dimension size)
public static JBInsets insets(int top, int left, int bottom, int right)
public static JBInsets insets(int all)
public static JBInsets insets(int topBottom, int leftRight)
public static JBInsets emptyInsets()
public static JBInsets insetsTop(int t)
public static JBInsets insetsLeft(int l)
public static JBInsets insetsBottom(int b)
public static JBInsets insetsRight(int r)
@Deprecated public static <T extends JBScalableIcon> T scale(T icon)
JBUIScale.scaleIcon(JBScalableIcon)
.@Deprecated public static <T extends JBUI.JBIcon> T scale(T icon)
JBUIScale.scaleIcon(JBScalableIcon)
.public static JBDimension emptySize()
public static JBInsets insets(java.awt.Insets insets)
@Deprecated public static boolean isHiDPI()
JBUIScale.isUsrHiDPI()
instead@Deprecated public static boolean isUsrHiDPI()
JBUIScale.isUsrHiDPI()
public static boolean isPixHiDPI(java.awt.GraphicsConfiguration gc)
DerivedScaleType.PIX_SCALE
scale factor assumes HiDPI-awareness in the provided graphics config.
An equivalent of isHiDPI(pixScale(gc))
public static boolean isPixHiDPI(java.awt.Component comp)
DerivedScaleType.PIX_SCALE
scale factor assumes HiDPI-awareness in the provided component's device.
An equivalent of isHiDPI(pixScale(comp))
public static javax.swing.border.Border asUIResource(javax.swing.border.Border border)
public static int getInt(java.lang.String propertyName, int defaultValue)