|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.utils4swing.layout.scalable.AbstractScalableLayout
public abstract class AbstractScalableLayout
A layout manager that resizes the content along to a given factor.
| Constructor Summary | |
|---|---|
protected |
AbstractScalableLayout(ScalableLayoutRegistry registry,
Container container)
Constructor with container. |
| Method Summary | |
|---|---|
void |
addLayoutComponent(String name,
Component comp)
|
protected void |
addScaledComponent(Component comp)
Adds a component to the internal list of scaled components. |
abstract void |
afterComponentsScaled(double factor)
This method will be called after all components are scaled. |
protected ScaledComponent |
findScaledComponent(Component comp)
Returns the corresponding scaled component. |
protected Container |
getContainer()
Returns the container this layout depends to. |
double |
getFactor()
Returns the current scaling factor. |
void |
layoutContainer(Container container)
|
Dimension |
minimumLayoutSize(Container container)
|
Dimension |
preferredLayoutSize(Container container)
|
void |
removeLayoutComponent(Component comp)
|
void |
setFactor(double factor)
Sets the scaling factor to a new value. |
void |
setFactorRecursive(double factor)
Sets the scaling factor to a new value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractScalableLayout(ScalableLayoutRegistry registry,
Container container)
registry - Registry to use - Cannot be null.container - Container this layout should be applied to - Cannot be null.| Method Detail |
|---|
public final void addLayoutComponent(String name,
Component comp)
addLayoutComponent in interface LayoutManagerprotected final void addScaledComponent(Component comp)
comp - Component to add.public final void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagerprotected final ScaledComponent findScaledComponent(Component comp)
comp - Component to lookup a scaled component for.
null if not found.public final Dimension preferredLayoutSize(Container container)
preferredLayoutSize in interface LayoutManagerpublic final Dimension minimumLayoutSize(Container container)
minimumLayoutSize in interface LayoutManagerpublic final double getFactor()
public final void setFactor(double factor)
factor - Factor to set.public final void setFactorRecursive(double factor)
setFactorRecursive(double) method
will be called too.
factor - Factor to set.public abstract void afterComponentsScaled(double factor)
factor - Factor used.public final void layoutContainer(Container container)
layoutContainer in interface LayoutManagerprotected final Container getContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||