org.fuin.utils4swing.layout.scalable
Class JComponentScaler

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

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

Scales any AWT component.


Constructor Summary
JComponentScaler()
           
 
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

JComponentScaler

public JComponentScaler()
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 © 2010 Future Invent Informationsmanagement GmbH. All Rights Reserved.