org.fuin.utils4swing.layout.scalable
Class ScaledComponent

java.lang.Object
  extended by org.fuin.utils4swing.layout.scalable.ScaledComponent

public final class ScaledComponent
extends java.lang.Object

Helper class for scaled AWT components that don't have client properties.


Constructor Summary
ScaledComponent(java.awt.Component comp, ScalableLayoutRegistry registry)
          Constructor with component.
 
Method Summary
 ScaledBorder getBorder()
          Returns the helper for the border.
 java.awt.Rectangle getBounds()
          Returns the original bounds.
 java.awt.Component getComp()
          Original component.
 java.awt.Font getFont()
          Returns the original font.
 java.awt.Dimension getMaximumSize()
          Returns the original maximum size.
 java.awt.Dimension getMinimumSize()
          Returns the original minimum size.
 java.awt.Dimension getPreferredSize()
          Returns the original preferred size.
 void setBounds(java.awt.Rectangle rectangle)
          Sets the original bounds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaledComponent

public ScaledComponent(java.awt.Component comp,
                       ScalableLayoutRegistry registry)
Constructor with component.

Parameters:
comp - Component (not yet scaled) - Cannot be null.
registry - Current registry - Cannot be null.
Method Detail

getComp

public final java.awt.Component getComp()
Original component.

Returns:
Component.

getFont

public final java.awt.Font getFont()
Returns the original font.

Returns:
Original font.

getBounds

public final java.awt.Rectangle getBounds()
Returns the original bounds.

Returns:
Original bounds.

setBounds

public final void setBounds(java.awt.Rectangle rectangle)
Sets the original bounds.

Parameters:
rectangle - Original bounds.

getPreferredSize

public final java.awt.Dimension getPreferredSize()
Returns the original preferred size.

Returns:
Original preferred size.

getMinimumSize

public final java.awt.Dimension getMinimumSize()
Returns the original minimum size.

Returns:
Original minimum size.

getMaximumSize

public final java.awt.Dimension getMaximumSize()
Returns the original maximum size.

Returns:
Original maximum size.

getBorder

public final ScaledBorder getBorder()
Returns the helper for the border.

Returns:
Border helper class or null if no border was set.


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