public class FitLayout
extends java.lang.Object
implements java.awt.LayoutManager
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_HEIGHT_OR_WIDTH
The default height and width to be used by FitLayout and its
extenders in order to avoid falling back to zero height and/or width.
|
Constructor and Description |
---|
FitLayout() |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Does nothing because this LayoutManager lays out only the first
Component of the parent Container and thus doesn't need
any String associations.
|
protected java.awt.Component |
getComponent(java.awt.Container parent)
Gets the first Component of a specific Container if
there is such a Component.
|
protected void |
layoutComponent(java.awt.Component component,
java.awt.Rectangle bounds,
float alignmentX,
float alignmentY) |
void |
layoutContainer(java.awt.Container parent) |
protected void |
layoutContainer(java.awt.Container parent,
float componentAlignmentX) |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent) |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Since this LayoutManager lays out only the first
Component of the specified parent Container, the
preferred size of the Container is the preferred size of the
mentioned Component.
|
void |
removeLayoutComponent(java.awt.Component comp)
Does nothing because this LayoutManager lays out only the first
Component of the parent Container and thus doesn't need
any String associations.
|
protected static final int DEFAULT_HEIGHT_OR_WIDTH
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
protected java.awt.Component getComponent(java.awt.Container parent)
parent
- the Container to retrieve the first
Component ofprotected void layoutComponent(java.awt.Component component, java.awt.Rectangle bounds, float alignmentX, float alignmentY)
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager
protected void layoutContainer(java.awt.Container parent, float componentAlignmentX)
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.