Class AbstractButtonScaler

All Implemented Interfaces:
HTMLScaler, Scaler

public class AbstractButtonScaler
extends ComponentScaler
implements HTMLScaler
An AbstractButton-specific extension of ComponentScaler.
Author:
D. Garkov
  • Constructor Details

    • AbstractButtonScaler

      public AbstractButtonScaler​(float scaleFactor)
  • Method Details

    • scaleComponent

      public void scaleComponent​(JComponent immediateComponent)
      A method to be called when this AbstractButtonScaler 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 class ComponentScaler
      Parameters:
      immediateComponent - to be scaled
    • coscaleFont

      public void coscaleFont​(JComponent component)
      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 class ComponentScaler
      Parameters:
      component - the JComponent, whose Font is to be scaled
    • coscaleIcon

      public void coscaleIcon​(JComponent component)
      Description copied from class: ComponentScaler
      Left to subtypes. There are implementations for the following JComponents:

      AbstractButton, JLabel, JOptionPane, JTabbedPane.

      Overrides:
      coscaleIcon in class ComponentScaler
      Parameters:
      component - Component having Icon
    • coscaleHTML

      public void coscaleHTML​(JComponent component)
      Interface method for modifyHTML(String, AbstractButton). 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 interface HTMLScaler
      Parameters:
      component -