|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tbee.swing.CarouselLayout
public class CarouselLayout
| Nested Class Summary | |
|---|---|
protected class |
CarouselLayout.CarouselPosition
|
| Field Summary | |
|---|---|
protected Hashtable<Component,CarouselLayout.CarouselPosition> |
iAdditionalData
|
protected LinkedList<Component> |
iComponents
|
protected int |
iNumberOfItems
|
protected double |
iRotationalOffset
|
protected double |
iTargetOffset
|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
CarouselLayout(Container container)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent actionEvent)
Manages timer actions, terminating the timer if any event is fully achieved |
void |
addLayoutComponent(String name,
Component comp)
Name is ignored |
void |
finalizeLayoutImmediately()
Moves everything to their "target" positions, without animating anything |
double |
getAngle()
Returns the current rotational angle |
Component |
getFrontMostComponent()
|
Component |
getNextAntiClockwise()
|
Component |
getNextClockwise()
|
protected CarouselLayout.CarouselPosition |
getPosition(Component comp)
Gets the additional data stored by the layout manager for a given component |
protected boolean |
isAnimating()
Determines if an animation is currently playing |
void |
layoutContainer(Container target)
Lays out all of the components on the carousel. |
Dimension |
minimumLayoutSize(Container parent)
Cheats and bases it's size on the prefered sizes of each component |
Dimension |
preferredLayoutSize(Container parent)
Determine the widest and tallest dimensions, then return the height as 1.5 * the highest, and 3 * the widest |
protected void |
recalculateCarousel()
|
protected int |
recalculateVisibleItems()
|
void |
removeLayoutComponent(Component comp)
Remove the component |
void |
setAngle(double d)
Sets the current rotational angle. |
void |
setFrontMostComponent(Component component)
Moves the specified component to the front |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
protected int iNumberOfItems
protected LinkedList<Component> iComponents
protected Hashtable<Component,CarouselLayout.CarouselPosition> iAdditionalData
protected double iRotationalOffset
protected double iTargetOffset
| Constructor Detail |
|---|
public CarouselLayout(Container container)
container - | Method Detail |
|---|
public void addLayoutComponent(String name,
Component comp)
addLayoutComponent in interface LayoutManagerpublic void removeLayoutComponent(Component comp)
removeLayoutComponent in interface LayoutManagerprotected CarouselLayout.CarouselPosition getPosition(Component comp)
comp - The component you wish retreive the data for
protected int recalculateVisibleItems()
protected void recalculateCarousel()
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManagerpublic Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManagerparent - The container for the layoutpublic void layoutContainer(Container target)
layoutContainer in interface LayoutManagerpublic double getAngle()
public void setAngle(double d)
d - The desired angle in radiansprotected boolean isAnimating()
public void actionPerformed(ActionEvent actionEvent)
actionPerformed in interface ActionListeneractionEvent - the action event, although this will always be the timerpublic void finalizeLayoutImmediately()
public void setFrontMostComponent(Component component)
component - The component move to the frontpublic Component getFrontMostComponent()
public Component getNextClockwise()
public Component getNextAntiClockwise()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||