org.fuin.utils4swing.layout.scalable
Interface ScalableLayoutRegistry

All Known Implementing Classes:
DefaultScalableLayoutRegistry

public interface ScalableLayoutRegistry

Registry of known helper classes for scaling components and layouts.


Method Summary
 BorderScaler getBorderScaler(Class<? extends Border> borderClass)
          Returns a helper class that can be used to scale a border.
 ComponentScaler getComponentScaler(Class<? extends Component> componentClass)
          Returns a helper class that can be used to scale a component.
 AbstractScalableLayout getScalableLayout(ScalableLayoutRegistry registry, Container container)
          Returns a scalable replacement for the original layout manager.
 boolean isContainer(Component component)
          Checks if a given component should be treated as container.
 

Method Detail

getComponentScaler

ComponentScaler getComponentScaler(Class<? extends Component> componentClass)
Returns a helper class that can be used to scale a component.

Parameters:
componentClass - Class to find a scaler for.
Returns:
Class used to scale that type of component - Always non-null!

getBorderScaler

BorderScaler getBorderScaler(Class<? extends Border> borderClass)
Returns a helper class that can be used to scale a border.

Parameters:
borderClass - Class to find a scaler for.
Returns:
Class used to scale that type of border - Always non-null!

getScalableLayout

AbstractScalableLayout getScalableLayout(ScalableLayoutRegistry registry,
                                         Container container)
Returns a scalable replacement for the original layout manager.

Parameters:
registry - Registry to use.
container - Container with the original layout.
Returns:
Scalable layout manager - Always non-null!

isContainer

boolean isContainer(Component component)
Checks if a given component should be treated as container. This method will be used when setting scalable layout managers recursive.

Parameters:
component - Component to check.
Returns:
If it's a container (means no controls like "JTextField", "JButton"...) true else false.


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