|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.blogofbug.swing.layout.CaroselLayout
com.blogofbug.swing.layout.OffsetCaroselLayout
public class OffsetCaroselLayout extends CaroselLayout
Offsets a normal carousel layout be a fixed amount allowing it be "moved" around the screen.
| Field Summary |
|---|
| Fields inherited from class CaroselLayout | |
|---|---|
| additionalData, animationTimer, components, container, depthBasedAlpha, neutralContentWidth, numberOfItems, rotationalOffset, targetOffset |
| Constructor Summary | |
OffsetCaroselLayout(Container forContainer)
Creates a new instance of OffsetCaroselLayout |
|
| Method Summary | |
|---|---|
protected Point
|
calculateCenter(Insets insets, int width, int height, int widest)
Determines the center of the carousel based on the dimensions of the container |
protected Dimension
|
getCarouselRadius(Container target, Insets insets, int width, int height, int widestComponent)
Determines how "wide" the carousel should be drawn based on the side of the container the layout is laying out |
void
|
setFrontMostComponent(Component component)
Over-rides the normal setFrontMostComponent to move the selected component to 3 o'clock instead of 6 o'clock |
protected boolean
|
shouldHide(Component comp, double angle, double scale)
Overrides the normal layout method to determine if the object is offscreen and can therefore be ignored (giving a performance gain). |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Constructor Detail |
|---|
public OffsetCaroselLayout(Container forContainer)
forContainer - The container to associate the layout with.
| Method Detail |
|---|
protected Point calculateCenter(Insets insets, int width, int height, int widest)
insets - The container insetswidth - Width of the containerheight - The height of the containerwidest - width of the container
protected Dimension getCarouselRadius(Container target, Insets insets, int width, int height, int widestComponent)
target - The container the radius should be calculated forinsets - Any insets of the containerwidth - The width of the containerheight - The height of the containerwidestComponent - The widest component
public void setFrontMostComponent(Component component)
component - The component to move to the 'front'
protected boolean shouldHide(Component comp, double angle, double scale)
comp - The component to considerangle - Its position on the carousel.scale - The scale (applied to size) of the image, that is, how far from the observer is it
Groovy Documentation