public class AnimatedLayout extends Objectimplements LayoutManager2
This is achieved by calling: myComponent.putClientProperty(DESTINATION, newDestination)
This layout then nudges the component until it reaches that destination. The nudge is proportional to the distance that the component has to cover, giving the impression of a decelerating animation as the object approaches its destination.
| Modifier and Type | Field and Description |
|---|---|
static int |
DELAY
This is the delay, in milliseconds, between adjustments.
|
static String |
DESTINATION
|
| Constructor and Description |
|---|
AnimatedLayout(boolean calculateMinimumSize)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(Component
|
void |
addLayoutComponent(String
|
float |
getLayoutAlignmentX(Container
|
float |
getLayoutAlignmentY(Container
|
void |
invalidateLayout(Container
|
void |
layoutContainer(Container
|
Dimension |
maximumLayoutSize(Container
|
Dimension |
minimumLayoutSize(Container
|
protected static boolean |
nudge(JComponent
Nudge a component towards the destination.
|
Dimension |
preferredLayoutSize(Container
|
void |
removeLayoutComponent(Component
|
protected static void |
runLayout(JComponent
|
public static int DELAY
public static final StringDESTINATION
public float getLayoutAlignmentX(Containertarget)
public float getLayoutAlignmentY(Containertarget)
public void invalidateLayout(Containertarget)
protected static boolean nudge(JComponentc, Rectangle dest)
c - the component to nudge.
dest - the target bounds for the component.
public void layoutContainer(Containerparent)
protected static void runLayout(JComponentparent)
public void removeLayoutComponent(Componentcomp)