org.fuin.utils4swing.layout.scalable
Class DefaultComponentScaler

java.lang.Object
  extended by org.fuin.utils4swing.layout.scalable.DefaultComponentScaler
All Implemented Interfaces:
ComponentScaler

public final class DefaultComponentScaler
extends java.lang.Object
implements ComponentScaler

Scales any AWT component.


Constructor Summary
DefaultComponentScaler()
           
 
Method Summary
 ScaledComponent createScaledComponent(java.awt.Component comp, ScalableLayoutRegistry registry)
          Creates a container for the original component values.
 java.lang.Class<? extends java.awt.Component> getType()
          Returns the type of component this class can scale.
 void scale(ScaledComponent sc, double factor, ScalableLayoutRegistry registry)
          Resize the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentScaler

public DefaultComponentScaler()
Method Detail

getType

public final java.lang.Class<? extends java.awt.Component> getType()
Returns the type of component this class can scale.

Specified by:
getType in interface ComponentScaler
Returns:
Component class.

createScaledComponent

public ScaledComponent createScaledComponent(java.awt.Component comp,
                                             ScalableLayoutRegistry registry)
Creates a container for the original component values.

Specified by:
createScaledComponent in interface ComponentScaler
Parameters:
comp - Component (not yet scaled).#
registry - Current registry.
Returns:
Container component.

scale

public final void scale(ScaledComponent sc,
                        double factor,
                        ScalableLayoutRegistry registry)
Resize the component.

Specified by:
scale in interface ComponentScaler
Parameters:
sc - Component to resize.
factor - Factor to use.
registry - Current registry.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.