public abstract class Layout extends Object
Constructor and Description |
---|
Layout() |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Object value,
Component comp,
Container c)
Some layouts can optionally track the addition of elements with meta-data
that allows the user to "hint" on object positioning.
|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
Object |
getComponentConstraint(Component comp)
Returns the optional component constraint
|
abstract Dimension |
getPreferredSize(Container parent)
Returns the container preferred size
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isConstraintTracking()
If this method returns true, the addLayoutComponent method will be called when replacing a
layout for every component within the container
|
boolean |
isOverlapSupported()
This method returns true if the Layout allows Components to
Overlap.
|
abstract void |
layoutContainer(Container parent)
Layout the given parent container children
|
boolean |
obscuresPotential(Container parent)
Some layout managers can obscure their child components in some cases this
returns true if the basic underpinnings are in place for that.
|
void |
removeLayoutComponent(Component comp)
Removes the component from the layout this operation is only useful if the
layout maintains references to components within it
|
public abstract void layoutContainer(Container parent)
parent
- the given parent containerpublic abstract Dimension getPreferredSize(Container parent)
parent
- the parent containerpublic void addLayoutComponent(Object value, Component comp, Container c)
value
- optional meta data information, like alignment orientationcomp
- the added component to the layoutc
- the parent containerpublic void removeLayoutComponent(Component comp)
comp
- the removed component from layoutpublic Object getComponentConstraint(Component comp)
comp
- the component whose constraint should be returnedpublic boolean isOverlapSupported()
public boolean equals(Object o)
Object
public int hashCode()
Object
public boolean isConstraintTracking()
public boolean obscuresPotential(Container parent)
parent
- parent container