Class JLabelScaler
java.lang.Object
org.vanted.scaling.scalers.BasicScaler
org.vanted.scaling.scalers.component.ComponentScaler
org.vanted.scaling.scalers.component.JLabelScaler
- All Implemented Interfaces:
HTMLScaler
,Scaler
public class JLabelScaler extends ComponentScaler implements HTMLScaler
A JLabel-specific extension of
ComponentScaler
.- Author:
- D. Garkov
-
Constructor Summary
Constructors Constructor Description JLabelScaler(float scaleFactor)
-
Method Summary
Modifier and Type Method Description void
coscaleFont(JComponent component)
Scales all components that have their font not modified by the LAF-Scalers for one reason or another up to this point.void
coscaleHTML(JComponent component)
Interface method formodifyHTML(String, JLabel)
.void
coscaleIcon(JComponent component)
Left to subtypes.void
scaleComponent(JComponent immediateComponent)
A method to be called when this JLabelScaler has been dispatched to some immediate Component to be scaled.Methods inherited from class org.vanted.scaling.scalers.component.ComponentScaler
coscaleInsets
Methods inherited from class org.vanted.scaling.scalers.BasicScaler
getScaleFactor, initialScaling, modifyFont, modifyIcon, modifyInsets, modifyInteger, setScaleFactor
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.vanted.scaling.scalers.Scaler
initialScaling, modifyFont, modifyIcon, modifyInsets, modifyInteger
-
Constructor Details
-
JLabelScaler
public JLabelScaler(float scaleFactor)
-
-
Method Details
-
scaleComponent
A method to be called when this JLabelScaler has been dispatched to some immediate Component to be scaled. This tackles the problem that after a complete application scaling, through the ScalingSlider, further components, initialized posterior, are not scaled. In order to do so, attach a scaler and call this method upon initialization.- Overrides:
scaleComponent
in classComponentScaler
- Parameters:
immediateComponent
- to be scaled
-
coscaleFont
Description copied from class:ComponentScaler
Scales all components that have their font not modified by the LAF-Scalers for one reason or another up to this point.- Overrides:
coscaleFont
in classComponentScaler
- Parameters:
component
- the JComponent, whose Font is to be scaled
-
coscaleIcon
Description copied from class:ComponentScaler
Left to subtypes. There are implementations for the following JComponents:AbstractButton, JLabel, JOptionPane, JTabbedPane.
- Overrides:
coscaleIcon
in classComponentScaler
- Parameters:
component
- Component having Icon
-
coscaleHTML
Interface method formodifyHTML(String, JLabel)
. Part of the HTML-supporting interface contract.Be careful to update the font too, because this is taken as basis and thus the end HTML scaling depends on it.
- Specified by:
coscaleHTML
in interfaceHTMLScaler
- Parameters:
component
-
-