Package org.vanted.scaling.scalers
Class NimbusScaler
java.lang.Object
org.vanted.scaling.scalers.BasicScaler
org.vanted.scaling.scalers.NimbusScaler
- All Implemented Interfaces:
Scaler
public class NimbusScaler extends BasicScaler
It is sufficient enough to rescale only the default font, this fires a
property change and Nimbus does the rest alone. Icons are sometimes shown
with marks, so we return them unchanged.
- Author:
- D. Garkov
-
Constructor Summary
Constructors Constructor Description NimbusScaler(float scaleFactor)
-
Method Summary
Modifier and Type Method Description void
initialScaling()
Used for synchronized LAFs, where only one change (e.g.Font
modifyFont(Object key, Font original)
Nimbus scales the rest internally based on the above change.Icon
modifyIcon(Object key, Icon original)
Distortions & marks are visible, ergo no modifications.Methods inherited from class org.vanted.scaling.scalers.BasicScaler
getScaleFactor, modifyInsets, modifyInteger, setScaleFactor
-
Constructor Details
-
NimbusScaler
public NimbusScaler(float scaleFactor)
-
-
Method Details
-
initialScaling
public void initialScaling()Description copied from interface:Scaler
Used for synchronized LAFs, where only one change (e.g. Font) is sufficient (e.g. Nimbus).- Specified by:
initialScaling
in interfaceScaler
- Overrides:
initialScaling
in classBasicScaler
-
modifyFont
Nimbus scales the rest internally based on the above change.- Specified by:
modifyFont
in interfaceScaler
- Overrides:
modifyFont
in classBasicScaler
- Parameters:
key
- UIDefaults keyoriginal
- instance to be scaled- Returns:
- newly scaled instance
-
modifyIcon
Distortions & marks are visible, ergo no modifications.- Specified by:
modifyIcon
in interfaceScaler
- Overrides:
modifyIcon
in classBasicScaler
- Parameters:
key
- UIDefaults keyoriginal
- to be scaled- Returns:
- newly scaled instance of either
ImageIcon
orIconUIResource
.
-