com.alee.extended.layout
Class OverlayLayout
java.lang.Object
com.alee.extended.layout.AbstractLayoutManager
com.alee.extended.layout.OverlayLayout
- All Implemented Interfaces:
- java.awt.LayoutManager, java.awt.LayoutManager2, javax.swing.SwingConstants
public class OverlayLayout
- extends AbstractLayoutManager
- implements javax.swing.SwingConstants
This is a specific layout for WebOverlay component that allows you to add overlaying components atop of single main component.
- Author:
- Mikle Garin
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT
public static final java.lang.String COMPONENT
- See Also:
- Constant Field Values
OVERLAY
public static final java.lang.String OVERLAY
- See Also:
- Constant Field Values
constraints
protected java.util.Map<java.awt.Component,java.lang.String> constraints
componentMargin
protected java.awt.Insets componentMargin
overlayMargin
protected java.awt.Insets overlayMargin
OverlayLayout
public OverlayLayout()
getComponentMargin
public java.awt.Insets getComponentMargin()
setComponentMargin
public void setComponentMargin(int margin)
setComponentMargin
public void setComponentMargin(int top,
int left,
int bottom,
int right)
setComponentMargin
public void setComponentMargin(java.awt.Insets margin)
getOverlayMargin
public java.awt.Insets getOverlayMargin()
setOverlayMargin
public void setOverlayMargin(int margin)
setOverlayMargin
public void setOverlayMargin(int top,
int left,
int bottom,
int right)
setOverlayMargin
public void setOverlayMargin(java.awt.Insets overlayMargin)
addComponent
public void addComponent(java.awt.Component component,
java.lang.Object constraints)
- Caled when component added into container with this layout.
- Overrides:
addComponent
in class AbstractLayoutManager
- Parameters:
component
- added componentconstraints
- component constraints
removeComponent
public void removeComponent(java.awt.Component component)
- Called when component removed from container with this layout.
- Overrides:
removeComponent
in class AbstractLayoutManager
- Parameters:
component
- removed component
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
-
- Specified by:
preferredLayoutSize
in interface java.awt.LayoutManager
getActualComponentInsets
protected java.awt.Insets getActualComponentInsets(java.awt.Container parent)
layoutContainer
public void layoutContainer(java.awt.Container parent)
-
- Specified by:
layoutContainer
in interface java.awt.LayoutManager
getActualHalign
protected int getActualHalign(java.awt.Component component,
OverlayData data)