public class ObjectCardLayout extends Object implements LayoutManager2
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_COMPONENT
The default component (used when no other component is shown).
|
Constructor and Description |
---|
ObjectCardLayout()
Construct a new layout.
|
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Component component,
Object constraints)
Will be called from the container, when
a new component with constraint object
was added.
|
void |
addLayoutComponent(String name,
Component comp)
A component was added to the container.
|
Component |
getComponent(Object object)
Get a component for the given identifier.
|
Object |
getCurrentKey()
Get the key of the currently shown component (if any).
|
float |
getLayoutAlignmentX(Container target)
Get the component interest where to be aligned.
|
float |
getLayoutAlignmentY(Container target)
Get the component interest where to be aligned.
|
void |
invalidateLayout(Container target)
When called, all values are recalculated.
|
boolean |
isAvailable(Object object)
Test if there is a panel
for a object available.
|
void |
layoutContainer(Container parent)
Set the components bounds in the parent.
|
Dimension |
maximumLayoutSize(Container target)
Compute the maximum layout size.
|
Dimension |
minimumLayoutSize(Container parent)
Compute the minimum layout size.
|
Dimension |
preferredLayoutSize(Container parent)
Compute the preferred layout size.
|
void |
removeLayoutComponent(Component comp)
Will be called from the container, when
a component was removed.
|
void |
show(Object object)
Shows the component in the parent.
|
String |
toString() |
public static final String DEFAULT_COMPONENT
public void show(Object object)
object
- The object.parent
- The parent.public boolean isAvailable(Object object)
object
- The object.public Object getCurrentKey()
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
name
- The constraint in a string.comp
- The component.public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
parent
- The container.public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
parent
- The container.public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
parent
- The container.public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- The component.public void addLayoutComponent(Component component, Object constraints)
addLayoutComponent
in interface LayoutManager2
component
- The component.constraints
- The constraints.public float getLayoutAlignmentX(Container target)
getLayoutAlignmentX
in interface LayoutManager2
target
- The container.public float getLayoutAlignmentY(Container target)
getLayoutAlignmentY
in interface LayoutManager2
target
- The container.public void invalidateLayout(Container target)
invalidateLayout
in interface LayoutManager2
target
- The container.public Dimension maximumLayoutSize(Container target)
maximumLayoutSize
in interface LayoutManager2
target
- The container.Copyright © 2013. All Rights Reserved.