org.fuin.utils4swing.layout.scalable
Class JSpinnerScaler

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

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

Scales a JSpinner. This does not work if the spinner's editor was set to an editor other than JSpinner.DefaultEditor.


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

JSpinnerScaler

public JSpinnerScaler()
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 final 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.