Package org.tn5250j.tools
Class FixedCenterLayout
- java.lang.Object
-
- org.tn5250j.tools.FixedCenterLayout
-
- All Implemented Interfaces:
java.awt.LayoutManager,java.awt.LayoutManager2,java.io.Serializable
public class FixedCenterLayout extends java.lang.Object implements java.awt.LayoutManager2, java.io.SerializableFixed Center layout.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FixedCenterLayout()Constructs a new layout with no gap between components.FixedCenterLayout(int hgap)Constructs a layout with the specified gaps between components.
-
Method Summary
Modifier and Type Method Description voidaddLayoutComponent(java.awt.Component comp, java.lang.Object constraints)Adds the specified component to the layout.voidaddLayoutComponent(java.lang.String name, java.awt.Component comp)We are forced to support it byLayoutManager.intgetHgap()Returns the horizontal gap between components.floatgetLayoutAlignmentX(java.awt.Container parent)Returns the alignment along the x axis.floatgetLayoutAlignmentY(java.awt.Container parent)Returns the alignment along the y axis.voidinvalidateLayout(java.awt.Container target)Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.voidlayoutContainer(java.awt.Container target)Lays out the target argument using this layout.java.awt.DimensionmaximumLayoutSize(java.awt.Container target)Determines the maximum size of the target.java.awt.DimensionminimumLayoutSize(java.awt.Container target)Determines the minimum size of the target.java.awt.DimensionpreferredLayoutSize(java.awt.Container target)Determines the preferred size of the target.voidremoveLayoutComponent(java.awt.Component component)Removes the specified component from this layout.voidsetHgap(int hgap)Sets the horizontal gap between components.java.lang.StringtoString()Returns a string representation of the state of this layout.
-
-
-
Method Detail
-
getHgap
public int getHgap()
Returns the horizontal gap between components.- Returns:
- numnber
-
setHgap
public void setHgap(int hgap)
Sets the horizontal gap between components.- Parameters:
hgap- number
-
addLayoutComponent
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)Adds the specified component to the layout.- Specified by:
addLayoutComponentin interfacejava.awt.LayoutManager2- Parameters:
comp- componentconstraints- object
-
addLayoutComponent
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)We are forced to support it byLayoutManager.- Specified by:
addLayoutComponentin interfacejava.awt.LayoutManager- Parameters:
name- stringcomp- component
-
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component component)
Removes the specified component from this layout.- Specified by:
removeLayoutComponentin interfacejava.awt.LayoutManager- Parameters:
component- component
-
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container target)
Determines the minimum size of the target.- Specified by:
minimumLayoutSizein interfacejava.awt.LayoutManager- Parameters:
target- container- Returns:
- dimension
-
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
Determines the preferred size of the target.- Specified by:
preferredLayoutSizein interfacejava.awt.LayoutManager- Parameters:
target- container- Returns:
- dimension
-
maximumLayoutSize
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
Determines the maximum size of the target.- Specified by:
maximumLayoutSizein interfacejava.awt.LayoutManager2- Parameters:
target- container- Returns:
- dimension
-
getLayoutAlignmentX
public float getLayoutAlignmentX(java.awt.Container parent)
Returns the alignment along the x axis.- Specified by:
getLayoutAlignmentXin interfacejava.awt.LayoutManager2- Parameters:
parent- container- Returns:
- float
-
getLayoutAlignmentY
public float getLayoutAlignmentY(java.awt.Container parent)
Returns the alignment along the y axis.- Specified by:
getLayoutAlignmentYin interfacejava.awt.LayoutManager2- Parameters:
parent- container- Returns:
- float
-
invalidateLayout
public void invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.- Specified by:
invalidateLayoutin interfacejava.awt.LayoutManager2- Parameters:
target- container
-
layoutContainer
public void layoutContainer(java.awt.Container target)
Lays out the target argument using this layout.- Specified by:
layoutContainerin interfacejava.awt.LayoutManager- Parameters:
target- container
-
toString
public java.lang.String toString()
Returns a string representation of the state of this layout.- Overrides:
toStringin classjava.lang.Object- Returns:
- string
-
-